Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • juerg/cache-query-job-benchmark
  • bst-1 protected
  • juerg/cache-query-job
  • tristan/fix-recursive-artifact-pull
  • nanonyme/remove-fix-python-timestamps
  • tristan/shell-artifacts
  • bschubert/update-coverage
  • juerg/remote-cache
  • nanonyme/subprocess-devnull
  • tristan/artifact-extensions
  • tpollard/custom-platform-properties
  • juerg/buildbox
  • chandan/update-reqs
  • chandan/moar-runners
  • tpollard/optional-sandbox-properties
  • nanonyme/fix-tests
  • bschubert/standardize-source-tests
  • nanonyme/warn-nofile
  • abderrahim/stage-artifact-scriptelement
  • 1.6.1
  • 1.6.0
  • 1.93.5
  • 1.5.1
  • 1.93.4
  • bst-1.4-branchpoint protected
  • 1.5.0
  • 1.4.3
  • 1.93.3
  • 1.93.2
  • 1.4.2
  • 1.93.1
  • 1.93.0
  • 1.91.3
  • 1.91.2
  • 1.91.1
  • 1.91.0
  • bst-1-branchpoint protected
  • 1.4.1
  • 1.4.0
40 results

queue.py

  • Tristan Van Berkom's avatar
    98c15463
    _scheduler/queues: Don't call update state outside of error handling harness · 98c15463
    Tristan Van Berkom authored
    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 was only added because the
    state needs to be updated for a failure as well as a success.
    
    Instead, we now have the BuildQueue call Element._assemble_done()
    unconditionally, regardless of whether the build was successful
    or not, which has the same effect and also reads better.
    
    In addition, added a FIXME comment that we are still conditionally
    updating the artifact cache size from BuildQueue.done() only
    if the build is successful, which is incorrect because failed builds
    also increase the local artifact cache size - to fix this we need
    to communicate the added artifact size through Element._assemble()
    regardless of whether the build succeeded or failed.
    98c15463
    History
    _scheduler/queues: Don't call update state outside of error handling harness
    Tristan Van Berkom authored
    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 was only added because the
    state needs to be updated for a failure as well as a success.
    
    Instead, we now have the BuildQueue call Element._assemble_done()
    unconditionally, regardless of whether the build was successful
    or not, which has the same effect and also reads better.
    
    In addition, added a FIXME comment that we are still conditionally
    updating the artifact cache size from BuildQueue.done() only
    if the build is successful, which is incorrect because failed builds
    also increase the local artifact cache size - to fix this we need
    to communicate the added artifact size through Element._assemble()
    regardless of whether the build succeeded or failed.