Commit Graph

10704 Commits (f4e8e13e8bc5673347f86e1be3ec4ccbf1a440c2)
 

Author SHA1 Message Date
Allen Li f4e8e13e8b [gerrit_util] Add linked account detection for SSO
Bug: b/348024314
Change-Id: Ic982de2892769870805407c6a00856943133dd62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5651293
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
recipe-roller 62b6af34ff 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/8744027194984575153

recipe_engine:
9bb9bf275f
  9bb9bf2 (zijiehe@google.com)
      [exception-db] Include inv_extended_properties_dir in rdb

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: I1bc9bb4201a5c687ac2a43b7ab8d0e1bf211a033
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5660888
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
Allen Li 459e1a54a5 [gerrit_util] Add ChainedAuthenticator
Because we need to dynamically determine whether to use SSO.

Bug: b/348024314
Change-Id: I5ac768f1e0c20254b4cfd4815270ee4e2b9a5544
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5660884
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
11 months ago
Allen Li 9f0e78e146 [git_cl] Append extra credential helper option
Bug: b/348024314
Change-Id: Ic7e1682812edcac878565bd79f002b40c018d95c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5655833
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Allen Li 4f1cfb994f [scm] Add append to SetConfig
Bug: b/348024314
Change-Id: Ib2066594806ffdf5f6941468e91a9ad7b8a02bef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5655832
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Allen Li 7a9bffe87f [scm] Sort SetConfig keyword arguments
Bug: b/348024314
Change-Id: I84cc44b41fbfd90f7b6bd58b6128bc82a1706322
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5655831
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Peter Birk Pakkenberg 6eeb55de17 Add --tree option to rebase-update.
I often find myself working on stacked changes, and this option will
make it easier to integrate changes into downstream CLs.

With `git rebase-update --current --tree --no-fetch`, it is possible
to only rebase the current chain of changes, without touching any other
local branches that may exist.
This is beneficial both for speed, and to avoid having to resolve merge
conflicts on branches unrelated to the changes you are currently working
on.

Change-Id: I2d3853ad5aad6c74db0ae26ff8d27d14dcaed3e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5546383
Auto-Submit: Peter Pakkenberg <pbirk@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
11 months ago
Yiwei Zhang e6f497f72b gclient: resolve symlink in gclient_entries before checking with current path
This allows repo to be symlinked in the workspace and gclient config is
pointing to the symlink. For example, if repo is checked out at
`${WS}/chromium`, a symlink is created from `${WS}/src` and ${WS}/.gclient 
is pointing to `${WS}/src`, when the code is trying to determine the
gclient root with cwd=`${WS}/chromium/XXX/XXX`, the code won't treat ${WS}
as the workspace root. Because .gclient_entries all started with `src/`
and `${WS}/chromium/XXX/XXX` won't match anything in .gclient_entries.

The fix here is to calculate the realpath (i.e. resolving the symlink)
for all paths in .gclient_entries and path_to_check before comparison.

Change-Id: I914ba5a7131588fa99d6900ada954f3694dda197
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5656593
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
11 months ago
Jordan 7e547050e8 Updating Revision presubmit to check for valid commit hash
Bug:b/349274008
Change-Id: I6ce8f1993bcf78514111d709b69b109e481d18b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5652700
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Jordan Brown <rop@google.com>
11 months ago
recipe-roller bdcdd7c228 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/8744103321749953329

recipe_engine:
37f8ad4242
  37f8ad4 (gbeaty@chromium.org)
      Allow recipes to import the typing module.

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: I10716afee707cd5a43cd26fda6643ccd6e72b1e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5657730
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
Allen Li 0d470211d6 [git_cl] Move new auth handling up in creds-check
The CookiesAuthenticator is mutually exclusive with new auth.

Bug: b/348024314
Change-Id: I70f2e1976b54572c330fcc8acff30e8448e540ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5651990
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Allen Li cb5a8a3315 [git_cl] Fix ShouldUseSSO call
(This did not error since this code path is unreachable, to be fixed
in future CL)

Bug: b/348024314
Change-Id: I115b36a828d5e525c54cebdbec5480514e395da7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5651989
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
recipe-roller 0525d8afa7 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/8744139811402458369

recipe_engine:
5563d3930b
  5563d39 (nqmtuan@google.com)
      [Recipe-py] Regenerate protos

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: Ie132627ed7e7523ef38003234196a9dc3eac580a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5655370
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 89bb8601f8 roll lucicfg to v1.43.8
To pick up https://crrev.com/c/5651267

Change-Id: I2aa890158c3b5a6db867e01b55fc9f64f49a3ab1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5653561
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
11 months ago
Camillo Bruni f1c7c96958 Add crossbench fetch config
Change-Id: I0ea9d4543e5ace42ee4d42a8ac49d7c77db27d90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5648655
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
11 months ago
Allen Li 334a3acddb [gerrit_util] Fix typo
Bug: b/348024314
Change-Id: I6419ad006535d2763b190d2e4f354816e3fd1c8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5651991
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
11 months ago
Robert Iannucci 821e028ffd [git_cl] Add missing_ok to SetConfig
Split from https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5648617

Change-Id: Id33b509937c4eb9a95f5f603593a79a1c5a3c109
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5651982
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Allen Li 24e9380bc5 [gerrit_util] Add explicit authenticator param
We need this to figure out which authenticator to use, so we need to
override the initial "bootstrap" authenticator.

Bug: b/348024314
Change-Id: I52c5b1db83bc4e2a0a1ec2a07155d352b593cde4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5651288
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Allen Li 3a5d348a0b [gerrit_util] Add ShouldUseSSO helper
Bug: b/348024314
Change-Id: I5b061bc6afeffbc84aee12250732e96a0ad0f32b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5651287
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Gavin Mak 8ac3425344 Create scm.DIFF.GetAllFiles
For a ProvidedDiffChange, the AllFiles method naively returns all files
with rglob("*"). The returned list includes files in nested submodules.
This does not match the behavior of GitChange's AllFiles which uses
git ls-files to find all files.

Implement a new SCM that stops iterating recursively when it
sees a submodule from .gitmodules in the repo root.

Bug: b/323243527
Change-Id: I170d0f1bc4a838acea04779dee3df7fca0bce359
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5648616
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
11 months ago
Allen Li 6359e82d13 [git_cl] Add new auth support for creds check
Bug: b/348024314
Change-Id: I157380b19121a9fbcee2a1a13447df9c03f7bccc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5646659
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Allen Li bb38aa2f8e [gerrit_util] Use SSO only if configured with appropriate email
So you can use chromium.org or other accounts in some repos

Bug: b/348024314
Change-Id: Ice6b6d9e6e827a606a2ce7f3b127d4660df1aedf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641255
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Robert Iannucci 005e60ceda [git_cl] Make EnsureCanUploadPatchset work for all auth methods.
Previously EnsureCanUploadPatchset only had a working implementation
for the CookiesAuthenticator, relying on being able to parse the
user name out of the .gitcookies file.

Additionally, the previous implementation assumed that you would
always authenticate as your primary Gerrit account OR you had
a matching `user.email` gitconfig entry, even though neither of these
is a strict requirement for the upload to work.

The new implementation still short-circuits if issue_owner matches
the configured user.email, but other than this it just asks Gerrit
what the full list of linked emails is for the currently authenticated
account.

The new approach is not only correct, but will now work for all auth
schemes in exactly the same way.

When the accounts do mismatch, you will now see output like:

```
WARNING: Change 5590262 is owned by iannucci@chromium.org, but Gerrit knows you as:
  * user@example.org
  * other.user@example.com
  * primary@real.example.com (preferred)
Uploading may fail due to lack of permissions.
```

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

Bug: 336351842
Change-Id: I89c1b121c9110e00d1348884aaf025fc783542d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5590262
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
11 months ago
recipe-roller 88b222ccdf 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/8744220970510326561

recipe_engine:
f91bc37aab
  f91bc37 (kimstephanie@google.com)
      Roll test_variants.proto

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: Iead1edde69a0125114f8d41636c0adffa7252806
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5651516
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 3e9c527581 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/8744226632651760465

recipe_engine:
659f41cff9
  659f41c (mohrr@google.com)
      recipe.warnings: Push back checkout_dir deprecation

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: I5fbb9d525d6f1c511893e5b371d7fa8bf9cd7298
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5647021
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
mlcui 6592795601 gerrit_util: Fix NameError in GceAuthenticator._get
Bug: None
Change-Id: I6a6a210069da0f77ebbed4c6ef530864cb2d8109
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5644850
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Michael Cui <mlcui@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
11 months ago
Robert Iannucci 6daca50597 [git_cl] Refactor EnsureAuthenticated logic.
This will allow us to implement EnsureAuthenticated for other
Authenticator implementations.

R=ayatane@chromium.org

Bug: 336351842
Change-Id: I5ff4efd45eb5baa6baa048842510ec6e18e1b8fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5588510
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
11 months ago
Robert Iannucci 137bb69871 [gerrit_util] Cache resolved Authenticator as a class variable.
I noticed that the Authenticator is resolved maybe 5 or 6 times per
git-cl invocation. This should lead to more consistent behavior and
will likely be a bit faster, especially for SSOAuthenticator and
LuciAuthAuthenticator which involve subprocess invocations.

R=ayatane@chromium.org

Bug: 336351842
Change-Id: Id6c2873a6960a171305560acb98afe2c4f397295
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5589865
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
11 months ago
Allen Li bdf64705c3 [gerrit_util] Factor out SSOHelper
Add a layer of abstraction/isolation for general organization.

Also, this logic needs to be used in Git setup too, not just Gerrit
authentication.

Bug: b/348024314
Change-Id: Ie1310a9b8e71c05c72a4b987dcbff76b70c67945
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5645906
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Robert Iannucci c4c3d5326e [gerrit_util] Add some additional tests and fixes for SSOAuthenticator.
Unfortunately, the depot_tools presubmit builders are incredibly slow
which make the subprocess based tests fail flakily. I've marked them
all as `skip` with an optional way to run them locally.

R=ayatane, yiwzhang

Bug: b/335483238
Change-Id: I407aed3a1ed01563a0a80973b679aca405b9cde9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641259
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Gavin Mak 47a841a204 Handle empty diff in _diffs_to_change_files
An valid empty diff can be passed into _diffs_to_change_files if the
modified file's contents is same as upstream. In this case,
_diffs_to_change_files gets an IndexError.

Bug: b/336555565
Change-Id: I848e6016a1e8089473ff8a72d2e0142fbabfda9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5635166
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
11 months ago
recipe-roller 6cc020f612 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/8744498424735586417

recipe_engine:
f3a3b6e2d0
  f3a3b6e (gbeaty@chromium.org)
      Prevent joining paths with None.

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: Ide40593fa3ca63bd8e10055d8e15acc7bfbb93c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5648795
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
Allen Li 06673958a3 [git_cl] Fix comment about GetCodereviewServer
Previous comment was... lacking.  Actually, wrong.  It's doing the
exact opposite of lazy loading.  Maybe they were trying to use AI code
gen before it existed?

Bug: b/348024314
Change-Id: I068d43fe1abf757cb8b109890a14ca0cefe3fec0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641090
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
11 months ago
Allen Li 39e7285c30 [scm] Fix docstring reference to `modify_all`
Bug: b/348024314
Change-Id: Ic5609fe286e8c016862aa38dbb0f17c9b52e7941
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641260
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Allen Li 6355da7032 [git_common] Relocate comment
Change-Id: I489df67dae5607acc4edbb0243b149eae1742733
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641088
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Allen Li 1e4251b6ea [newauth] Accept standard Git bool values
Just some "syntactic" sugar (at the very least we should probably have
used 'true' from the beginning)

https://git-scm.com/docs/git-config#Documentation/git-config.txt-boolean

Bug: b/348024314
Change-Id: I9ec3b12012444662289619ac955885e732945fe2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641085
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
11 months ago
Allen Li fa1bba51d7 [gerrit_util] Add newauth.py helper
These checks will be needed in git_cl.py and probably other places.

Make it easy to change the default to opt-in as some point (and for
deletion later).

Bug: b/348024314
Change-Id: I768986e47ec2e86604268d74ca2b632458263bba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641084
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
11 months ago
Robert Iannucci e5490cc303 [gerrit_util] Fix unstopped mocks.
R=ayatane, yiwzhang

Bug: b/335483238
Change-Id: I9df8c754f25de2ad51cac78eecc2ede08eff5fa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5646325
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Allen Li <ayatane@chromium.org>
11 months ago
Josip Sokcevic 2517f89cdf Reland "[presubmit checks] Check if files are written to a dep dir"
This is a reland of commit 561772c448

Original change's description:
> [presubmit checks] Check if files are written to a dep dir
>
> No files should be written to a directory that's used by CIPD or GCS, as
> defined in DEPS. Git already doesn't allow files to be written to a
> directory that's a gitlink.
>
> R=jojwang@google.com
>
> Bug: 343199633
> Change-Id: I8d3414eac728580eaf9ac7e337bb22bca3989e4e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5633187
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>

Bug: 343199633
Change-Id: Ifc3f6c4df328cdd215ceb7d0333f68223e9a1ccb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5643922
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
11 months ago
recipe-roller f7d041dbde 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/8744590280712977393

recipe_engine:
c5245039e2
  c524503 (mohrr@google.com)
      [path] Add warning for using api.path.is_parent_of

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: Ica032db3005a848bd6e920e6f643e625423f35e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5643923
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
Robert Iannucci 6833e00918 [gerrit_util] Revise comments on SSOAuthenticator.
Previous comments on SSOAuthenticator were incorrect (the
git-remote-sso process does NOT need to persist). Remove comments
which were inconsistent with the code, and add an explainer on why
the _launch_sso_helper method is written the way it is.

R=ayatane, yiwzhang

Bug: b/335483238
Change-Id: I6b318ef36d7c4f757cd0b979fdc90c01c7a5b529
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641089
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
11 months ago
Robert Iannucci 1f4f982beb [git-cl] SSOAuthenticator: Add tests and fix bugs.
Adds a few very basic tests.

Fixes bug where, when using python3.8, the cookie jar would not
correctly parse the cookie file.

R=ayatane

Bug: b/335483238
Change-Id: If44eea00d67cb2716df460ef0af93811e351f764
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5637936
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
11 months ago
Gavin Mak 4d36c419f3 Revert "[presubmit checks] Check if files are written to a dep dir"
This reverts commit 561772c448.

Reason for revert: `KeyError: 'deps'` breaking some builds

Original change's description:
> [presubmit checks] Check if files are written to a dep dir
>
> No files should be written to a directory that's used by CIPD or GCS, as
> defined in DEPS. Git already doesn't allow files to be written to a
> directory that's a gitlink.
>
> R=jojwang@google.com
>
> Bug: 343199633
> Change-Id: I8d3414eac728580eaf9ac7e337bb22bca3989e4e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5633187
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>

Bug: 343199633
Change-Id: I26b8e72320260e394a72aee1f7e67dfc2b3e2987
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641258
Auto-Submit: Gavin Mak <gavinmak@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
11 months ago
Allen Li c5a846299d [man] Fix make_docs.sh
Change-Id: I14c51773a86f0dc0b0d185d38908fff0d2afa3d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5641213
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
11 months ago
Josip Sokcevic 561772c448 [presubmit checks] Check if files are written to a dep dir
No files should be written to a directory that's used by CIPD or GCS, as
defined in DEPS. Git already doesn't allow files to be written to a
directory that's a gitlink.

R=jojwang@google.com

Bug: 343199633
Change-Id: I8d3414eac728580eaf9ac7e337bb22bca3989e4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5633187
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
11 months ago
Yiwei Zhang 66df2a3ec7 git cl upload: introduce commit-description option
This new option allows programatically providing new
description when uploading a new patchset.

Bug: 346174899
Change-Id: I6d7e361b7da0fd06675c04df4fd2f68c7954dd40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5620640
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
11 months ago
recipe-roller 90d00845c5 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/8744874653555770529

recipe_engine:
e22ed0d40a
  e22ed0d (mohrr@google.com)
      [step] Drop _StepPresentationProxy

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: I41b9240debecdacd4fc281c6e255e62e6193fe95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5635201
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
Takuto Ikuta 1d1f17af89 allow v6 ninja log format
This is for https://crrev.com/c/5632535.
v6 in 1.12.1 is the same format with v5 in 1.11.1 actually.
ref: https://github.com/ninja-build/ninja/pull/2240


Bug: 346910589
Change-Id: Id13fc0945d1d7f80b42b87c37969c01ffa113e24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5633274
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
12 months ago
Chenlin Fan cf92f43226 New vpython3 to depot_tools.
599223619b47d2ab7a264d9a74e6d3b337dceffc vpython: use fixed temp root directory if possible
cafab8a47525aa82c5a5e06c2bb9424993f932b0 cipkg: add symlink workarounds on windows
0ec59342a4ce767306827b49ae72d342f84de8f2 cipkg: ensure url generates stable action
5efba5dcb2b41708fc829f5881e916feed68b2f0 [chore] Fix formatting of files.
0fad94fa6aad15821c7ec920f00b88c2f4aaf0fb [chore] Fix formatting of files.
b8a75466783276cefb0278329401549031eb6dd9 cipkg: allow n:1 mapping from package to derivation

Bug:341097070
Change-Id: Ib9a16e43e1f8f85e4f8a439699c12f9a10ca4d42
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5632854
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Chenlin Fan <fancl@chromium.org>
12 months ago
Aleksey Khoroshilov 093f878224 Fix java format with --diff passed
Accidentally removed few parameters in [1].

1. https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5613673

Change-Id: I944370d13d86980a1dabadb8c9eda69d078de0f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5632781
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Aleksei Khoroshilov <akhoroshilov@brave.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
12 months ago