Commit Graph

727 Commits (61e081e39d645f59d0140356eb8367531f6812d3)

Author SHA1 Message Date
KS Yim 781de9e7c4 Update git path for ytdevinfra_github config
R=yim@chromium.org

Bug:375245875
Change-Id: I146b026e4cd1129760d9153efa43c2fd8a37ddf6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6237197
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: K. S. Yim <yim@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
3 months ago
KS Yim 308ab0795e add github version of ytdevinfra config
It uses GitHub mirrow GoB. It also sets the custom vars.

R=yim@chromium.org

Bug:390703833
Change-Id: I5db6eadaeba04e6514fa0ff4e61d931690baac59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6219827
Auto-Submit: K. S. Yim <yim@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
3 months ago
Dirk Pranke e1094f9eb9 Fix gclient config for the `website` project.
The website checkout doesn't have a `src` solution, so
use `website` instead.

Bug: 392668431
Change-Id: I4f488f01c4c63240a5df3f8553e6c637d1bbe9f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6204242
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
3 months ago
Mike Frysinger c9552ffad5 recipes: gerrit: expose new attention set control
Allow recipes to post messages without changing attention set.

Change-Id: I36cab074850e2bbc6f7d12ec080fccd1fd947505
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6172487
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
4 months ago
Mike Frysinger c2096e94de recipes: gclient: define website.git
Change-Id: Ifdab63035d40191eb560257956e3a181e91c8d2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6174012
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
4 months ago
Leonard Grey b60b40cc31 osx_sdk: Add a default version for macOS 15
Bug: 40250422
Change-Id: I90a96592e74380d79382e93797a347814bb0b96c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6165750
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Yue She <yueshe@google.com>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
4 months ago
Fumitoshi Ukai 67acd2b92d Reland "Reland "bot_update: remove cleanup_dir""
This reverts commit 9801061b06.

Reason for revert:
disk_usage returns tuple  (used_disk_space_gb, total_disk_space_gb, percent_used)

so used_disk_space_gb is [0]
and percent_used is [2]

Original change's description:
> Revert "Reland "bot_update: remove cleanup_dir""
>
> This reverts commit 6cbd7a8243.
>
> Reason for revert: breaks checkouts with
>
> ```
> 'tuple' object has no attribute 'used_disk_space_gb'
> ```
>
> e.g. https://ci.chromium.org/ui/p/infra/builders/try/luci-go-try-mac/b8726181266341916785/overview
>
> Original change's description:
> > Reland "bot_update: remove cleanup_dir"
> >
> > This reverts commit e59e28f1d7.
> >
> > Reason for revert: Fix up the issue line
> >
> > Original change's description:
> > > Revert "bot_update: remove cleanup_dir"
> > >
> > > This reverts commit 4cebc13a4e.
> > >
> > > Reason for revert: this breaks Dart's builds
> > > https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/dart2js-unit-linux-x64-release/27481/infra
> > >
> > > Original change's description:
> > > > bot_update: remove cleanup_dir
> > > >
> > > > when git cache is removed, gclient sync fails
> > > > and old checkout is moved into cleanup_dir.
> > > >
> > > > It will cause out of disk error during build
> > > > because cleanup_dir keeps full old checkout and build artifacts,
> > > > which is no longer needed when bot_update
> > > > succeeded to checkout.
> > > >
> > > > Remove cleanup_dir after checkout.
> > > >
> > > > Bug: 388307198
> > > > Change-Id: I3858e718622a1ef2012fe5b80a5d9b128d96d1d4
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6155955
> > > > Commit-Queue: Jie Sheng <jiesheng@google.com>
> > > > Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> > > > Auto-Submit: Fumitoshi Ukai <ukai@google.com>
> > > > Owners-Override: Jie Sheng <jiesheng@google.com>
> > > > Reviewed-by: Junji Watanabe <jwata@google.com>
> > > > Reviewed-by: Jie Sheng <jiesheng@google.com>
> > >
> > > Bug: 388307198
> > > Change-Id: Ifb68c1aaf28e2203ba2c3b5804c2fd4939bbd921
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6159604
> > > Auto-Submit: Alexander Thomas <athom@google.com>
> > > Reviewed-by: Jie Sheng <jiesheng@google.com>
> > > Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
> > > Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> >
> > Bug: 388307198
> > Change-Id: I1c6d922c357943882110233f84111a4cbfb9e7d4
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6158861
> > Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
> > Auto-Submit: Jie Sheng <jiesheng@google.com>
> > Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
>
> Bug: 388307198
> Change-Id: Ia49e544ca44593e6b9da923a075fb30f3e08b704
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6166120
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
> Auto-Submit: Vadim Shtayura <vadimsh@chromium.org>

Bug: 388307198
Change-Id: I32473c5285f79875b95ece383d39e3e90aa33c41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6166240
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
4 months ago
Vadim Shtayura 9801061b06 Revert "Reland "bot_update: remove cleanup_dir""
This reverts commit 6cbd7a8243.

Reason for revert: breaks checkouts with

```
'tuple' object has no attribute 'used_disk_space_gb'
```

e.g. https://ci.chromium.org/ui/p/infra/builders/try/luci-go-try-mac/b8726181266341916785/overview

Original change's description:
> Reland "bot_update: remove cleanup_dir"
>
> This reverts commit e59e28f1d7.
>
> Reason for revert: Fix up the issue line
>
> Original change's description:
> > Revert "bot_update: remove cleanup_dir"
> >
> > This reverts commit 4cebc13a4e.
> >
> > Reason for revert: this breaks Dart's builds
> > https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/dart2js-unit-linux-x64-release/27481/infra
> >
> > Original change's description:
> > > bot_update: remove cleanup_dir
> > >
> > > when git cache is removed, gclient sync fails
> > > and old checkout is moved into cleanup_dir.
> > >
> > > It will cause out of disk error during build
> > > because cleanup_dir keeps full old checkout and build artifacts,
> > > which is no longer needed when bot_update
> > > succeeded to checkout.
> > >
> > > Remove cleanup_dir after checkout.
> > >
> > > Bug: 388307198
> > > Change-Id: I3858e718622a1ef2012fe5b80a5d9b128d96d1d4
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6155955
> > > Commit-Queue: Jie Sheng <jiesheng@google.com>
> > > Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> > > Auto-Submit: Fumitoshi Ukai <ukai@google.com>
> > > Owners-Override: Jie Sheng <jiesheng@google.com>
> > > Reviewed-by: Junji Watanabe <jwata@google.com>
> > > Reviewed-by: Jie Sheng <jiesheng@google.com>
> >
> > Bug: 388307198
> > Change-Id: Ifb68c1aaf28e2203ba2c3b5804c2fd4939bbd921
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6159604
> > Auto-Submit: Alexander Thomas <athom@google.com>
> > Reviewed-by: Jie Sheng <jiesheng@google.com>
> > Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
> > Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
>
> Bug: 388307198
> Change-Id: I1c6d922c357943882110233f84111a4cbfb9e7d4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6158861
> Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
> Auto-Submit: Jie Sheng <jiesheng@google.com>
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>

Bug: 388307198
Change-Id: Ia49e544ca44593e6b9da923a075fb30f3e08b704
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6166120
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Vadim Shtayura <vadimsh@chromium.org>
4 months ago
Jie Sheng 6cbd7a8243 Reland "bot_update: remove cleanup_dir"
This reverts commit e59e28f1d7.

Reason for revert: Fix up the issue line

Original change's description:
> Revert "bot_update: remove cleanup_dir"
>
> This reverts commit 4cebc13a4e.
>
> Reason for revert: this breaks Dart's builds
> https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/dart2js-unit-linux-x64-release/27481/infra
>
> Original change's description:
> > bot_update: remove cleanup_dir
> >
> > when git cache is removed, gclient sync fails
> > and old checkout is moved into cleanup_dir.
> >
> > It will cause out of disk error during build
> > because cleanup_dir keeps full old checkout and build artifacts,
> > which is no longer needed when bot_update
> > succeeded to checkout.
> >
> > Remove cleanup_dir after checkout.
> >
> > Bug: 388307198
> > Change-Id: I3858e718622a1ef2012fe5b80a5d9b128d96d1d4
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6155955
> > Commit-Queue: Jie Sheng <jiesheng@google.com>
> > Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> > Auto-Submit: Fumitoshi Ukai <ukai@google.com>
> > Owners-Override: Jie Sheng <jiesheng@google.com>
> > Reviewed-by: Junji Watanabe <jwata@google.com>
> > Reviewed-by: Jie Sheng <jiesheng@google.com>
>
> Bug: 388307198
> Change-Id: Ifb68c1aaf28e2203ba2c3b5804c2fd4939bbd921
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6159604
> Auto-Submit: Alexander Thomas <athom@google.com>
> Reviewed-by: Jie Sheng <jiesheng@google.com>
> Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>

Bug: 388307198
Change-Id: I1c6d922c357943882110233f84111a4cbfb9e7d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6158861
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Jie Sheng <jiesheng@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
4 months ago
Alexander Thomas e59e28f1d7 Revert "bot_update: remove cleanup_dir"
This reverts commit 4cebc13a4e.

Reason for revert: this breaks Dart's builds
https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/dart2js-unit-linux-x64-release/27481/infra

Original change's description:
> bot_update: remove cleanup_dir
>
> when git cache is removed, gclient sync fails
> and old checkout is moved into cleanup_dir.
>
> It will cause out of disk error during build
> because cleanup_dir keeps full old checkout and build artifacts,
> which is no longer needed when bot_update
> succeeded to checkout.
>
> Remove cleanup_dir after checkout.
>
> Bug: 388307198
> Change-Id: I3858e718622a1ef2012fe5b80a5d9b128d96d1d4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6155955
> Commit-Queue: Jie Sheng <jiesheng@google.com>
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Auto-Submit: Fumitoshi Ukai <ukai@google.com>
> Owners-Override: Jie Sheng <jiesheng@google.com>
> Reviewed-by: Junji Watanabe <jwata@google.com>
> Reviewed-by: Jie Sheng <jiesheng@google.com>

Bug: 388307198
Change-Id: Ifb68c1aaf28e2203ba2c3b5804c2fd4939bbd921
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6159604
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Jie Sheng <jiesheng@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
4 months ago
Fumitoshi Ukai 4cebc13a4e bot_update: remove cleanup_dir
when git cache is removed, gclient sync fails
and old checkout is moved into cleanup_dir.

It will cause out of disk error during build
because cleanup_dir keeps full old checkout and build artifacts,
which is no longer needed when bot_update
succeeded to checkout.

Remove cleanup_dir after checkout.

Bug: 388307198
Change-Id: I3858e718622a1ef2012fe5b80a5d9b128d96d1d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6155955
Commit-Queue: Jie Sheng <jiesheng@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Owners-Override: Jie Sheng <jiesheng@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Jie Sheng <jiesheng@google.com>
4 months ago
recipe-roller a1d858a633 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/8726817546736360641

Please review the expectation changes, and LGTM+CQ.

recipe_engine:
518ce9a6b0
  518ce9a (olivernewman@google.com)
      [engine] Delete unify_json_load_err shim

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

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: Ib93326467a1a37d87b161e66a0f32643b8cc2b11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6138563
Auto-Submit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
4 months ago
Oliver Newman 44a8a8d49a [git] Remove usage of recipe_util.format_ex
This function was a shim to ensure consistency between Python 2 and 3.
It's no longer necessary now that recipes don't support Python 2
anymore, and is being deleted in crrev.com/c/6133284.

Also update two tests to be less sensitive to the exact format of the
summary markdown produced when an exception occurs, since some single
quotes are now changed to double quotes.

Change-Id: Ia8a7bd9be5f03302049f6798c51b8e4e8bdc9784
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6142074
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Oliver Newman <olivernewman@google.com>
Commit-Queue: Oliver Newman <olivernewman@google.com>
4 months ago
Garrett Beaty 58f5357e92 Remove the build_internal_script_slave config.
The gclient config refers to a repo that is no longer used and includes
non-inclusive language.

Bug: 40712760
Change-Id: Id7faec4beefdc4387cd8860910e43cbdcac3625a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6070412
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
5 months ago
Garrett Beaty 3e112dbdb5 Remove gclient configs for repos that are no longer used.
The {master,slave,internal}.DEPS repos haven't been used in years.

Change-Id: I58792a8cc2c5eef075bbb12a796084f7c0d27b66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6068211
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
5 months ago
Garrett Beaty d81e5f52fc Fix exception when not setting output commit with no ref.
crrev.com/c/6049353 updated bot_update.ensure_checkout to comput the
output commit even when not setting the output commit so that callers
could do custom logic for setting output commits while still having
access to the one computed by bot_update. Unfortunately, this changed
behavior for some builds that have set_output_commit set false. When
computing the output commit, if none of the conditions that set the ref
on the output commit were true then an AssertionError would be raised
indicating that the caller should call
buildbucket.set_output_gitiles_commit. With crrev.com/c/6049353, the
assertion can be raised even if set_output_commit is false.

This changes it so that the constraint on the ref field is only enforced
when set_output_commit is true.

Bug: 366409421
Change-Id: Ifb3a39784d75a3c47a7d4a6e2ac9957c29a09938
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6064719
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
5 months ago
Alex Kravchuk 297f5a341c Return out_commit from bot_update.ensure_checkout.
out_commit is parsed from got_revision even when set_output_commit is False. This allows for the calling code to implement its own logic for setting output commit, but still use the commit from bot_update if needed.

Example of usage: https://crrev.com/c/6049557.

Bug: 366409421
Change-Id: I49ce89730fe780d7561077f82797b30fad87e65e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6049353
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Commit-Queue: Alex Kravchuk <alexanderkr@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
5 months ago
Alex Kravchuk 4d581d7b3f Revert "Add parse_commit_position parameter to BotUpdateApi.ensure_checkout."
This reverts commit 66b3972fc5.

Reason for revert: This won't work because chromium_checkout relies on the position being set in the output commit in order to set information for RDB. We'll have to come up with a different solution.

Original change's description:
> Add parse_commit_position parameter to BotUpdateApi.ensure_checkout.
>
> When true and got_revision_cp is present, output commit ref and position are set from got_revision_cp. Default value is true.
>
> For Chrome builds that build from tags we will set parse_commit_position to false to show tags instead of branches on Buildbucket UI, e.g. refs/tags/132.0.6824.0 instead of refs/branch-heads/6824@{#1}.
>
> Bug: 366409421
> Change-Id: I77d01615edb6b791445a06469f80c673c97ad8d6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6000539
> Reviewed-by: Garrett Beaty <gbeaty@google.com>
> Reviewed-by: Scott Lee <ddoman@chromium.org>
> Commit-Queue: Alex Kravchuk <alexanderkr@google.com>

Bug: 366409421
Change-Id: I21a5fc6e011a64fffd1d2ef0689d5a3f3843482c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6037603
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Commit-Queue: Alex Kravchuk <alexanderkr@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
5 months ago
Ben Pastene 33b199ffaf Surface git errors in the build summary for presubmit builds
Occasionally someone will upload a CL whose diff was already landed in
another CL. In the past, the error message from the presubmit build
for their CL has led to confusion. So this tries to clarify it by:
- putting the git stdout from the git cmd in the build summary when it
  fails
- adding a hint about the identical diff in the build summary when it
  sees "nothing to commit" in git's stdout

eg: Before this CL, such builds fail like:
https://ci.chromium.org/ui/p/chromium/builders/try/chromium_presubmit/3035841/infra

With this CL, they'll fail like:
https://ci.chromium.org/ui/p/chromium/builders/try.shadow/chromium_presubmit/3883/infra

Bug: None
Change-Id: I8002e19efce3cae5a11d2e616e4db596afb3b50c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6039934
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
5 months ago
Alex Kravchuk 56d4cf54ae Change BotUpdateApi.ensure_checkout to only have an option to skip commit position parsing for tags.
Rename parse_commit_position parameter to parse_commit_position_for_tags. If input commit ref is not a tag, or parse_commit_position_for_tags is True, execute the old code path. This makes the changes backward compatible with the existing code.

Bug: 366409421
Change-Id: I58405325e406a82c2e255fe5d3d4a2883c98a84a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6035030
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Alex Kravchuk <alexanderkr@google.com>
Reviewed-by: Garrett Beaty <gbeaty@google.com>
5 months ago
Congbin Guo 728e704add Add infradata/cloud-run config
Bug: 379124711
Change-Id: Ia8d313d168d28126fb5ba2733711a44800a96829
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6033533
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Congbin Guo <guocb@chromium.org>
6 months ago
Alex Schulze f37e7f4633 [git] Remove tags / branches filter from ls-remote
The flag to filter for branches was renamed in git 2.46.0 [1] from
`-h` to `-b`. This causes previous versions of git to fail when running
ls-remote.

To be compatible across a version upgrade, a second git call would be
required to retrieve the version and determine the correct flag.
However, the filter feature is not used yet and can also be solved by
specifying the absolute ref path within the recipe. Therefore, this
change removes ls-remote's filter flags.

[1] https://git-scm.com/docs/git-ls-remote/2.42.0

R=machenbach@chromium.org, gavinmak@google.com

Bug: none
Change-Id: I840fb3ac56daf47c798d5c32f00de841b8db2771
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6028418
Auto-Submit: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
6 months ago
Alex Schulze c22f4dc74f [git] Add ls_remote to git recipe module
Call `git ls-remote` to determine the head revision for a branch, or
the revision for a tag. The method is useful for bots which do not
require a checkout.

Bug: none
Change-Id: Ibc01d1fb9c2714bd4d719159dbdaf3d7684ea1e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6012563
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
6 months ago
Alex Kravchuk 66b3972fc5 Add parse_commit_position parameter to BotUpdateApi.ensure_checkout.
When true and got_revision_cp is present, output commit ref and position are set from got_revision_cp. Default value is true.

For Chrome builds that build from tags we will set parse_commit_position to false to show tags instead of branches on Buildbucket UI, e.g. refs/tags/132.0.6824.0 instead of refs/branch-heads/6824@{#1}.

Bug: 366409421
Change-Id: I77d01615edb6b791445a06469f80c673c97ad8d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6000539
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Alex Kravchuk <alexanderkr@google.com>
6 months ago
Yiwei Zhang 6030c2c6af recipe: introduce add_message api
Bug: 378480632
Change-Id: Idcd9decbf965cb9985d48a716e14473cb6ff7579
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6012778
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
6 months ago
KS Yim 37661eea7e Add ytdevinfra config
R=yim@chromium.org
Bug: 374361377
Change-Id: I2c66dd77df67a5323683cbbdb38fe970bfad9293
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6001698
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: K. S. Yim <yim@google.com>
Reviewed-by: K. S. Yim <yim@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
6 months ago
Struan Shrimpton f5ff56488e Expose bot_update step name function
To tag reproduction steps on chromium update we need to generate a tag
for the step. Rather than duplicate this piece of code, expose it
in the bot_update module

Bug: 349529661
Change-Id: Ibed143523b3b1af4de222a8617349b815f0c0aaa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5914637
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
7 months ago
recipe-roller 0a3a3e853e 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/8736234598443121921

Please review the expectation changes, and LGTM+CQ.

recipe_engine:
d571f5d744
  d571f5d (mohrr@google.com)
      [cv] Set output properties on cv and cq modules

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

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: I110b680843e10c0912e9147a7e1d48f5440291e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5879379
Auto-Submit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 months ago
Josip Sokcevic 945cb0c0d7 Add roll_downstream_gcs_deps.py to depot_tools recipe module.
Change-Id: I7b8a8f8e686c89fcb5fe2d27f6b506e53a26d535
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5867087
Reviewed-by: Stephanie Kim <kimstephanie@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
8 months ago
Struan Shrimpton b0024901d3 Add support for tagging bot_update step
In order to make reproduction steps appear on the bot_update step it
needs to have a tag that matches the instruction set on the invocation.

Bug: 349529661
Change-Id: Idcf75715ea4a64a5c6d9571f4f5485613864b7da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5754258
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
9 months ago
Allen Li e645ef94ae [gerrit_client] Uprev vpython python to 3.11
Tested by running `vpython3 gerrit_client.py` so at least everything
loads with 3.11

Change-Id: I925fce1ce3fd4c427a57fb590c991bf49b99c1be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5741852
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
9 months ago
Garrett Beaty c254a3067f Remove the BUILDSPEC_VERSION field from gclient config.
Buildspecs haven't been used since 2021. Downstream code that sets the
BUILDSPEC_VERSION field has been removed.

Bug: 353561017
Change-Id: Iaf88ec73bed6b371a97fbdb6588a74b34e3b87fc
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/+/5718628
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
10 months ago
Fumitoshi Ukai 56dc8e9eee bot_update: show disk usage after checkout too
bot_update sets disk usage before checkout in step_text.
This CL adds disk usage after checkout in step_text.

Bug: 351868766
Change-Id: I2d99c8a3e0bd8829df30d349789ac8be7086ccf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5717616
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
10 months ago
Brian Ryner 413d471e07 Reland "Add a recipe property to override bot_update's STALE_PROCESS_DURATION."
This is a reland of commit 1c0a575c4c

The builders that were broken by this CL have been fixed in
https://chromium-review.googlesource.com/c/openscreen/+/5717304 and https://dawn-review.googlesource.com/c/dawn/+/199014 .

Original change's description:
> Add a recipe property to override bot_update's STALE_PROCESS_DURATION.
>
> Bug: 353444802
> Change-Id: I8d174e28fbbd552be591c8a4c1308a29de47d0b6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5713191
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Commit-Queue: Brian Ryner <bryner@google.com>

Bug: 353444802
Change-Id: Ie41cb06dda2cf8293a42c5c4ebd31a7aaadef4df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5719349
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Brian Ryner <bryner@google.com>
10 months ago
Brian Sheedy b4102e43a0 Revert "Add a recipe property to override bot_update's STALE_PROCESS_DURATION."
This reverts commit 1c0a575c4c.

Reason for revert: Suspected of causing infra failures on
bots like https://ci.chromium.org/ui/p/dawn/builders/try/cmake-linux-clang-dbg-x64/b8742144151501823569/infra.
Long-term should be fixed by removing the invalid configs,
but need to prevent these infra failures for now.

Original change's description:
> Add a recipe property to override bot_update's STALE_PROCESS_DURATION.
>
> Bug: 353444802
> Change-Id: I8d174e28fbbd552be591c8a4c1308a29de47d0b6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5713191
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Commit-Queue: Brian Ryner <bryner@google.com>

Bug: 353444802
Change-Id: I0a109304c6de16f96ceff7ca1e64e3cd10d6cf4a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5718634
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Brian Ryner <bryner@google.com>
10 months ago
Brian Ryner 1c0a575c4c Add a recipe property to override bot_update's STALE_PROCESS_DURATION.
Bug: 353444802
Change-Id: I8d174e28fbbd552be591c8a4c1308a29de47d0b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5713191
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Brian Ryner <bryner@google.com>
10 months ago
Rob Mohr 46087b7a8c [gerrit_client.py] Add restore command
Bug: 40275665
Change-Id: I9b26758b958473dd839b114347b01249cc0a7c46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5545091
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
10 months ago
Rob Mohr 2377dbfdbc [recipes] Migrate away from deprecated post_process checks
Migrate away from ResultReason/ResultReasonRE. Also, do some minor
reformatting.

Bug: 339834630
Change-Id: Ibad136c4389955476af87bcc148581bea408415c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5565454
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Rob Mohr <mohrr@google.com>
11 months ago
Rob Mohr bed44e68b7 recipes: Support multiple changes in gerrit tests
Add get_multiple_changes_response_data() to Gerrit's test_api.

Bug: 40275665
Change-Id: I2a3b986ec0a5481cd16b887601661d26b8f0589c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5553034
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
12 months ago
Garrett Beaty 4750254802 Remove json and presentation attributes from bot_update.Result.
All downstream uses have been updated, so the backward compatibility is
no longer necessary.

Bug: 339472834
Change-Id: Ie8434168e7d1255561e5f5434ea811f753f88835
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5534148
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
12 months ago
Garrett Beaty 1a8da2d914 Remove the src_root attribute from gclient config.
The src_root attribute of the gclient config is not used.

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Change-Id: I9889e944a4a849e8dc0f4de78698e32b2440843b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5536335
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
12 months ago
Garrett Beaty fd81abb19d Return a custom result type from bot_update.ensure_checkout.
In order to facilitate removing uses of api.path.checkout_dir from
downstream repos, this change adds a custom return type for
bot_update.ensure_checkout. Now instead of a standard step result, an
object of Result will be returned. Result records the relevant paths
(directory where the checkout was performed, the repo that was checked
out and the repo that was patched, if any). This provides the caller
the ability to work in any of these directories without using
api.path.checkout_dir and without requiring boilerplate to construct
the paths. It also includes some attributes that provide details from
within the json output to abstract that out.

Bug: 329113288, 339472834
Change-Id: I2ec6db635c5b799bdb65d4e9364e7d99aae4159e
Recipe-Manual-Change: build
Recipe-Manual-Change: build_limited
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5523194
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
12 months ago
Garrett Beaty 7cc2678a05 Simplify overriding test data for bot_update.
Currently overriding test data for bot_update requires specifying the
json output and in some cases the corresponding retcode. It's easy to
set the json output to values that wouldn't match the build inputs. This
change adds module test data for bot_update to have the bot_update fail
to checkout or fail the patch without having to manually specify the
json output as well. It also adds module test data for controlling
whether there are commit positions in the output properties.

The fail_patch property of the bot_update module was removed since it
was only used by tests to force the patch failure codepath and now the
fail_patch module test data can be used instead.

Change-Id: I03f61c2ff95c2561b746efbaae8e35b520027a2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5518044
Reviewed-by: Scott Lee <ddoman@chromium.org>
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
1 year ago
Garrett Beaty a60f90e38e Remove the root parameter from output_json.
The downstream use has been switched to set patch_root instead so the
root parameter is no longer necessary.

Change-Id: Id0b20265550daa7e93af0ebf717d48db56164037
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5514209
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Garrett Beaty d3299d9986 Match patch behavior for bot_update test data to production.
In production, if there is no patch, then the bot_update output will
have the value for the patch_root key set to null and the patch_failure
key will only be set if there was a patch failure. This updates the
output_json test API method so that the json matches this behavior. The patch_root parameter was added that will be used to set the
patch_root key. The root parameter is preserved for now until a
downstream use passing the argument by keyword can be updated.

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: I0c34a41ff18bce2900a2f176ff992e6d147abbd4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5506838
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Rob Mohr 7438a7cd4c [recipes/*_sdk] Replace '[*]' paths in comments
Replace uses of '[START_DIR]' and '[CACHE]' in comments with
api.path.start_dir and api.path.cache_dir. This doesn't actually keep
anything from breaking, but it ensures the comments stay correct.

Change-Id: I4087925a29e3e9a4cb47e044733ab6109cb659bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5492788
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Rob Mohr <mohrr@google.com>
1 year ago
Rob Mohr 4246ba023a Replace remaining Path.join() calls
Use Path.joinpath() or the / operator instead of Path.join().
Eventually, config_types.Path will be replaced with pathlib.Path, which
doesn't have a join() method. In general, if the substitution was simple
the / operator was used. Otherwise, '.join(' was replaced with
'.joinpath('.

Change-Id: Iff2eb0abd9fdb0d3b3bca281c7c5436f932a5380
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5483206
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Rob Mohr 6ba67afd6f Replace Path.join() with / and Path.joinpath()
config_types.Path will soon be replaced with pathlib.Path and
pathlib.Path doesn't have a join() method.

Bug: 329113288
Change-Id: I81bf607ffb41d84928af0eea06be78540b9912d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5467697
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Rob Mohr 1dae848026 Replace use of "cq" module with "cv"
Bug: 333811087
Change-Id: I85b7d5c38defc03a580685654d43d204dbfa5231
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5454164
Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Rob Mohr 2f8f787dec Use new path module attributes
Bug: 329113288
Change-Id: Ib762c83c7558cd522e6bd3f78e2d38684ce82a76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5444201
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
1 year ago