Commit Graph

10809 Commits (495e14b7b6fb55cfb481d9e4d4fa4ea10bd28603)
 

Author SHA1 Message Date
Gavin Mak 495e14b7b6 Add flush_cache flag to input_api.change.NewContents
NewContents always reads from cache, but it is sometimes useful flush
cache and use NewContents as a way to read the updatedcontents of a
file.

For example, some presubmit checks run formatters and check if any files
are modified. Many of these use `git diff` but that isn't available in
a non-git workspace, so checks will have to rely on reading contents
directly.

Bug: b/333744051
Change-Id: I3b3f4c88cc130607020ad599bbc15616d559725c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5740609
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
7 months ago
Allen Li 8dde9800ee [git_auth] Rename GitAuthConfigChanger
Bug: b/351071334
Change-Id: Ia12bf72bfaef11768cb60ba0631aafd5ffc9f1fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5739676
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
7 months ago
Allen Li fed7aa526c [git_auth] Rename GitAuthMode
Bug: b/351071334
Change-Id: I29bfdff79e04d2df3df62019fc0c7dfd87dd302f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5739675
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
7 months ago
Allen Li a61e517b45 [git_auth] Move Git auth stuff to new file
Needs to be imported by gclient

Bug: b/351071334
Change-Id: Ibcb7c5541ffab6f9302efad863d0c59b8041122d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5739296
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
7 months ago
Allen Li dbaad43b23 [git_cl] Add global+local Git auth configuration to creds check
Adds new Git auth configuration logic which sets up a global config
which applies to all repos for a Gerrit host, as well as a local
config if the current repo has a different user set up (e.g., someone
with multiple emails used across different repos for the same Gerrit
host).

Bug: b/351071334
Change-Id: I3a73a50b7ecc80ba22442de808b7f20a488ffc6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5723271
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
7 months ago
Allen Li 9ddd200cba [git_cl] Remove OLD_AUTH usage
Bug: b/351071334
Change-Id: I0d854fe932e945a75f78bf4559fa46f833dec147
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5739433
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
7 months ago
Robert Iannucci 863573b665 [gerrit_util] Automatically re-warm SSO cookies.
In the event that `git-remote-sso` doesn't yield the expected
cookies, run `git ls-remote` on chromium/All-Projects.

This operation is fairly quick and robust - this fallback code
should only execute at most 1/day.

R=ayatane, yiwzhang

Change-Id: I5290f47e56341e9c4fd3b295ae117650f592dc7c
Bug: 342644760
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5741848
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
7 months ago
recipe-roller 64908716d7 Roll recipe dependencies (trivial).
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/8741423789814082881

recipe_engine:
06e3b45ace
  06e3b45 (kimstephanie@google.com)
      Add step_test_data to luci_analysis.query_stability

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: I295cbe5ee11a3faf552e9aa2963d5682def6edf0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5741982
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
7 months ago
Junji Watanabe d3d4c0ac53 autoninja: Use AUTONINJA_BUILD_ID for RBE_invocation_id as is.
To use build id/invocation id consistently, reclient_helper will set AUTONINJA_BUILD_ID as RBE_invocation_id as is.
The host name information will be added as a metrics label.

Bug: 355127782
Change-Id: I5609ef38d897b19029795adf1b288898986c7c70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5737676
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Michael Savigny <msavigny@google.com>
Commit-Queue: Michael Savigny <msavigny@google.com>
7 months ago
Allen Li b5029f0194 [git_cl] Add NO_AUTH enum
There's going to be a use case to clear auth configuration even after
we remove the old auth stack.

Renumbering is safe because this enum is not stored outside of runtime.

Bug: b/351071334
Change-Id: Ib6522ffa6f1c8d817a37cce48d1abf2fcd7be339
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5727083
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
7 months ago
recipe-roller 1d5771b0fd Roll recipe dependencies (trivial).
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/8741512500362596433

recipe_engine:
fb5d04bfa3
  fb5d04b (kimstephanie@google.com)
      Add generate_stability() to luci_analysis/test_api

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: Id615c25f1f6f515b188262798cc95d9e1e813ed3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5737005
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
7 months ago
Junji Watanabe 8552a27900 autoninja: Generate UUID for AUTONINJA_BUILD_ID inside autoninja.py
Currently, {autoninja, autoninja.bat} scripts generate AUTONINJA_BUILD_ID by calling `python3 -c "import uuid; print(uuid.uuid4())"`.
This CL moves the logic at the beginning `autoninja.py`.

This also reduces the overhead of starting Python interpreter, which
takes around 60ms on my Windows workstaion.

```
> hyperfine python3
Benchmark 1: python3
  Time (mean ± σ):      63.4 ms ±   7.8 ms    [User: 25.7 ms, System: 33.7 ms]
  Range (min … max):    51.0 ms …  80.2 ms    41 runs
```

Change-Id: I93d5b65f3c5542c3a93a3de1f27a5aa5d06c09a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5737673
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
7 months ago
Vadim Shtayura 7ec0494263 Update lucicfg to v1.43.10.
To pick up
https://chromium.googlesource.com/infra/luci/luci-go/+/44dbc894e

R=iannucci@chromium.org

Change-Id: I65ec02d48ecb28e5a888dae35bb90db6d9a5d431
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5734456
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 months ago
John Chen c2aee5cc1f Update pinpoint CLI to latest version
Some old pinpoint CLI changes (e.g.
https://chromium-review.googlesource.com/c/infra/infra/+/5190105)
have never been deployed.

Bug: 350775870
Change-Id: Ieb8ce6a46910a760be5bf7d1117aee23cd98f43c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5735682
Reviewed-by: Chan Li <chanli@chromium.org>
Commit-Queue: Chan Li <chanli@chromium.org>
Auto-Submit: John Chen <johnchen@chromium.org>
7 months ago
Peter Kasting cefaeea592 Avoid bogus lint complaints from `[[(un)likely]]` attributes.
Bug: 40256217
Change-Id: Ia892985d03fc7b8c2316462d1dfe9a1d38c08cfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5735954
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
7 months ago
recipe-roller babe2e0119 Roll recipe dependencies (trivial).
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/8741604981015431041

recipe_engine:
cff306c90b
  cff306c (jiesheng@google.com)
      Reland Update led recipe module api to use rbe_cas_input with e...

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: I0e9dbfc9a08a9867af85848aca36330d9b02f849
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5734454
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
7 months ago
Robert Iannucci a6502426b5 [git_cl] Remove uses of RunGit which interact with git config.
The previous interactions were incorrect w.r.t. scm.GIT's config
cache.

This moves depot_tools towards having one fewer git wrapper
(converging towards scm.GIT).

R=ayatane, yiwzhang@google.com

Change-Id: I507628b53f6a87a1eecbbe3e1e27c1eb6af3b878
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5648617
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
7 months ago
Junji Watanabe 1a616deaac autoninja: Split args before passing it to _upload_ninjalog()
autoninja passes args as a concatenated string.
It needs to be split before _upload_ninjalog().

Bug: 345113094
Change-Id: Ia993233dca9c6a0c2be1cc9080ab063a6db3f8d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5724920
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
7 months ago
Junji Watanabe 14ce8321ec build_telemetry: Print status
It's unclear what the status is.

`build_telemetry status` or just `build_telemetry` prints the status.

Bug: 354726696
Change-Id: Id6d17a263f8ff6bea107499cee3ebe26ee422454
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5732737
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
7 months ago
Junji Watanabe 487e552926 build_telemetry: Fix arg parsing
`nargs=1` makes `args.status` to an array.

Fixed: 354726696
Change-Id: I219ea23a65bc2a960a69ef07c206e909348d536e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5732736
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
7 months ago
recipe-roller ede9a33d98 Roll recipe dependencies (trivial).
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/8741668527649665105

recipe_engine:
d6fc92b071
  d6fc92b (gbeaty@google.com)
      Revert "Update led recipe module api to use rbe_cas_input with...

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: Ia003876b58e8f1cd97b517c11fb9e9dbfe9929cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5732754
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
7 months ago
recipe-roller 31e21628c3 Roll recipe dependencies (trivial).
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/8741671673763714993

recipe_engine:
ee2fe5b895
  ee2fe5b (jiesheng@google.com)
      Update led recipe module api to use rbe_cas_input with edit-pay...

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: I32688f3b80b823d548c2a06f4ebb9daede102678
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5731040
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
7 months ago
Gavin Mak 7a0c603984 Add CherryPickCommit to gerrit_util
This adds a helper function for this cherrypick endpoint:
https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#cherry-pick-commit

Compared to gerrit_util.CherryPick, this doesn't require the caller to
provide a change id.

Bug: b/341792235
Change-Id: I874321d182464af45837194d5cef9d650361b8c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5731033
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
7 months ago
Junji Watanabe 9e16c8519e autoninja: Ignore build_telemetry.cfg
build_telemetry.cfg is generated by build_telemetry.

Bug: 345113094
Change-Id: I193098e641c55e06177bc6cfc6626cea678426b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5724919
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
7 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>
7 months ago
Junji Watanabe cba7859885 ninjalog: Remove ninjalog_uploader_wrapper.py call from autoninja.bat
Bug: 345113094
Change-Id: I33ffee809cbd20e83b6b7fd544eb10bdd23371c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5724918
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
7 months ago
Junji Watanabe 28a7eef132 ninjalog: Store last uploaded .ninja_log mtime
The current logic checks if the mtime of .ninja_log is 2s older or not
to avoid duplicated uploads. This is problematic if post process takes
longer than 2s. e.g. Siso and/or Reclient's post process.

This CL changes the logic to store the last uploaded mtime as `.ninja_log.last_upload` file.

Bug: 353644846
Fixed: 353644846
Change-Id: I7fb82e43808476174644c50d97e984358a43409e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5724768
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
7 months ago
Junji Watanabe cdcdd6efee ninjalog: Add --cmdline ninjalog_uploader.py option
https://crrev.com/c/5669094 dropped `--cmdline` by mistake.

Bug: 345113094
Change-Id: Ia282a4a18195e000ae658ebc96467f797657f4b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5724910
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Junji Watanabe <jwata@google.com>
7 months ago
Junji Watanabe b12257963c autoninja: Replace ninjalog_uploader_wrapper.py and reclient_metrics.py with build_telemetry.py
This CL unifies the opt-in/opt-out handling for build telemetry collections about Reclient and Ninjalog.

The user consent message will be displayed only once at the beginning of a build.

```
❯ autoninja -C out/deterministic-andorid-dbg base
*** NOTICE ***
Google-internal telemetry (including build logs, username, and hostname) is collected on corp machines to diagnose performance and fix build issues. This reminder will be shown 9 more times. See http://go/chrome-build-telemetry for details. Hide this notice or opt out by running: build_telemetry [opt-in] [opt-out]
*** END NOTICE ***

Proxy started successfully.
...
```

Bug: 345113094
Change-Id: Ie5886287c4bd20262be0ff247508ac3869441eb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5669094
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Michael Savigny <msavigny@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
7 months ago
Allen Li 397bf12548 [git_cl] Default to SSO with missing email
This is a safer default if SSO is available

Bug: b/351071334
Change-Id: I2d6b3b5c0fbe3fb7b9783de3d7548be7f14d7391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5723448
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
7 months ago
Allen Li c1aaf922b6 [git_cl] Rename GitConfigMode to GitAuthMode
Make the name more accurate, this mode is specific to auth config

GitAuthConfigMode would be more accurate, but too verbose IMO

Bug: b/351071334
Change-Id: If5c7c07ee5fa62d3ac1026b04654650c1b7043f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5723270
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
7 months ago
Allen Li 7b3067fa3d [git_cl] Improve new_from_env documentation
Bug: b/351071334
Change-Id: Idde2605c7e11bd21ff18a9a5a5ed5ef58ae12158
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5723269
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
7 months ago
Allen Li 9a92cd9b69 [git_cl] Fix ShouldUseSSO tests
They weren't testing what they were supposed to be testing and just
happened to pass.

Bug: b/351071334
Change-Id: I2cdd4fe3dc4b09509c73042e81c78949da5f9ac0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5723254
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
7 months ago
recipe-roller 6b2428d47d Roll recipe dependencies (trivial).
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/8741932139855414353

recipe_engine:
fb0ef833f4
  fb0ef83 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 106f3c7269cc to 771ea9a614a1

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: I3b9fe0a8343532c100e39ddde22152bc418639dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5727080
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
7 months ago
Allen Li 91937bf196 [git_cl] Parametrize email in ShouldUseSSO
Moves the dependency on Git+cwd up the call stack

Bug: b/351071334
Change-Id: Ia313f9d4720ee10398b757217c333118e9fc7341
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5723091
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
7 months ago
Allen Li e7cc4c93c0 [git_cl] Improve docstring
Bug: b/351071334
Change-Id: Id28e9d87c517ea0ad6c4a939ce85b52fc6f55810
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5723090
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
7 months ago
Allen Li ead6e4d2fc [git_cl] Parametrize cwd in new_from_env
We need to be able to do this from different dirs later.

Bug: b/351071334
Change-Id: I18dd2c71ea52d79a56ccaee88a12be97465b9d2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5723089
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
7 months ago
Allen Li 4986d4a74b [git_cl] Parametrize cwd in ShouldUseSSO
Remove implicit/global assumptions which could affect tests.

Bug: b/351071334
Change-Id: Ie266228f404b768cb539fdc17dddbbb13693e939
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5723208
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
7 months ago
Allen Li dbebea0aa2 [git_cl] Add apply_global
Bug: b/351071334
Change-Id: I235eb26cd46a82251b3a757edd37961bce067522
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5719714
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
7 months ago
Allen Li 2fe4794943 [git_cl] Fix cookie setting
Bug: b/351071334
Change-Id: I0245e38b71b8c65e77dcc2aeee040121c725b440
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5718644
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 months ago
Allen Li fa224cdb07 [git_cl] Add _shortname property
Removes redundant param

Bug: b/351071334
Change-Id: I1040f72df49851fe87e5ea9bf5e9e2fb50ca46b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5718640
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
7 months ago
Scott Lee 1c81122f69 [depot_tools] retry git config if it lock-fails
If git config set is executed, it writes the new content into
a temp file (but called lock-file) and then replace .gitconfig
with it.

However, if it cannot create the lock file, it returns an error.
With this CL, if git config fails with the lock file error,
depot_tools will retry it at most 5 times with 0.2s interval.

It's found that there are applications, such as vscode extensions,
executes `git config set` frequently, and those could often cause
unexpected interruptions to ongoing `git rebase-updates`
by the lock failure.

Bug: 351950514
Change-Id: I985af0d8b7458dbf47cd6baa857dc5adccf15031
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5705561
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
8 months ago
Allen Li 5a723500c0 [git_cl] Add _base_url property
Makes __init__ a bit cleaner, and planning to make _shortname a
property also next, since it can be derived from _remote_url

Bug: b/351071334
Change-Id: I12f4363723172a9cdaba37f6beb8fa37bbf09d72
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5718639
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
8 months ago
Robert Iannucci 14ddf6e8ba [scm] Refactor git config state to be fully mock-able.
Previously little bits of the scm.GIT were mocked (like SetConfig,
and GetConfig, but not the other config related methods).

This changes things so that the git config state is a class whose
logic is shared between prod and test, with a 'real' and 'test'
implementation which know how to load and save configuration at
a low level.

R=yiwzhang

Change-Id: I1dc11b550908862607ea539de7fa60fbce30e700
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5660891
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Allen Li <ayatane@chromium.org>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
8 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>
8 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>
8 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>
8 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>
8 months ago
recipe-roller 88f793b4be Roll recipe dependencies (trivial).
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/8742202671268774241

recipe_engine:
de216718b3
  de21671 (mohrr@google.com)
      [path] Remove api.path[]

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: I4576bf8a5db1390335fe2b0d7420509d3740816e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5715972
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
8 months ago
Chenlin Fan 0b624d3df8 New vpython to depot_tools.
9eac71489c0776ea43565f9692c96312b2fc1676 3pp: limit the concurrency for compiling pyc to 4
1fadd9de253d2c327a8be880072b80979abe9ae8 cipkg: add support for more cipd package properties

Change-Id: I83bc0ee8a70eba1c4d1ea75e8218369b86418388
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5711210
Commit-Queue: Chenlin Fan <fancl@chromium.org>
Reviewed-by: Brian Ryner <bryner@google.com>
8 months ago