New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 610543 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Remove use of sys.exit(0) from chromite code

Project Member Reported by sosa@chromium.org, May 10 2016

Issue description

Currently 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.
 

Comment 1 by sosa@chromium.org, May 10 2016

Specifically clean up the use in the sync stages (not sure if sys.exit in other places are incorrect)

Comment 2 by nxia@chromium.org, 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?

Comment 3 by nxia@chromium.org, May 23 2016

correct: exception(inherit from Exception)

Comment 4 by sosa@google.com, May 24 2016

sgtm
Project Member

Comment 5 by bugdroid1@chromium.org, 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

Comment 6 by nxia@chromium.org, May 31 2016

Summary: Remove use of sys.exit(0) from chromite code (was: Remove use of SystemExit from chromite code)

Comment 7 by nxia@chromium.org, May 31 2016

Status: Fixed (was: Assigned)
Closing... please feel free to reopen if its not fixed.
Status: Verified (was: Fixed)

Sign in to add a comment