Commit Graph

10749 Commits (779f70fd7cbeea89c93b876632c31bb573b7a6ac)
 

Author SHA1 Message Date
Robert Iannucci 5f585948d4 [gerrit_util] Add opt-in SSOAuthenticator (reland)
This adds a new authenticator implementation to gerrit_util which
uses the Google corp `git-remote-sso` protocol helper to get
secure tunneled access to the internal hosted Google git services.

It is possible to opt in on Google-managed devices by adding the
following git configuration:

    [url "sso://chromium/"]
        insteadOf = https://chromium.googlesource.com/
        insteadOf = http://chromium.googlesource.com/
    [depot-tools]
      useNewAuthStack = 1

This CL was uploaded using the new authenticator with no
.gitcookies file present on disk.

This was originally landed in
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5586799

It was reverted because it caused the error:

    AttributeError: module 'functools' has no attribute 'cache'

https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8745365240091840049/+/u/Commit_log_for_uploaded_revision/stdout

So we changed functools.cache -> functools.lru_cache

Bug: 336351842
Change-Id: I0dcb04ada8281a60792ae08777b01ecf116f2a8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5627834
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Yiwei Zhang fdfc24e36a run tests using python 3.8
This is achieved by duplicating vpython spec in tests directory and
changing the python version to 3.8. The reason for this change is that
even though depot_tools support 3.11, the entire infra is still on
3.8 so any new 3.8+ feature used in depot_tools may break infra test and
it has already happened couple of times.

Bug: 346784198
Change-Id: I7dbd0d926da21854abf47af2c2f6edfeec2c5c4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5625090
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
11 months ago
Aleksey Khoroshilov c0883c509e Fix git diff calls when a lot of files modified in a branch
Running a command line longer that 32k on Windows lead to issues (as
usual). We run git diff in multiple scenarios on a list of changed
files. This list is not partitioned and may lead to a command line
much longer than OS can allow.

This change replaces BuildGitDiffCmd with RunGitDiffCmd that splits
the file list internally and runs git diff multiple times if required.

Change-Id: Icfd8efc7520105b8d98125e90bb96c2bb9bd3a0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5613673
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Aleksei Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
11 months ago
Takuto Ikuta e757e08663 Revert "[gerrit_util] Add opt-in SSOAuthenticator."
This reverts commit 02091c6148.

Reason for revert:
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8745365240091840049/+/u/Commit_log_for_uploaded_revision/stdout

Original change's description:
> [gerrit_util] Add opt-in SSOAuthenticator.
>
> This adds a new authenticator implementation to gerrit_util which
> uses the Google corp `git-remote-sso` protocol helper to get
> secure tunneled access to the internal hosted Google git services.
>
> It is possible to opt in on Google-managed devices by adding the
> following git configuration:
>
>     [url "sso://chromium/"]
>         insteadOf = https://chromium.googlesource.com/
>         insteadOf = http://chromium.googlesource.com/
>     [depot-tools]
>       useNewAuthStack = 1
>
> This CL was uploaded using the new authenticator with no
> .gitcookies file present on disk.
>
> R=ayatane@chromium.org, ayatane@google.com, ddoman@chromium.org
>
> Bug: 336351842
> Change-Id: Ia3eccb77ebf1cdc863513ac095bf65ede6adda43
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5586799
> Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Allen Li <ayatane@chromium.org>
> Reviewed-by: Scott Lee <ddoman@chromium.org>

Bug: 336351842
Change-Id: I412d560955ff78169a83b527d2fe2dd0a2c5d50d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5624014
Owners-Override: Patti Lor <patricialor@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Patti Lor <patricialor@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
11 months ago
Takuto Ikuta 58cb6562e3 Revert "[gerrit_util] Add dogfoodable luci-auth Authenticator."
This reverts commit f871d80a7e.

Reason for revert:
This is to revert https://crrev.com/c/5624014.

Original change's description:
> [gerrit_util] Add dogfoodable luci-auth Authenticator.
>
> Inspired by https://chromium-review.googlesource.com/c/5577744.
>
> This implementation allows toggling the entire new-auth-stack with
> the git configuration:
>
>     [depot-tools]
>         useNewAuthStack = 1
>
> Additionally, you can set:
>
>     [depot-tools]
>         newAuthSkipSSO = 1
>
> To intentionally skip SSOAuthenticator for now while doing local
> evaluation of these auth methods.
>
> This CL was uploaded without gitcookies using the new luci-auth
> Authenticator.
>
> Subsequent CLs will adjust creds-check and EnsureAuthenticated to
> work correctly with the new auth stack.
>
> R=ayatane@google.com
>
> Bug: 336351842, 336652327
> Change-Id: I0eb6d82ca106ddd114b74f63d8cda4c5a7b70c86
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5590324
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Reviewed-by: Scott Lee <ddoman@chromium.org>
> Commit-Queue: Allen Li <ayatane@chromium.org>

Bug: 336351842, 336652327
Change-Id: I7c947760a096f48bdac3d640f71e40ad10fe6f3e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5624015
Owners-Override: Patti Lor <patricialor@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Patti Lor <patricialor@chromium.org>
Reviewed-by: Patti Lor <patricialor@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
11 months ago
Richard Wang 6f180c0a23 Use $HOME/.config/depot_tools on linux for .cfg files
Or $XDG_CONFIG_HOME/.config/depot_tools if set

A followup CL can add support for win/macos.

Bug: b/345092320
Change-Id: I877baa4d7fd912b42cfcd88ad0aa347b700a89f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5604606
Commit-Queue: Richard Wang <richardwa@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
11 months ago
Allen Li 441cd5c465 Revert "[cipd] Add git-credential-luci"
This reverts commit 165fdee7e6.

Reason for revert: broke build

Original change's description:
> [cipd] Add git-credential-luci
>
> This can be used for OAuth to Gerrit (in lieu of gitcookies).
>
> Bug: b/335483238
> Change-Id: Ief933ca0003b9f85e14aad1596b66b134311ea39
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5620638
> Reviewed-by: Scott Lee <ddoman@chromium.org>
> Commit-Queue: Allen Li <ayatane@chromium.org>

Bug: b/335483238
Change-Id: I95bf6d85313e06afcd6045f93898153ef0118b3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5620639
Owners-Override: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Auto-Submit: Allen Li <ayatane@chromium.org>
11 months ago
Ben Pastene fd85601398 git_cl: Remove support for '--clobber' arg
The chromium recipe (and only the chromium recipe?) currently reads this
prop to trigger a clobber build. But support for that in the recipe is
being removed in https://crrev.com/c/5620860. So this removes the
ability to set that arg via `git cl try`. Across all chrome/chromium
builders, that arg was only passed in six builds in the past year. So
it's very unlikely anyone depends on it, or will notice it's gone.

Bug: 346363294
Change-Id: Icf05c9a2fd6f2e9239c735e4c5507aee9a26e0e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5620634
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
11 months ago
Robert Iannucci f871d80a7e [gerrit_util] Add dogfoodable luci-auth Authenticator.
Inspired by https://chromium-review.googlesource.com/c/5577744.

This implementation allows toggling the entire new-auth-stack with
the git configuration:

    [depot-tools]
        useNewAuthStack = 1

Additionally, you can set:

    [depot-tools]
        newAuthSkipSSO = 1

To intentionally skip SSOAuthenticator for now while doing local
evaluation of these auth methods.

This CL was uploaded without gitcookies using the new luci-auth
Authenticator.

Subsequent CLs will adjust creds-check and EnsureAuthenticated to
work correctly with the new auth stack.

R=ayatane@google.com

Bug: 336351842, 336652327
Change-Id: I0eb6d82ca106ddd114b74f63d8cda4c5a7b70c86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5590324
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Allen Li 165fdee7e6 [cipd] Add git-credential-luci
This can be used for OAuth to Gerrit (in lieu of gitcookies).

Bug: b/335483238
Change-Id: Ief933ca0003b9f85e14aad1596b66b134311ea39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5620638
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Yiwei Zhang 413b558c6c remove weekly and wtf commands
Those 2 commands have been broken since the introduction of gcs dep as
it tries to run a git command aginst path to a gcs dep. Since nobody
has complained so far, it's safe to assume the command is never used
by anyone today, therefore, it should be safe to delete.

Bug: 345486495
Change-Id: Ia27e5e8486f790234bd66e890e995f1d5c14f9c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608374
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Robert Iannucci 02091c6148 [gerrit_util] Add opt-in SSOAuthenticator.
This adds a new authenticator implementation to gerrit_util which
uses the Google corp `git-remote-sso` protocol helper to get
secure tunneled access to the internal hosted Google git services.

It is possible to opt in on Google-managed devices by adding the
following git configuration:

    [url "sso://chromium/"]
        insteadOf = https://chromium.googlesource.com/
        insteadOf = http://chromium.googlesource.com/
    [depot-tools]
      useNewAuthStack = 1

This CL was uploaded using the new authenticator with no
.gitcookies file present on disk.

R=ayatane@chromium.org, ayatane@google.com, ddoman@chromium.org

Bug: 336351842
Change-Id: Ia3eccb77ebf1cdc863513ac095bf65ede6adda43
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5586799
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
11 months ago
recipe-roller 5aedf859be 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/8745401249497488129

recipe_engine:
e0c5ee5115
  e0c5ee5 (bpastene@chromium.org)
      Rename path module's cleanup dir from 'recipe_cleanup' to 'rc'

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: I1bffd90fe29425f0785a13b14b26c9b8041697ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5620633
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>
11 months ago
recipe-roller e30d8fac34 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/8745491846482450177

recipe_engine:
76cc89d9b3
  76cc89d (mohrr@google.com)
      [config_types] Remove deprecated Path methods

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: I27c37cf8270f9792a8eb6114c63ae38dd064fefb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5617610
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>
11 months ago
recipe-roller 927e02b156 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/8745503171172475121

recipe_engine:
ea27cb4d3b
  ea27cb4 (olivernewman@google.com)
      [test] Surface summary_markdown in case of status mismatch

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: I9a8df99a2fafbcca23a6483e32cd5613fbeb6406
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5615930
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>
11 months ago
Yiwei Zhang 954a8d7713 error if roll-dep command is called in Cog environment
Bug: 345486495
Change-Id: Ib48a1e8cbe51eccdd0a56e3105ce2f7b8d0c3dd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608832
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Yiwei Zhang 4a8524d1e9 error if repo command is called in Cog environment
Bug: 345486495
Change-Id: I0a03d210b5662828f65dc45bd0121c33bd6480f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608833
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
11 months ago
Joanna Wang 705b8d2d85 Fix google-java-format/cipd exists check.
Bug: b/345761161
Change-Id: I3e3e7d84d962530b02a345d14ad8c15f57a49838
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5606286
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
11 months ago
Yiwei Zhang dd8b5ea401 fail gracefully if gclient-new-workdir.py is called in non-git env
Bug: 345486495
Change-Id: Ide3f8e6a649694a5e1f730ee0e159f928e287c4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608427
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Yiwei Zhang aa89e07e15 fail if fetch command is called in Cog
Bug: 345486495
Change-Id: I858a4041b54049cc52cf1a15f0aed461f3ddf985
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5606279
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
11 months ago
Joanna Wang b7b7718b47 Support new third_party/google-java-format/cipd/ path.
Bug: 345761161
Change-Id: I23d0c4eceb76706eb286fe87baaf6f93f93747eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608492
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
11 months ago
recipe-roller 56ce75edd1 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/8745779995658400241

recipe_engine:
f698b0fe97
  f698b0f (mohrr@google.com)
      [properties] Remove deprecated legacy() method

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: I244dbc46d76f22b3e755584e21c3b542b4b9f8d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608081
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>
11 months ago
Fumitoshi Ukai e6d8f67fae autoninja: set PYTHONDONTWRITEBYTECODE=1 if not set
during build, lots of python scripts run and generates
lots of pycache *pyc in workspace.
To keep workspace clean, set PYTHONDONTWRITEBYTECODE=1
in autoninja.py

Change-Id: I5ce4c904aa11dd8172672ff9a8e9a06ebf69c9fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5599922
Reviewed-by: Erik Staab <estaab@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Gary Tong <gatong@chromium.org>
Reviewed-by: Gregory Guterman <guterman@google.com>
11 months ago
Fumitoshi Ukai 951578030e siso: set PYTHONDONTWRITEBYTECODE=1 if not set
during build, lots of python scripts run and generates
lots of pycache *.pyc in workspace.
To keep workspace clean, set PYTHONDONTWRITEBYTECODE=1
in siso.py

Change-Id: I725c6745c44410eef4a780b8ffc30fdafd899334
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5606824
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Erik Staab <estaab@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
11 months ago
recipe-roller 089b4f38ae 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/8745851087830519569

recipe_engine:
de58e85243
  de58e85 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 56b720dea312 to 6fb4d5d26773

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: I0822c72f13dd2ed9ba12482b0270611400261cad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5605691
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>
11 months ago
Josip Sokcevic 25b23eb1fd Remove profile.xml.
This file is no longer used by Visual Studio.

Change-Id: I4344ac8ac351eab847555a836c9e363690f137be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5553923
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Yiwei Zhang a4f8f3559a stop vending crosjobs from depot_tools
The command was deprecated in https://crrev.com/i/7202749

Bug: 345486495
Change-Id: I28e1dd286ec4f2dee58144e224783fc586405698
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5605682
Reviewed-by: George Engelbrecht <engeg@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Joanna Wang 1545a081d8 Only sync non_git_sources for IsEnvCog().
Bug: 345321320
Change-Id: I8aca8dca298dd147fa6b88b43632a51852669ea5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5598577
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Robert Iannucci ad3ad021d9 [gerrit_util] Invert Authenticator model.
Instead of having CreateHttpConn manipulate the request, with the
Authenticator only able to provide the Authorization header value,
the Authenticator now gets the ability to manipulate the entire
HttpConn object.

This will be used for a new Authenticator method which needs to
include a proxy, cookies, and also manipulate the target request
URI, in addition to providing an Authorization header value.

R=ayatane@chromium.org, yiwzhang@google.com

Bug: 336351842
Change-Id: Ia7d0bbfbb907d8ab6c6d12d000f514fa7afc7245
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5585665
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Allen Li <ayatane@chromium.org>
11 months ago
recipe-roller c069eff3f4 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/8746003970993941121

recipe_engine:
c5e2f2ce07
  c5e2f2c (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 93a586d53955 to 0e7802b85394

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: I7d42daab18e1b2f65b491393e1c9743c1a74372b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5599919
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>
11 months ago
recipe-roller ada9211999 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/8746024731971644961

recipe_engine:
d307486ec0~..14d21dc9acafdff1a69bc240a0f993801e1d8c57
  d307486 (mohrr@google.com)
      [recipe.warnings] Move back api.json.read() deadline
  14d21dc (mohrr@google.com)
      OWNERS: Let anyone approve expectation-only changes

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: I9b3c789c48764feb93b62a41e975cf2e76470eb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5598400
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>
11 months ago
recipe-roller 2a18f6d324 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/8746133573528535521

recipe_engine:
d35238406e
  d352384 (mohrr@google.com)
      [buildbucket] Remove deprecated APIs

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: I7356b568bfaa1ad46ce23f2dc09ba8c81f208f29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5593951
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>
11 months ago
Robert Iannucci 840e538154 [gerrit_util] Add stronger type annotations around CreateHttpConn.
This also fixes a potential bug where ReadHttpJsonResponse could
improperly return None if the server had a completely empty reply.
ReadHttpJsonResponse will now return an empty dictionary in this
case (which is the assumption that most of the callsites are
making).

R=yiwzhang@google.com

Bug: 336351842
Change-Id: I0aa88e233563a0685b6c0f32ea77ad3e094b9cbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5585184
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
11 months ago
Gregory NISBET 3963cc6399 [gerrit_util.py] Remove unnecessary imports from gerrit_util.py
Remove the libraries that have no uses according to gd in vim.

BUG=None
TEST=upload this CL

Change-Id: I7fe6bbd54c1a4f00a3d0e3f04be0f02609734e46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5578897
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gregory Nisbet <gregorynisbet@google.com>
11 months ago
Josip Sokcevic 9428cf648b [clang_format] Update clang path
Bug: 336843583
Change-Id: I1ace05b40420894797e68f6beaaea2360a297ba6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5586436
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
11 months ago
Robert Iannucci 6427b94bc2 [git_cl] Refactor EnsureAuthenticated.
This will allow us to invert the main Authenticator API.

R=yiwzhang@google.com

Bug: 336351842
Change-Id: Iebe06f68373b99685809849bcd96371e7634d6ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5582406
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
11 months ago
Scott Lee 8ff5d0caee [depot_tools] auto correct url always
[1] was originally added by an [ancient CL] in 2013.
It runs `git config ...` and checks if if the output is not "False".

It has two problems.
1) `git config` returns False only if the value was set as a text value,
   AND the value is read as a text value. If "False" is set with --bool,
   the value is "false", even if it's read as a text value.

   from https://git-scm.com/docs/git-config
   bool: canonicalize values as either "true" or "false".

   In other words, the existing check would work only if someone sets
   it as a text value with "False".

2) the inline comment, describing the intention, is confusing.
   "Skip url auto-correction if gclient-auto-fix-url is set"

   It's not clear whether it's set to any value? false? true?
   Nevertheless, what the code actually does is to auto-correct the URL,
   unless the config is set to False, which would unlikely be true, due
   to (1). To make it work, someone needs to set it with "False" as
   a text value, but "False" is not even a valid string value for
   the corresponding legit boolean value that git config --bool defines.

Therefore, depot_tools had auto-corrected the URL, if the config is
- set to "False" as a boolean value
- set to true, false, bla, foo, bar, or any value
  other than "False" as a text value.
OR
- unset

That's how the code had behaved from 2013 to 2024.

In Feb 2024, https://crrev.com/c/5280779 changed the behaviour.
It replaces the dubious check with GetConfigBool(), which may sound
correct by itself.
i.e., auto-correct if "remote.origin.gclient-auto-fix-url" is set to
"true".

However, it doesn't match the existing behaviour, which
auto-correct the URL regardless of the config. Depot tools had the
behaviour for 11 years. Fixing it is probably not the best decision.

This CL doesn't exactly recover the existing behaviour. Instead,
it removes the check. As a result, even if someone sets the config
with "False" as a text value, depot_tools will auto-correct the URL.

[1]: 3b9212b7ee:gclient_scm.py;l=764-768
[ancient CL]: https://chromiumcodereview.appspot.com/15325003

Bug: 342445995
Change-Id: Idc62f803f2ef1beb11a93a58432867ce16226da7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5572721
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
11 months ago
Josip Sokcevic 0a4852e19d Add clank/orderfile to deletion blocklist
Bug: 343721296
Change-Id: If4907b284246c2952f8da23a47ef5674e50c7ada
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5584808
Reviewed-by: Sky Malice <skym@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
11 months ago
Fumitoshi Ukai da5e2f948a autoninja: fix for no args
need to split input_args[1] even if it doesn't contains " ",
e.g. when input_args[1] == ""

Bug: b/343172216
Change-Id: I32d9346063534ea2b4f891fd596c7ec02ab10dbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5583415
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Richard Wang <richardwa@google.com>
Reviewed-by: Richard Wang <richardwa@google.com>
11 months ago
Josip Sokcevic e99a4f1cf1 Add instrumented libraries to denylist
R=yiwzhang@google.com

Bug: 343199633
Change-Id: Ifbda6faf4bce589f47fb694cbd1e8190ac7046ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5583409
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Robert Iannucci c57b7ed364 [gerrit_util] Change Authenticator API to return proxy info.
This will be used with an upcoming SSOAuthenticator implementation
which will need to proxy all http requests for Googlers.

R=ayatane, gavinmak@google.com

Bug: 336351842
Change-Id: If8cbb8db51fce198e704f109232868421130b40c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5582100
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
11 months ago
Josip Sokcevic 11ed5e0222 Reland "[gclient] Delete GCS output_dir on download"
This is a reland of commit 7d95eb2eb0

Additional changes:
* introduce deletion blocklist

Original change's description:
> [gclient] Delete GCS output_dir on download
>
> GCS output_directory needs to be cleaned up prior to extracting new
> content. At the same time, it can't be cleaned up by individual GCS
> fetcher as there can be multiple objects in the same output_dir.
>
> This change adds a top level support to delete old GCS output_dir. If
> any of objects need to be downloaded, the output_dir will be completely
> deleted and all objects will be redownloaded.
>
> R=jojwang@google.com
>
> Bug: 342522902, 338612245
> Change-Id: Icbe4f1238cac54d7390bbb9b6fc5f17c538cca62
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5570466
> Reviewed-by: Joanna Wang <jojwang@chromium.org>
> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>

R=jojwang@google.com

Bug: 342522902, 338612245
Change-Id: Ib5335cddfd60fb4d7da54e16aacb71b11413108e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5581228
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
11 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
Josip Sokcevic 499342211b [GCS] Add prefix option to upload_to_gs_f_c
R=jojwang@google.com

Change-Id: I23e903d3e1baca854ad44fd3c96b9d0591bf2fe4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5582089
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
11 months ago
Junji Watanabe 58c6521691 Add per-file autoninja_test.py=file://BUILD_OWNERS to tests/OWNERS
Change-Id: I0f2edc79ba52296d21a8303608c3231cb87bae4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5568703
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
11 months ago
Peter McNeeley dd0dd62997 Provide documentation for title option
Perhaps this is a linux convention but it was not obvious to me that
'y' would use the default.

Change-Id: I5aedcb365828015effa64d41153f6cb9c9318dfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5580992
Commit-Queue: Peter McNeeley <petermcneeley@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
11 months ago
recipe-roller 84ef52b4df 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/8746624937679717185

recipe_engine:
8324480341
  8324480 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 2bb12046ab13 to 3c691526411b

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: Idcd3049e6b75a3c8531d7975dec10ec99bf6495d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5576771
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>
11 months ago
recipe-roller 67896a0860 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/8746638150019679505

recipe_engine:
1a909a429e
  1a909a4 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 92ccbacc35ac to 7dc2571edcbd

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: Ia802ec9f1fca334aac161ae3e82592c0d4d4ad18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5576770
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>
11 months ago
recipe-roller 73a5b5cf7b 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/8746657020235499825

recipe_engine:
045c03f589
  045c03f (mohrr@google.com)
      [post_process] Add deprecation warnings

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: I107cf50d0cfcda2746b22ea88b334a75afbed7dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5578675
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>
11 months ago
Josip Sokcevic f318db0055 [GCS] Allow upload of the entire directory to GS
Allow users to upload the entire directory by providing . or ./ as the
path.

R=jojwang@google.com

Bug: 343199633
Change-Id: Idf2a6b27577bb9ef153e096f00367084daab9239
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5578674
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
11 months ago