| commit | e365d6b307ae337baa85d384f59dac2ca05c3905 | [log] [tgz] |
|---|---|---|
| author | Rob Mohr <mohrr@google.com> | Thu Nov 13 21:16:39 2025 |
| committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Nov 13 21:16:39 2025 |
| tree | 30a597051c96aa99c0202036f4de8b9f1e0bfc01 | |
| parent | 2a848d75abd4515c5619bc57c8f6e3ac33990ea2 [diff] |
Reland "[engine] Don't catch cancellations in except" This is a reland of commit b2ab5f39fa6f3b4d44e069e3da9009e3050f89eb Original change's description: > [engine] Don't catch cancellations in except > > Steps might be cancelled because they're in a self.m.time.timeout() > context, or because the overall build is being cancelled. The first case > is much like a failed step, and the caller likely wants to handle it as > a failed step. The latter case is not like a failed step, but more like > a KeyboardInterrupt. KeyboardInterrupt doesn't inherit from Exception, > so it's not caught by 'except Exception:' blocks. It inherits from > BaseException. This ensures that when a user hits Ctrl-C, very few > exception handlers are invoked to process the KeyboardInterrupt, and the > process simply exits. > > Add a new exception type, CancelledBuild, that inherits directly from > BaseException. Add handling of this exception type in a couple places, > but mostly let it propagate untouched. This ensures that a cancelled > build won't be processed by an exception handler that doesn't understand > that the build has been cancelled. > > Example failure: http://ci.chromium.org/b/8699098381363633537/infra > > Bug: b/456536120 > Change-Id: Iab371e7ada59b035efbddfe781a9e44017f7f463 > Recipe-Manual-Change: build > Recipe-Manual-Change: chromiumos > Recipe-Manual-Change: fuchsia > Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/recipes-py/+/7120818 > Commit-Queue: Rob Mohr <mohrr@google.com> > Reviewed-by: Robbie Iannucci <iannucci@google.com> Bug: b/456536120 Change-Id: I9e5650a08bc5a6c7337b71288d4e68f98dd81b57 Recipe-Manual-Change: build Recipe-Manual-Change: chromiumos Recipe-Manual-Change: fuchsia Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/recipes-py/+/7127769 Commit-Queue: Rob Mohr <mohrr@google.com> Reviewed-by: Garrett Beaty <gbeaty@google.com>
Recipes are a domain-specific language (embedded in Python) for specifying sequences of subprocess calls in a cross-platform and testable way.
They allow writing build flows which integrate with the rest of LUCI.
Documentation for the recipe engine (including this file!). Take a look at the user guide for some hints on how to get started. See the implementation details doc for more detailed implementation information about the recipe engine.
user.email and user.name are configured in git config.Run the following to setup the code review tool and create your first review:
# Get `depot_tools` in $PATH if you don't have it git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/src/depot_tools export PATH="$PATH:$HOME/src/depot_tools" # Check out the recipe engine repo git clone https://chromium.googlesource.com/infra/luci/recipes-py $HOME/src/recipes-py # make your change cd $HOME/src/recipes-py git new-branch cool_feature # hack hack git commit -a -m "This is awesome" # This will ask for your Google Account credentials. git cl upload -s -r joe@example.com # Wait for approval over email. # Click "Submit to CQ" button or ask reviewer to do it for you. # Wait for the change to be tested and landed automatically.
Use git cl help and git cl help <cmd> for more details.