This will reduce confusion with the tools, gsutil.py will now take into
account supplied boto config outside of authentication (such as proxy
settings).
If the user is not logged in with luci-auth, the users configured .boto
config (including auth if configured) will still be taken into account
by the regular gsutil (not gsutil.py!) command.
Bug:b/342261857
Change-Id: I369489db60c46c13cbe9fd93d15c9597a525feb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6414748
Commit-Queue: Dan Le Febvre <dlf@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Some builders use env:DEPOT_TOOLS_WIN_TOOLCHAIN_ROOT to
specify shared builder cache on bot, which is out side
of builder's workspace, so we needed to set RBE_exec_root
to common ancestor dir above for reclient.
This CL sets up a directory junction in win_toolchain
(default location) to toolchain dir if specified by
`--toolchain-dir` or env:DEPOT_TOOLS_WIN_TOOLCHAIN_ROOT,
download win toolchain in the toolchain dir,
and use default location path for win toolchain,
so win toolchain can be available under normal exec root.
Bug: 397786479, 313567009
Change-Id: Ia39ce9e40f477f71e70036ed47c4b61c29626718
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6288233
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Andy Perelson <ajp@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
I think the latest Git version changed this behavior.
Change-Id: Id10c3ec41daf4e6700fc8168373cae9482502231
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6422996
Commit-Queue: Allen Li <ayatane@chromium.org>
Feels: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Try LUCI Auth before using an existing BOTO config. If a
.BOTO config is used, warn on it and ask the user to try luci-auth
method next time.
http://crrev/c/6397035 also includes the GSUtil section in case anyone
is using it.
Bug:b/342261857
Change-Id: I79669926e956112faff45068b3cd822cf28a2385
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6396595
Reviewed-by: Scott Lee <ddoman@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Dan Le Febvre <dlf@google.com>
- 59b81c84ded4e2312b2b554d22a51dca89825bc3 launcher: change collections.namedtuple to typing.NamedTu... by Mike Frysinger <vapier@google.com>
GitOrigin-RevId: 59b81c84ded4e2312b2b554d22a51dca89825bc3
Change-Id: Iadd0af8c670917eb4cd418b7f7184ee819ea9d2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6410153
Auto-Submit: Copybara Service <copybara-worker-blackhole@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
The existing licence regex assumed each line would start with an unknown
and optional comment delimiter, followed by a required space. However
the standard way to write the licence in XML files uses a multi-line
comment, each individual line simply starts with the licence text, no
delimiter or space. The license check thus needed to be updated to make
the space optional as well.
Bug: 407060754
Change-Id: I4a83dd9408de890593952e441ba6b650f726907c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6409392
Commit-Queue: Sky Malice <skym@chromium.org>
Reviewed-by: Andy Perelson <ajp@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
`python-bin/python3` sets the depot_tool's Python binary dir to PATH.
This allows build steps to use the bundled Python, so that the Python version can be aligned with what the infra uses.
Note that autoninja.bat already uses the bundled Python.
Change-Id: I9350859bcc5bd0ed59f2f00be8e5615d89281daa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6395717
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
This will print a warning and disable new auth if .gitcookies file
exists.
This ensures we don't break bots once we default new auth on while
pushing human users away from .gitcookies.
Bug: b/404613530
Change-Id: Ia2d05bb7e5d2bf11e5605a26ef492954acbd9833
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6367723
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
The credential helper rules should not have a path, while the URL
rewrite rules should.
Reland of I79b52ab4af62367363617b2a9afa03a67f5ea0b9
Bug: b/401338175
Bug: b/403635929
Change-Id: Ib89d9e855ca5eba29cc67f8846bb7ca0cb3622ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6363080
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
Make this available for testing first.
This should be functionally roughly analogous with the current auto
configuration logic, and it prints all actions it performs so it
should be pretty safe to play with, even if it hypothetically
misbehaves.
Bug: b/401338175
Change-Id: I803c7e167e355ec8cca1f5959099138c2fee305e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6334614
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
This reverts commit ce47e785fa.
Reason for revert: fatal: --local can only be used inside a git
repository.
Original change's description:
> [git_auth] Use pathless URL for cred helper
>
> The credential helper rules should not have a path, while the URL
> rewrite rules should.
>
> Bug: b/401338175
> Change-Id: I79b52ab4af62367363617b2a9afa03a67f5ea0b9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6345631
> Commit-Queue: Allen Li <ayatane@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Bug: b/401338175
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ifa887eeb7a7049665570e865431b41ac18649b90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6357165
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
The credential helper rules should not have a path, while the URL
rewrite rules should.
Bug: b/401338175
Change-Id: I79b52ab4af62367363617b2a9afa03a67f5ea0b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6345631
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This is a reland of commit d447f41294
This reland excludes the change to PRESUBMIT.py which originally
caused regression and because of which the original commit was
reverted.
Original change's description:
> Add AffectedFile.Extension() in presubmit_support
>
> Add convenience method AffectedFile.Extension() for extracting file
> extension in a standard way. Add a test for this new functionality.
> Add a similar test for AffectedFile.UnixLocalPath().
>
> Bug: None
> Change-Id: If591e751fb2e4fb5355ad0b6f93f310667849d68
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6273341
> Commit-Queue: Anton Bershanskyi <bershanskyi@gmail.com>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
Bug: None
Change-Id: Ie5fc551b9c0818dfd9a1c571cc247cc157dbc8b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6335512
Commit-Queue: Anton Bershanskyi <bershanskyi@gmail.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
This could happen if user specifies "accepted_statuses=['404']", and the current behaviour raises a KeyError exception from "last_result['log']".
Change-Id: Icebb8ac3b656548892bbf729e5df0cd5e5223ada
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6352740
Auto-Submit: Keybo Qian <keybo@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Keybo Qian <keybo@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Verbose logging is disabled by default in all functions except get_changes and the caller functions, since get_changes is already using verbose logging.
Bug: 402142151
Change-Id: Ifb4d62b215ded8f7be21217f2579574ea4d211f6
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_internal
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Recipe-Manual-Change: chrome_release
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6341791
Commit-Queue: Keybo Qian <keybo@google.com>
Reviewed-by: Adarsh Murthy <adarshmurthy@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Will link to this for people who want to do manual setup (and for
general info).
Change-Id: If5b84b27b0c3b029bcb70090ac9a5821e4fbdfe6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6343955
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Read the DEPS file of a modified repository since submodules are coming
from it.
R=yiwzhang@google.com
Fixed: 402396938
Change-Id: I05c91c60b2b1ea58637242fb9970c3fabd58560e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6344911
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This exposes the reason for the SSO detection, to be used in the auth
config wizard.
There are some minor changes to fix pyright (type checking) errors on
these lines.
Bug: b/401338175
Change-Id: Ibf63a1a078a9ae82598796e329d075f19de58ea7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6334613
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
This CL adds a new way of generating splittings, which clusters files
based on their directory structure (while respecting `set noparent` in
OWNERS files). The user provides a minimum and maximum acceptable
number of files per CL, and the algorithm attempts to create CLs in
that range with a single unique reviewer for each. I've tested it on
some example CLs, and it seems to work well -- certainly better than
the existing algorithm.
Usage of the new algorithm is triggered by passing the
`--target-range` option to `git cl split`. A second new argument,
`--expect-owners-override`, may also be used to ignore OWNERS during
the clustering algorithm.
Bug: 389069356
Change-Id: I321e6424b2bdb7624b370af23b73759fda261161
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6324373
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
Change-Id: I39c01200208de15e5ce2101ecc273f823875bc0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6326717
Auto-Submit: Dan Le Febvre <dlf@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
User may use lowercase drive letter when entering gclient workspace.
In such case, path should be corrected to real path value.
R=wfh@chromium.org
Fixed: 401141847
Change-Id: I0b08985ec5c911a315922858d248ff53a10ed682
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6336450
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>