_scheduler/queues/queue.py: Don't call update state outside of error handling harness
Commit 3fa79d8d, part of an initiative for caching of the failed builds, introduced a call to Element._update_state() after a job completes and before entering the error handling harness intended for handling plugin raised errors. Element._update_state() can result in triggering plugin code to run, so this is incorrect, and causes raised errors to crash BuildStream if they happen here. After analyzing the code, it appears that this additional call to Element._update_state() is unneeded, and appears to have been added as an extra reassurance that the state actually gets updated. It is unneeded because the Element._assemble() call now treats failed builds as a successful activity which results in caching the build in a failed state, and the BuildQueue still calls Element._assemble_done() for a cached failed build.
Loading
Please register or sign in to comment