Fix race condition (COMPLETED/BOT_DIED) in task_runner.

Per b/69462084 and a TODO comment in this file, a race condition
exists when an external process polls task status that fails with
BOT_DIED (there's a short window in which the task will be marked
as COMPLETED before being updated to BOT_DIED). This change sends
the task-update without the exit code (to prevent the COMPLETED
status from being set), and then sends a task_error message. The
default must_signal_internal_failure is also changed to provide a
default error in case run_isolated fails.

TESTED=Ran unit tests in task_runner_test and they pass.

Any other tests?

Change-Id: I1db3e15ccbdac3da9181b273681180211b07841c
Reviewed-on: https://chromium-review.googlesource.com/834397
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Cr-Mirrored-From: https://chromium.googlesource.com/infra/luci/luci-py
Cr-Mirrored-Commit: 0b027452e658080df1f174c403946914443d2aa6
1 file changed
tree: 3dfe078f75830457b9c8a999fcd7d952ad22225d
  1. example/
  2. libs/
  3. proto/
  4. tests/
  5. third_party/
  6. tools/
  7. utils/
  8. .gitignore
  9. auth.py
  10. cipd.py
  11. isolate.py
  12. isolate_format.py
  13. isolate_storage.py
  14. isolated_format.py
  15. isolateserver.py
  16. LICENSE
  17. LUCI_CONTEXT.md
  18. named_cache.py
  19. OWNERS
  20. PRESUBMIT.py
  21. README.md
  22. README.py
  23. run_isolated.py
  24. swarming.py
  25. trace_inputs.py
  26. WATCHLISTS
README.md

LUCI Python Client

This is the Python Client code for LUCI. It's part of the main python repo, and is also mirrored into a standalone client-py repo.

License

This project is licensed under Apache v2.0 license. See LICENSE for details.