Remove use of sys.exit(0) from chromite code |
||||
Issue descriptionCurrently we have some stages that raise a SystemExit (by calling sys.exit) to exit early. We should clean up the code to remove this and actually either raise an exception or just make it easy to abort a runner early.
,
May 23 2016
Looks like raising a special exception(inherit from BaseException) is good way to clean up the sys.exit(0) logic. Checked the code, need to change the sys.exit(0) in android_stages, chrome_stages and sync_stages to raise this special exception. sosa@, looks good to you?
,
May 23 2016
correct: exception(inherit from Exception)
,
May 24 2016
sgtm
,
May 26 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/ad48354d2411917e4d2ccee40dd67cbf1560f487 commit ad48354d2411917e4d2ccee40dd67cbf1560f487 Author: Ningning Xia <nxia@chromium.org> Date: Tue May 24 19:27:21 2016 Raise ExitEarlyException instead of SystemExit Raise ExitEarlyException instead of calling sys.exit to exit early finished stages. BUG= chromium:610543 TEST=run_tests Change-Id: Ib36fb76d7822ff2d7e42f6d4001de7c1de601a45 Reviewed-on: https://chromium-review.googlesource.com/347053 Commit-Ready: Ningning Xia <nxia@chromium.org> Tested-by: Ningning Xia <nxia@chromium.org> Reviewed-by: Chris Sosa <sosa@chromium.org> [modify] https://crrev.com/ad48354d2411917e4d2ccee40dd67cbf1560f487/scripts/cbuildbot.py [modify] https://crrev.com/ad48354d2411917e4d2ccee40dd67cbf1560f487/cbuildbot/stages/android_stages.py [modify] https://crrev.com/ad48354d2411917e4d2ccee40dd67cbf1560f487/cbuildbot/stages/generic_stages.py [modify] https://crrev.com/ad48354d2411917e4d2ccee40dd67cbf1560f487/cbuildbot/stages/sync_stages.py [modify] https://crrev.com/ad48354d2411917e4d2ccee40dd67cbf1560f487/cbuildbot/builders/generic_builders.py [modify] https://crrev.com/ad48354d2411917e4d2ccee40dd67cbf1560f487/cbuildbot/stages/sync_stages_unittest.py [modify] https://crrev.com/ad48354d2411917e4d2ccee40dd67cbf1560f487/cbuildbot/builders/simple_builders.py [modify] https://crrev.com/ad48354d2411917e4d2ccee40dd67cbf1560f487/cbuildbot/failures_lib.py [modify] https://crrev.com/ad48354d2411917e4d2ccee40dd67cbf1560f487/cbuildbot/stages/chrome_stages.py
,
May 31 2016
,
May 31 2016
,
Jun 27 2016
Closing... please feel free to reopen if its not fixed.
,
Jun 27 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by sosa@chromium.org
, May 10 2016