Commit Graph

145 Commits (ea11cc31c5f3d65e7ec1a18971319b26e54a04e7)

Author SHA1 Message Date
Gavin Mak ea11cc31c5 Remove apply_patch_on_gclient property
This property isn't used anymore.

Bug: 891917
Change-Id: I005f5b320cb33afddb1d3272f3f626542996bb62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3766100
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
3 years ago
Junji Watanabe 350d210871 Revert .cipd_bin setup in depot_tools recipe module
This reverts https://crrev.com/c/3697958 and https://crrev.com/c/3704921.
One reason is that recipe bundle is not designed to be mutated.
Another reason is the presence of gomacc binary under .cipd_bin causes an unexpected side effect. https://crbug.com/1337048

Bug: 931218, 1337048
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: Iaea12a0ad9246c0781035aa499cc6c0bb42d71c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3715873
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
3 years ago
Junji Watanabe 7ff520f026 call _cipd_bin_setup() in depot_tools.on_path() recipe module API
Some users call ninja/autoninja inside a depot_tools.on_path() context.
e.g. https://source.chromium.org/chromium/chromium/tools/build/+/main:recipes/recipes/chromium_upload_clang.py;l=92;drc=5bf3de010da6bd44d776f98c136e3b41f82cdfe8

Tested on a led build.
https://ci.chromium.org/swarming/task/5b802dcdfe0a2810

Bug: 931218
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: If3ece36c1d6590d30bc071deba6387d39b7c33a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3704921
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
3 years ago
recipe-roller 5b13afcae3 Roll recipe dependencies (nontrivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8815259687168433617

Please review the expectation changes, and LGTM+CQ.

recipe_engine:
4cb1bf0fb0
  4cb1bf0 (gbeaty@chromium.org)
      Don't set the -u flag when running python unbuffered.

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

R=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I0859db0f9db1c7548068073300150e979ac460b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3621157
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Auto-Submit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Garrett Beaty <gbeaty@google.com>
3 years ago
Garrett Beaty 3b97fa826e Reland "Set a default got_revision property in the bot_update json output."
This is a reland of commit 053817260a

The change was not related to the errors that it was reverted for, so no
changes are necessary.

Original change's description:
> Set a default got_revision property in the bot_update json output.
>
> The bot_update.py script sets a got_revision property by default even if
> it is not present in the reverse revision mapping. This results in an
> uncaught exception when set_output_commit is set to True if got_revision
> isn't present in the reverse revision mapping, but it isn't caught until
> production because the test API doesn't match that behavior. This change
> updates the test API method to match the behavior of the script.
>
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Change-Id: Ideefa9d77d2a816ae66a2bb52737264ed3f5bcee
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3575361
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Garrett Beaty <gbeaty@google.com>
> Auto-Submit: Garrett Beaty <gbeaty@google.com>

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: I80efeee8a2b951df43b00d89bb596dc2cf2fcec7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3582182
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
3 years ago
Josip Sokcevic a0382d39be Revert "Set a default got_revision property in the bot_update json output."
This reverts commit 053817260a.

Reason for revert: we reverted got_revision change, and this change
itself may be causing some other failues.

Original change's description:
> Set a default got_revision property in the bot_update json output.
>
> The bot_update.py script sets a got_revision property by default even if
> it is not present in the reverse revision mapping. This results in an
> uncaught exception when set_output_commit is set to True if got_revision
> isn't present in the reverse revision mapping, but it isn't caught until
> production because the test API doesn't match that behavior. This change
> updates the test API method to match the behavior of the script.
>
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Change-Id: Ideefa9d77d2a816ae66a2bb52737264ed3f5bcee
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3575361
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Garrett Beaty <gbeaty@google.com>
> Auto-Submit: Garrett Beaty <gbeaty@google.com>

Change-Id: Ie975dfe39e7b8997336761e12f53f3046359d825
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3578820
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
3 years ago
Garrett Beaty 053817260a Set a default got_revision property in the bot_update json output.
The bot_update.py script sets a got_revision property by default even if
it is not present in the reverse revision mapping. This results in an
uncaught exception when set_output_commit is set to True if got_revision
isn't present in the reverse revision mapping, but it isn't caught until
production because the test API doesn't match that behavior. This change
updates the test API method to match the behavior of the script.

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: Ideefa9d77d2a816ae66a2bb52737264ed3f5bcee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3575361
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Auto-Submit: Garrett Beaty <gbeaty@google.com>
3 years ago
Jack Neus 5c2d472e0c Revert "bot_update: change set_output_commit to True by default"
This reverts commit ffeef9001e.

Reason for revert: Breaks ChromeOS builders, e.g. go/bbid/8817528282713702353

Original change's description:
> bot_update: change set_output_commit to True by default
>
> This is for https://crbug.com/1310066#c7
>
> Bug: 1310066

> Change-Id: I874e1a4c2ca53a7da04d6c24533429d7508088a8
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3565259
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Auto-Submit: Takuto Ikuta <tikuta@chromium.org>

Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build
Bug: 1310066
Change-Id: Id6b32f71ba8824ad3e748d0b52603ea1548096e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3575359
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Owners-Override: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
3 years ago
Takuto Ikuta ffeef9001e bot_update: change set_output_commit to True by default
This is for https://crbug.com/1310066#c7

Bug: 1310066
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build
Change-Id: I874e1a4c2ca53a7da04d6c24533429d7508088a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3565259
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
3 years ago
Stephanie Kim 3481645827 Check if json exists in ensure_checkout's finally block
The step_result json can currently be empty if the orchestrator build
is canceled while running bot_update. Trying to do
step_result.json.output in the finally block raises an "Uncaught
exception AttributeError".
Ex: https://ci.chromium.org/ui/p/chromium/builders/try/win10_chromium_x64_rel_ng/1121568/overview

This change checks for the json attr before trying to read json.output.

Bug: 1305332
Change-Id: I1dc277642ece1b96144be6381a7c4b8426cb2bc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3518372
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
3 years ago
Ravi Mistry 6b28c1ddef Replace python3 with vpython in bot_update/api.py
For context see comments 5 and 6 here: https://bugs.chromium.org/p/chromium/issues/detail?id=1298922#c6

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Bug: chromium:1298922
Change-Id: I23eaec3c104c7b52653732b6fd9d58d175d78069
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3489327
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Ravi Mistry <rmistry@chromium.org>
3 years ago
Josip Sokcevic a59e9ea222 Revert "Remove unused functionality in bot_update.py"
This reverts commit 8b64ddec2a.

Reason for revert: it appears we need this, since .DEPS.git
specifies custom dependencies needed for tryjob.

Original change's description:
> Remove unused functionality in bot_update.py
>
> .DEPS.git has been removed in 2014 and no longer supported. It was
> deleted in https://codereview.chromium.org/497313003 (August 2014). Last
> entry in chromium/src is from tag 44.0.2403.47 in June 2015.
>
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: chrome_release
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Change-Id: I3ffb8813af867df959098c02d399c8d745894aae
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3439573
> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Change-Id: I36bcd352a984b4b762096197a384e86347418290
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3448707
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
3 years ago
Josip Sokcevic 8b64ddec2a Remove unused functionality in bot_update.py
.DEPS.git has been removed in 2014 and no longer supported. It was
deleted in https://codereview.chromium.org/497313003 (August 2014). Last
entry in chromium/src is from tag 44.0.2403.47 in June 2015.

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: I3ffb8813af867df959098c02d399c8d745894aae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3439573
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic 289dedd36b Remove unused arguments from bot_update recipe
gclient removed syntax validation flag in 2020:
https://crrev.com/c/2083589, so this can safely be removed.

R=aravindvasudev@google.com, gavinmak@google.com

Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build
Change-Id: I2aced6cdb01d571ca361cc57e7c8715c9ca40552
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3419278
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic ed6aa2b0e8 Reland "Use py3 in bot_update and gclient recipe_modules"
This is a reland of bb88492ff3

Original change's description:
> Use py3 in bot_update and gclient recipe_modules
>
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: chrome_release
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Bug: 1289280
> Change-Id: Id61bacf4acef319f7ea22161081b632677ca363c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3402082
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Bug: 1289280, 1289504
Change-Id: I2f2f7244568b1fdfb960d5cdfa3937175ac1ed2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3414742
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Brian Ryner 6bfbe35cce Revert "Use py3 in bot_update and gclient recipe_modules"
This reverts commit bb88492ff3.

Reason for revert: Broke bot_update: https://logs.chromium.org/logs/infra/buildbucket/cr-buildbucket/8824463357494497185/+/u/bot_update/stdout

Original change's description:
> Use py3 in bot_update and gclient recipe_modules
>
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: chrome_release
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Bug: 1289280
> Change-Id: Id61bacf4acef319f7ea22161081b632677ca363c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3402082
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Bug: 1289280
Change-Id: I371d599b17b42edd7b1aae581695e75a80ebae83
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3403476
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic bb88492ff3 Use py3 in bot_update and gclient recipe_modules
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Bug: 1289280
Change-Id: Id61bacf4acef319f7ea22161081b632677ca363c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3402082
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic 756e98f5aa Mark patch failures as regular failures, not infra
Patch failures shouldn't be treated as infra_failures (as long as patch
was successfully downloaded).

Prior to https://crbug.com/1207685, bot_update patch failurs were set as
successful step to work around buildbucket plugin requirements.

One alternative approach is to add necessary information into patch
failure step, by editing its presentation.

R=gavinmak@google.com

Bug: 1207685, 1255228
Change-Id: I696356d40a80536c3efbca99091536b8b25deb40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3219890
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
4 years ago
recipe-roller ffbe96997e Roll recipe dependencies (nontrivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8835439534712066113

Please review the expectation changes, and LGTM+CQ.

recipe_engine:
63c685b872~..f28ac0ab20025138a3f46845de09d625960c2a97
  63c685b (chanli@chromium.org)
      [buildbucket] test_api: emulate luci_context based on build info
  f28ac0a (chanli@chromium.org)
      Reland "[recipe-py] expose resultdb info in LUCI_CONTEXT"

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

R=nodir@chromium.org, tandrii@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: If2d4beb72d786f852feca9f4d43e08778bf71f3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3174366
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Auto-Submit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
4 years ago
Garrett Beaty f80edc2dbc Use actual ref for commit position footer in test data when provided.
* If the input revision starts with refs/ use it as the ref of the CP.
* If the input revision is of the form origin/X, use refs/heads/X as the
  ref of the CP.

Change-Id: I048883afcfe1593e877c004729f859921910c993
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3165297
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Garrett Beaty <gbeaty@google.com>
4 years ago
Yuanjun Huang 8f09549ffc [python3] Solve soft errors in the recipes of git module
These soft errors will become hard failures and block the proto module
to be marked PY2+3 in upstream recipe engine repo.


Bug: 1227140
Change-Id: I0e5fdebe7e7cf43552b525d63c12f82c96c49902
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3152784
Commit-Queue: Yuanjun Huang <yuanjunh@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
4 years ago
Gavin Mak d6d5c46cf4 Add PYTHON_VERSION_COMPATIBILITY to gitiles and bot_update
Setting PYTHON_VERSION_COMPATIBILITY = PY2+3 makes "recipe.py test" run
tests in both py2 and py3.

Bug: 1227140
Change-Id: I56a47f0491cbade172e1dc1239cbf6c2a0faa64f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3116850
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
4 years ago
Josip Sokcevic bdc7adc6f7 Remove bot_update assumption that HEAD is main
There is no need to override refs/heads/main to be HEAD. This may not
always be true, there is no benefits of doing so and it doesn't play
well with git_cache which will set HEAD to global default branch.

R=gavinmak@google.com

Bug: 1238084
Recipe-Manual-Change: build_limited
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Change-Id: I21ab3463baaf7f86562ab0c65c06c3ac0962a08c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3088295
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
4 years ago
Josip Sokcevic ce332a47a9 Use main as default branch in all recipes
Recipe-Manual-Change: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: I89008bc07b1c3de13d9c6dd64e723fe6dc8d01d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3015262
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
4 years ago
Yiwei Zhang 2eba529771 recipe: import engine_types instead of types from recipe_engine
Motivation: https://crrev.com/c/3050650

Bug: 1227763
Change-Id: I2e7ce3a8a5652959bdc68f4b3cd3a783d0424c36
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3055154
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
4 years ago
Edward Lesmes 6d099d543d bot_update: Don't collect metrics if not running as part of a build.
When running using led, DEPOT_TOOLS_REPORT_BUILD might not be set, and
bots will try to collect metrics.

Set DEPOT_TOOLS_COLLECT_METRICS so metrics are not collected on this
case.

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chromiumos
Change-Id: I8b1083b31ef6daf87d24544a990bee863543aa1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2946935
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Gavin Mak 6b0a611c2c Make patch failures from bot_update fail in ensure_checkout
Patch failures in bot_update return exit code 87 and 88, which are
ignored by ensure_checkout. This causes the bot_update step in recipes
to be successful despite a patch failure. This change removes these exit
codes from the accepted return codes for this step.

Bug: 1207685
Change-Id: I7bd71732a99184c96196659c6953e4d4b610c9b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2893686
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 years ago
Edward Lesmes 8c9a5b84cb bot_update: Add support for experiments.
Bug: 1199853
Change-Id: I0616f90a0cd7e4478f40ac7eaf5dbccca788d517
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2898001
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
recipe-roller b47c95a58a Roll recipe dependencies (nontrivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

Please review the expectation changes, and LGTM+CQ.

recipe_engine:
f4c9a77634
  f4c9a77 (olivernewman@google.com)
      [buildbucket] Make default git_ref consistent

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

R=iannucci@chromium.org, tandrii@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I6b5526f445bbb7337ce8d18e10e855f7a91c587f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2885939
Auto-Submit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
4 years ago
Edward Lesmes 68c71a34e1 bot_update: Set DEPOT_TOOLS_REPORT_BUILD to report bot metrics.
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chrome_release
Change-Id: I704ac523a3212ea30061948f8a9971a373d5394f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2861214
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
4 years ago
Josip Sokcevic 3d9cab4fa8 Increase bot_update http low speed time
Windows builders have issues fetching from chromium/src, and increasing
timeout may help - recommended by git team.

Bug: 1198581
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: build
Change-Id: Ic650dea2a175e9642a6d3d5b8f1c54fa9979e12a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2823020
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Haiyang Pan 057831ef1f Recipe: Add timeout for fetching gerrit commit message in tryserver API
In crbug.com/1196159, a build got stuck at "gerrit changes" step for 3
hours. It would be good to add a timeout so that it fails early.

Also adjust the timeout for get_changes to 60s, from 600s

Bug: 1196159
Change-Id: Id2327ab40dd2fd8d95aaad6bb724f7ed06e6c244
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2811899
Commit-Queue: Haiyang Pan <hypan@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
4 years ago
recipe-roller 68a0333ec7 Roll recipe dependencies (nontrivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

Please review the expectation changes, and LGTM+CQ.

recipe_engine:
3faa1bab09
  3faa1ba (yiwzhang@google.com)
      cq: Use proto Output properties in cq recipe_module

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

R=dpranke@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I5cb2fc5927de1cecad74f2c7a25be875983556a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2781195
Auto-Submit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
4 years ago
Garrett Beaty e856b6bba8 Enable set_output_commit to be used with RevisionFallbackChain.
When set_output_commit is True and the repo associated with the
got_revision property does not use commit positions, buiders whose
gclient config uses RevisionFallbackChain for that repo will raise an
exception when attempting set the output commit because a string is
expected for the revision value, not a RevisionFallbackChain object.
This changes the set_output_commit code to resolve the revision so that
the output commit can be set in those cases.

Bug: 1159749, 1141886
Change-Id: Iddf1d49871028d9500eefb0eed07e36ce7e6b0d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2612223
Auto-Submit: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
4 years ago
Takuto Ikuta 5c4c28f111 [recipes] remove is_luci specification
This is always True now.

Bug: 1128847
Change-Id: Ief951e9312ea8bd13c98b4bbc87c18d7307bb43a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2413667
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
5 years ago
Garrett Beaty 71198cd4a2 Handle failures in the bot_update script.
Currently, if the bot_update script fails, then recipe code that makes
assumptions about the returned output JSON cause exceptions to be
raised. This fixes a couple instances in the code so that the bot_update
failure should surface instead of an uncaught exception.

Change-Id: I031e613841b03e5eb4f6d9ca7adb5085088a3077
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2405708
Auto-Submit: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
5 years ago
Garrett Beaty 3e5d86a237 Generate revisions in json output for refs/ and origin/.
Right now the default test data for bot_update doesn't transform
revisions specifying refs for the revision except for refs starting with
refs/ on the first solution. This means that the output will just have
the ref name as the revision value, which isn't compatible with code
that requires an actual revision value.

Bug: 1047893
Change-Id: I016ad5e8db5a293dd5e6dacb5b8beba51e000949
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chrome_release
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2325761
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Auto-Submit: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Garrett Beaty 6081b23b29 Modify bot_update to support setting blamelist pins.
This adds a parameter to bot_update.ensure_checkout that will cause
blamelist pins to be set for all of the repos whose revision is not
determined by DEPS files: the repo for the gitiles input, the repo for
each solution in the gclient config and any repos with the revision set
by the revisions field of the gclient config.

Bug: 1047893
Change-Id: Ie3eee41dbf15be014185b6f255ee3d4cfd40b4e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2293514
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Garrett Beaty c8c88f9c55 Use fixed revisions in bot_update's test API output_json.
Currently the output_json method generates revisions for projects that
are in the revision_mapping and only those projects appear in the
manifest and source_manifest, using the generated revision. This method
is used to construct the default json output for bot_update in tests.
This has 2 problems:
1. If a project has a fixed revision, its manifest entries and the
property used the generated revision, meaning the gitiles input revision
will not be used in the json output.
2. If a project has a fixed revision and isn't present in
revision_mapping then manifest entries aren't generated for it.

This changes the method to use the revisions in the fixed_revisions dict
and to create manifest entries for the projects that appear in the
fixed_revisions dict which should make fewer situations where
bot_update's output_json needs to be explicitly set.

Change-Id: I99de52edc9248c28e9d3aa3a04cc77bf9fccbe37
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chrome_release
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2304644
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
5 years ago
Greg Guterman 35dec5f127 Add gerrit_change_owner field to tryserver recipe api
Bug: 923016
Change-Id: I1d55fb2403306763a06b44d2ea65caa0014936d3
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2292235
Commit-Queue: Gregory Guterman <guterman@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Robert Iannucci d56d2c282f Remove source_manifest functionality from depot_tools.
This is essentially defunct; We will want to add something like this
back in, but it's so sparsely used right now that it's better to just
remove it and then add it back properly when we're ready to support
it across all of LUCI.

R=yiwzhang@google.com

Bug: 1093959
Change-Id: I72673515d860234daa3b01514ac38168ebb4825a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2250403
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
5 years ago
Arthur Wang 3f0096a72a Set DEPOT_TOOLS_UPDATE='0' assuming depot_tool do not auto update on bot
Bug: 1090603
Change-Id: Ib42c778c69588e44ce95b58eda5bc06b12550e9e
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: skia
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2228810
Commit-Queue: Arthur Wang <wuwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
5 years ago
Robert Iannucci 4504fd580a Remove infra_paths module.
We no longer need it to bridge path differences between buildbot and
LUCI, and it shouldn't be in use downstream now either.

R=machenbach@chromium.org, martiniss@chromium.org, tandrii@chromium.org, yiwzhang@google.com

Bug: 1015181
Change-Id: Iaba2100653ae9f06799d1d510bef993f7f710dc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2220171
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
5 years ago
Josip Sokcevic a01816b0ba Set git low speed detection on bot_update
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: release_scripts
Recipe-Nontrivial-Roll: skia
Change-Id: Iacf276bd53fdca37994b6d6fe1e5db71f844a3fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2147833
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
5 years ago
Andrii Shyshkalov ef7a33909e bot_update: tell CQ to not retry patch application failures.
R=erikchen

Recipe-Nontrivial-Roll: build
Change-Id: I171daa3d61b2c20f963b8d587df8662740d80e71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2050537
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Andrii Shyshkalov <tandrii@google.com>
5 years ago
John Budorick e9aeaee522 bot_update: only add input commit refs for gclient solution roots.
Bug: 1031805
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: infra
Change-Id: I6edd221900eadd4d621d6190e08b61fdbc2f8621
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1958706
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
5 years ago
Garrett Beaty 90c88f0973 Reland "Fetch the input commit ref when both ref and id are specified."
This is a reland of 72a245e4c6

The "git checkout master --detach" operation has been modified to run in the solution
directory.

Original change's description:
> Fetch the input commit ref when both ref and id are specified.
>
> This causes --refs refs/head/master to be added to bot_update calls when
> the input build message contains a commit id and the refs/head/master
> ref. This is an effective no-op.
>
> When bot_update clones a git repository, it results in HEAD referring to
> master in contrast to the non-clone case which results in a detached
> HEAD. This prevents fetching refs/heads/master, so detach the HEAD after
> cloning.
>
> Bug: 922150
> Change-Id: I357a78305020218e9f5d350832a706b8f2b27967
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: infra
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1900735
> Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>

Bug: 922150
Change-Id: I7dc6ebed2dcbd880ff4d515f7e9fc6428ff24099
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: infra
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1910260
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
6 years ago
Stephen Martinis 1917f7a099 Revert "Fetch the input commit ref when both ref and id are specified."
This reverts commit 72a245e4c6.

Reason for revert: crbug.com/1022617

Original change's description:
> Fetch the input commit ref when both ref and id are specified.
> 
> This causes --refs refs/head/master to be added to bot_update calls when
> the input build message contains a commit id and the refs/head/master
> ref. This is an effective no-op.
> 
> When bot_update clones a git repository, it results in HEAD referring to
> master in contrast to the non-clone case which results in a detached
> HEAD. This prevents fetching refs/heads/master, so detach the HEAD after
> cloning.
> 
> Bug: 922150
> Change-Id: I357a78305020218e9f5d350832a706b8f2b27967
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: infra
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1900735
> Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>

TBR=ehmaldonado@chromium.org,gbeaty@chromium.org

Change-Id: Ibd6c6ed272b0c98f82be50cefa521aaee0444f11
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 922150, 1022617
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1904099
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
6 years ago
Garrett Beaty 72a245e4c6 Fetch the input commit ref when both ref and id are specified.
This causes --refs refs/head/master to be added to bot_update calls when
the input build message contains a commit id and the refs/head/master
ref. This is an effective no-op.

When bot_update clones a git repository, it results in HEAD referring to
master in contrast to the non-clone case which results in a detached
HEAD. This prevents fetching refs/heads/master, so detach the HEAD after
cloning.

Bug: 922150
Change-Id: I357a78305020218e9f5d350832a706b8f2b27967
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: infra
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1900735
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
danakj 23247b9932 Don't fetch tags when fetching to deapply a patch.
Bug: 1019824
Change-Id: Ibec0b47067345150dbd2083265c49fb9b6769a3a
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1894408
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
6 years ago