Commit Graph

10217 Commits (3edda8d185b5b46d43ea19ad3e2d1de91b6f8ba0)
 

Author SHA1 Message Date
Aravind Vasudevan 3edda8d185 Update gclient to use git config caching
This change updates all the modules used by gclient to use `scm.GIT` for git config calls over directly invoking the subprocess.

This change currently doesn't modify git_cache since the config reads and writes within it are done on bare repository. A follow-up CL will update git_cache.

A follow-up CL will also update git_cl and git_map_branches since they have shown performance improvements too: https://crrev.com/c/4697786.

Benchmarking
============
With chromium/src as the baseline super project, this change reduces about 380 git config calls out of 507 total calls on cache hits during no-op. The below numbers are benchmarked with `update_depot_tools` turned off.

Windows Benchmark
=================
Baseline (gpaste/6360045736951808): ~1min 12 sec.
With Caching (gpaste/6480065209040896): ~1min 3sec.
~12.5% decrease in gclient sync noop runtime.

Linux Benchmark
===============
Baseline (gpaste/4730436763254784): ~3.739 sec.
With Caching (gpaste/4849870978940928): ~3.534 sec.
~5.5% decrease in gclient sync noop runtime.

Bug: 1501984
Change-Id: Ib48df2d26a0c742a9b555a1e2ed6366221c7db17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5252498
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Aravind Vasudevan 0784439733 [scm] Implement caching for git config
Bug: 1501984
Change-Id: I751a1f08eb9ae7141b8b4e1517731ed553328c03
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5252497
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Gavin Mak dd1a596c3e Refactor git functionality out of Change and _DiffCache
A followup change will add support for change diff provided as user
input through stdin/file.

Bug: b/323243527
Change-Id: I8d3420370e134859c61e35e23d76803227e4a506
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5254364
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Gavin Mak a4dee1b821 Make CheckForCommitObjects check gitlinks and .gitmodules
issues.skia.org/issues/324072603: DEPS were renamed but the
corresponding gitlinks and gitmodules entry were not updated. Update
to check that

1. DEPS entries point to gitlinks (if SYNC)
2. .gitmodules entries match paths of gitlinks

Bug: 324118800
Change-Id: I4c97b54c1912712aef309584bebaa4ea3b24d5df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5273762
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
1 year ago
Josip Sokcevic 35ab564e9f Trigger recipe roller
To pick up new python version.

Bug: 41493440
Change-Id: I8ca5319715cd8e7891654f4e17ba7f6cd80e9d6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5273825
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Brian Ryner 9305434c21 Bump vpython to pick up python 3.11.8 update.
Other changes in this release:
7bdd89e5b2ba3e1a50dc63519934b391cd8d9061 Don't clear PYTHONPATH when executing python.
47bee0125c710a0765f995cb7830bb422a49a7d3 vpython: remove unused "virtualenv" from spec
8efd36d70716f5ae294c5ac8f554206a308b1615 vpython: increase MaxPrunesPerSweep to 10
5d5689a6f9decffb50a7a2a2b60128f951bfedc0 vpython: remove workaround when no spec is found
51f326e6c1b022a2cc2d2a1bcf11048a7012ea63 vpython: provide an empty spec if no default spec
181914db26ce3f0a549a7ee158ff70da7ef2ab15 vpython: move pkgs to luci-go
7c353081c7a6b2c77698962e57ba30c702027178 vpython: restructure vpython pkgs
e2768da6d2bb99660558f5b13daac496a9ed9061 cipkg: allow separating package generation with package build

Bug: 41493440
Change-Id: Ic3e8dfa706de918c3d5d896f44b911dd415b5f55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5276597
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
recipe-roller a8f0954411 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/8756778717057051457

recipe_engine:
d68051a0c1
  d68051a (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 93c00bda3241 to c7b026b3a6a1

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: I6cd383887880ad291e2a06b7e5e994245cb908b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5276663
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>
1 year ago
Aravind Vasudevan 1f441eb375 [fix_encoding] Remove fix_encoding
The fix_encoding module within depot_tools was included back in the python2[1] days to as a be all encoding fix boilerplate that is called across depot_tools scripts.

However, now that depot_tools officially deprecated support for py2 and support >= 3.8[2], the boilerplate is not needed anymore.

* `fix_win_codec()`[3] The 'cp65001' codec issue this fixes is fixed in python 3.3[4].
* `fix_default_encoding()`[5] python3 defaults to utf8.
* `fix_win_sys_argv()`[6] sys.srgv unicode issue is fixed in python3[7].
* `fix_win_console()`[8] Fixed[9].

[1] https://codereview.chromium.org/6721029
[2] https://crrev.com/371aa997c04791d21e222ed43a1a0d55b450dd53/README.md
[3] https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:fix_encoding.py;l=123-132;drc=cfa826c9845122d445dce4f51f556381865dbed3
[4] https://github.com/python/cpython/issues/57425#issuecomment-1093559969
[5] https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:fix_encoding.py;l=29-66;drc=cfa826c9845122d445dce4f51f556381865dbed3
[6] https://crsrc.org/d/fix_encoding.py;l=73-120;drc=cfa826c9845122d445dce4f51f556381865dbed3
[7] https://github.com/python/cpython/issues/46381#issuecomment-1093409968
[8] https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:fix_encoding.py;l=315-344;drc=cfa826c9845122d445dce4f51f556381865dbed3
[9] https://github.com/python/cpython/issues/45943#issuecomment-1093402603

Bug: 1501984
Change-Id: I1d512a4b1bfe14e680ac0aa08027849b999cc638
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5263016
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
1 year ago
Gavin Mak 120efcb475 Remove _MergeMasters
This was added in https://codereview.chromium.org/178223016 and used
for rietveld which is no longer used.

Change-Id: Idbfdb50a61dba884f5212c1de904f83324a449f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5254600
Auto-Submit: Gavin Mak <gavinmak@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
1 year ago
Gavin Mak 0696c428b0 Switch to using issues.chromium.org bug links
Bug: b/323898035
Change-Id: I2dacc7d524fb11265d7c2385259b3a918d4fb6ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5270201
Auto-Submit: Gavin Mak <gavinmak@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Rupert Wiser af6eabff53 Revert "Delete vpython, leaving only vpython3."
This reverts commit db0dcbbe7c.

Reason for revert: `gclient sync` no longer works on my local checkout with this change due to the error `No such file or directory: 'vpython'.`.

Original change's description:
> Delete vpython, leaving only vpython3.
>
> Bug: 1376538
> Change-Id: Ia7795f75fd05db63f155c5feffcc43822fb45bb1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5187892
> Reviewed-by: Mike Frysinger <vapier@chromium.org>
> Commit-Queue: Brian Ryner <bryner@google.com>
> Reviewed-by: George Engelbrecht <engeg@google.com>
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Reviewed-by: Chenlin Fan <fancl@chromium.org>

Bug: 1376538
Change-Id: I7c32eea1f8ae07644ab81a35213de5c68c64dfb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5260042
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Andy Perelson <ajp@chromium.org>
Commit-Queue: Brian Ryner <bryner@google.com>
Reviewed-by: Brian Ryner <bryner@google.com>
1 year ago
Josip Sokcevic 371aa997c0 Delete py2 checks
No script can run on py2 (due to print syntax change), so those
checks are useless (will never be printed).

Change-Id: I9cc7bc8b2665dd09cc7f8939ba255956f96af88a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5262958
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
1 year ago
Robert Sesek 911e2a0893 Add `git cl format --mojom` for .mojom file formatting
This is not enabled by default because it is new and should be
considered beta.

Bug: 780263
Change-Id: I7a4813c7ac4cef7441c5373dff4bb1289e7b99b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5259981
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
1 year ago
Michael Savigny 7142bf166c Enable deps cache for mac devs.
Turns on deps cache, and increases it's size, for mac developers.  In
some cases, it shows good improvements on chrome builds (cutting 1-4
minutes off a full chrome build, once populated).

Bug: b/322801289
Change-Id: I9cd2b35b5429228c07b0703d6c3344963e4fb9e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5258563
Auto-Submit: Michael Savigny <msavigny@google.com>
Reviewed-by: Ben Segall <bentekkie@google.com>
Commit-Queue: Michael Savigny <msavigny@google.com>
1 year ago
Josip Sokcevic 8f4d3df0bc Revert "[gclient] Enable parallel sync on ARM Mac by default"
This reverts commit 92b780b0bd.

Reason for revert: mac arm experiencing hang

Original change's description:
> [gclient] Enable parallel sync on ARM Mac by default
>
> I realized that gclient sync doesn't use all the cores on ARM Mac.
> This CL changes the default for ARM Mac to use all the available cores.
>
> Change-Id: Id0316e48d2b16a05a397a69bad53172b3d742f4a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5256559
> Commit-Queue: Junji Watanabe <jwata@google.com>
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
> Auto-Submit: Junji Watanabe <jwata@google.com>

Bug: 1427050
Change-Id: I512d1d1ef0034f12fc9054c5234ae688ec281857
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5259766
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>
1 year ago
Scott Lee 92469e017f [depot_tools] move the lucifg cipd pin to v1.43.4.
- Version CL: https://crrev.com/c/5249442
- CIPD pkg: https://chrome-infra-packages.appspot.com/p/infra/tools/luci/lucicfg/linux-amd64/+/git_revision:2030482b389cfda6a33ad0933e9930a31fd464d9

Bug: 1443582
Change-Id: Icff98a88b6ae25d4a05d5488e3f288bbcdbc4990
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5254265
Auto-Submit: Scott Lee <ddoman@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Junji Watanabe 92b780b0bd [gclient] Enable parallel sync on ARM Mac by default
I realized that gclient sync doesn't use all the cores on ARM Mac.
This CL changes the default for ARM Mac to use all the available cores.

Change-Id: Id0316e48d2b16a05a397a69bad53172b3d742f4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5256559
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
1 year ago
Brian Ryner db0dcbbe7c Delete vpython, leaving only vpython3.
Bug: 1376538
Change-Id: Ia7795f75fd05db63f155c5feffcc43822fb45bb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5187892
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Brian Ryner <bryner@google.com>
Reviewed-by: George Engelbrecht <engeg@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Chenlin Fan <fancl@chromium.org>
1 year ago
Michael Savigny b482a5dbba Reduce local resource fraciton for windows builds.
Reduces resources used for local compilation in racing for windows.
Makes machine running the build more responsive during the build.
Testing seems to show it doesn't impact overall build performance, and might even improve it slightly.

Bug: b/309819402
Change-Id: I6f4f41887b165c753508a57fcaa1a1a6931feee3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5254559
Reviewed-by: Ben Segall <bentekkie@google.com>
Commit-Queue: Ben Segall <bentekkie@google.com>
Commit-Queue: Michael Savigny <msavigny@google.com>
Auto-Submit: Michael Savigny <msavigny@google.com>
1 year ago
Michael Savigny 10bd39fd47 Enable deps cache for windows builds.
On my windows cloudtop, without deps cache a build of chrome took around 2130s, with it enabled (and populated) a build took around 1665s, which is about a 7-8 minute improvement.


Bug: b/320457907
Change-Id: I82232cad57152f1a10d1e262125290d54bf8ab33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5249053
Reviewed-by: Ben Segall <bentekkie@google.com>
Commit-Queue: Michael Savigny <msavigny@google.com>
1 year ago
Garrett Beaty a95979fcc3 Update the CheckInfraFreeze canned check to use datetime & zoneinfo.
The current implementation of CheckInfraFreeze relies on timestamps
being preconverted to UNIX timestamps because zoneinfo doesn't work by
default on Windows. The necessary tzdata package has been added so that
zoneinfo will work for Windows, so switching to datetime and zoneinfo is
now possible and makes it easier to update the time range for freezes.

Bug: 1521396
Change-Id: I8db111f05db2e79f4fffd9da3829b9071d12163f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5246425
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
1 year ago
Gavin Mak b808b1bcdd Use shlex instead of pipes
Importing pipes gets a DeprecationWarning. shlex.quote is equivalent to
pipes.quote. Use that instead.

Bug: 1522874
Change-Id: I18b8598f2e961d58ba71d886921bda9d9ad956ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5243707
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Auto-Submit: Gavin Mak <gavinmak@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
1 year ago
recipe-roller 1b57e24a4e 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/8757589057133991649

recipe_engine:
0c1c828904
  0c1c828 (mingkong@google.com)
      [recipe] Add stability API to luci_analysis recipe 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: Icf210e4568335a12601f06018cd00e0d303d90f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5243156
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>
1 year ago
Mike Dougherty 68c511349d Improve git cl split warning if more than 10 CLs will be created.
This CL updates the warning printed when more than 10 CLs will be
created to be shown whether or not the CLs are being sent to the CQ
and provides guidance on adjusting the number of CLs using the max-depth
flag. This makes the tool more user friendly by preventing a new user
from unknowingly creating many CLs without realizing there is a
supported option to customize the depth.

Additionally, it sets the default for the cq-dry-run option to False
instead of None and logs the value of cq_dry_run when running a git cl
split dry run.

Change-Id: I6feba24d06dd5e88d9005345d5b0a1e15c53e197
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5234543
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
1 year ago
Joanna Wang b25b4680f2 Make scm.ListSubmodules return paths for the OS.
Bug: 1522071
Change-Id: Ifbdfc456fbfb0a74d68c7109aa8bd3deae612e39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5236697
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
1 year ago
Cheng Zhao 3c8baffa8d Add fetch config node
The node config is an alias of node-ci, which builds upstream Node.js
with bundled V8 instead.

This config will be used by maintainers of Node.js to test the GN build
of Node.js.

Bug: v8:13803
Change-Id: Ib67c54a24c5f8aee79d8f6eab50a9b697f28daeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5232378
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Garrett Beaty 2bc81cdf4f Add a canned check for enforcing infra freezes.
This will provide a single site that needs to be updated when setting
new dates for infra freezes rather than requiring copy-pasting timestamp
changes between multiple directories and repos.

Bug: 1515149
Change-Id: I62f7de45c3a7e993f558738a0ff1f2dae6cac471
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5160597
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
1 year ago
Aleksey Khoroshilov 097edbaba6 [git_cache] Allow expansion of `~` in git cache.cachepath parameter.
All git path parameters support `~` expansion, there's no reason we
shouldn't do this for cache.cachepath parameter used by gclient.

Change-Id: I92485d5f17d8ab8125074253f75e0ef2e2ff41e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5227662
Commit-Queue: Aleksey Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
1 year ago
Alexei Svitkine 00ae0c065c Fix a missing space in message.
Change-Id: Ife904f3c43197574b8dcd74dccdeea5f7120534c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5230259
Auto-Submit: Alexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
1 year ago
Josip Sokcevic e5c5b2664c [git_cache] Check if HEAD still points to existing ref
It's possible that HEAD points to a different branch, and old one was
deleted. This ensures that cache still has the correct HEAD information.

Change-Id: Iab0b6badfd1f3e2c0e09fe542ee603b78d4a0041
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5218257
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
1 year ago
Michael Savigny 26b100def9 Update goma deprecation message and add delay to build start for goma.
Update the warning message for linux and mac goma builds, and add a 5
second delay.

Do not submit until Jan 22, 2024

Bug: b/277197166
Change-Id: Id93822b1aa32b05746b8fad4b9dc332cf61d291c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5215930
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Michael Savigny <msavigny@google.com>
1 year ago
Takuto Ikuta 3a7f62489a autoninja: make it possible to skip external account check
This is for some internal infrastructures which want to use service
accounts from corp machines.

Bug: b/320639792
Change-Id: Ie90241fe89e0bb0fb5526844e2e3651cc316d945
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5226384
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Richard Wang <richardwa@google.com>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
1 year ago
Josip Sokcevic 6fc0c97ab2 [git_cache] Track if git cache is fully initialized
git_cache populate can get interrupted midway (e.g. by LUCI CV sending a
signal that build is no longer needed). When that happens, a git mirror
may be in a state where some commits are available, but cloning such
repositry results in an empty repsitory.

This change ensures that the initial fetch operation finished
successfully.

R=ddoman@google.com

Bug: 1517944
Change-Id: I1ee860860877dbfff7a444b45fe4515fe26b248c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5219032
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
1 year ago
Nikita Leshenko dbbe224787 gclient: Call _AutoFetchRef before using a rev in _FetchAndReset
Other places in gclient_scm (GitWrapper._Clone, GitWrapper.update) do
the same.

Note that we call _AutoFetchRef even after running _Fetch, because
_Fetch in not guaranteed to fetch a specific revision. For example, a
checkout might be configured without branch heads and without tags, yet
a revision might point to a tag.

Change-Id: I5cfd8ebafa4b45afd72b0251f04e5d713199f2fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4715239
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Joanna Wang c341d58921 Include submodules when looking for PRESUBMIT files.
Bug: 1475770
Change-Id: I3a4b10a8dc68db9f0507bb3cefa62d233df53b68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5219691
Reviewed-by: Scott Lee <ddoman@chromium.org>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
1 year ago
Joanna Wang 46cb7d0aca Add AffectedSubmodules() to presubmit change.
+ Change scm GetAllFiles back to returning all files
  + should be safe to do since it's only used by presubmit code
+  add ignore_submodules option to CaptureStatus
  + It's used by other parts of depot_tools code
+ Add AffectedSubmodules to return submodules only
+ AffectedFiles still only returns non-submodule files.

Bug: 1475770
Change-Id: I457ad96099fb20eff4cc1a4fc84f59e7ae707abe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5216005
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Joanna Wang 9a16009d09 Fix ListSubmodule git call.
Bug: 1475770

Change-Id: I26f758fb3cbd9ac217e6e0abb719e13d21feb61f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5214266
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Joanna Wang c3daf77a40 Move ListSubmodules into InputApi
Change-Id: Ia37291aca59b429b59bdc6424a2f36394d558e3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5214265
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Joanna Wang 5400d9ef5a Add ListSubmodules helper for presubmits.
We need this for this presubmit otherwise we cannot remove git deps from DEPS: http://shortn/_P7Xkt33SRx
We will also be able to reuse this and replace: http://shortn/_WYBIUC9pa4

Bug: 1475770
Change-Id: I4cea689d130df77c344d82d4d8f9db02d42cd847
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5209098
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
recipe-roller 580b4ff3f5 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/8758625888327039793

recipe_engine:
1438ab1429
  1438ab1 (mohrr@google.com)
      [defer] Skip step name for suppressed results

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: Id4ea9f3c4a6d809f21a091eb6ed743d1cb5b419d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5203518
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>
1 year ago
Michael Savigny 83458774b1 Update autoninja use_goma warning message.
Update use_goma warning for linux and mac, to add date of removal of
use_goma (Feb 7th) and a warning that delays will be added (Jan 22).

Bug: b/277197166
Change-Id: Id567e5bf704c5d80e5122663c6d8194ac510d992
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5200850
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Michael Savigny <msavigny@google.com>
Reviewed-by: Ben Segall <bentekkie@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
1 year ago
Michael Achenbach a5aaf5bc34 Remove deprecated sre_compile from cpplint
This uses `re` instead, which should have similar performance with python3.

Bug: 1517826
Change-Id: If03f386d26590dcae7da6b4f27ec1ea4926065fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5197707
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Brian Ryner <bryner@google.com>
1 year ago
Sebastien Marchand f5dd9dda9e Make 'compile_single_file' use vpython3
A recent change to autoninja breaks 'compile_single_file' because
autoninja expects to be able to find the 'google.auth' package, which is
available via vpython3.

Change-Id: Ie0c9bc229108daadae27bd85ffc0471d9e7e7fca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5199126
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
1 year ago
Brian Ryner 3d6dda8241 Always run yapf with vpython3.
The version we are using now does not run under python 2.7.

Add an explicit python_version 3.8 to the inline spec so that we don't
rely on vpython's default version. This is a no-op change when running with vpython3. We should run yapf under 3.11, but this needs additional testing and likely an update of zipp, so we'll do it separately.

Change-Id: If1fccbe6b13c77a770bd1a8c9de0789d543ba890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5198109
Auto-Submit: Brian Ryner <bryner@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Fumitoshi Ukai 9f668bbff9 siso: use stderr to print message from siso.py
siso binary will print json etc (e.g. `siso fs export`)
and usually used to pipe to jq or so.

but siso.py print message when $SISO_PATH is set
and corrupt json message.

use stderr for such message.

Change-Id: Ic35ecabc159fb2053a8a29816c276d914f8d2468
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5197566
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
1 year ago
Michael Achenbach 6592c25524 Suppress python deprecation warning to unblock cpplint
Bug: 1517826
Change-Id: I78d67bb8d6ac426595c742f4e688f037a1c0b012
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5190610
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
1 year ago
Chenlin Fan 39bc04eb9f New vpython to depot_tools.
Fixed https://crrev.com/c/5091007

This change includes commits:
0c1a41fa62950eedcaaee58ba7268d3813871e3f vpython: preserve NoDefaultCurrentDirectoryInExePath state
a7a2cf379c762dc22a35fc4e1af9e4dfd8df2785 vpython: remove unused code
65fb8069dc290e3b3cc4765f57a78fbbe0ed2093 vpython: update script used for gathering changes
dca9f0e513fae6d176bd264766dec6c464c38e8e Run compileall in parallel.
a76e08f54c62e239b37f020040382f4918d9e056 cipkg: set NoDefaultCurrentDirectoryInExePath on windows
a4b9b9d8f8ba904212a9ff3a33be76060d380f3c cipkg: append $out to derivation envs
445bf8af01dafa28d86e8aedac9ff091a4c64662 cipkg: add peep-software-deployment as owner
50b7bd75850311895fac95eb602df392d982345f Split the global linter config into per-directory configs.
00e23cbde55df05e0e42f7a574c79ff8bcf589c4 vpython: match tag before verify
ef99f244101ffd1b549c740ef6059b255bdbd49c fix gci-ed warning for vpython and pkgbuild
ba2a688d3175807a5f66ab64afd649c867cf563a vpython: rename vpython_ng to vpython

Change-Id: Iafbbbbd4408f62436cf6af17fe9b86cf5d66d06e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5191526
Commit-Queue: Chenlin Fan <fancl@chromium.org>
Reviewed-by: Brian Ryner <bryner@google.com>
1 year ago
Brian Ryner 60d2ba87c3 Update cipd_bootstrap_test to use a newer cipd client binary.
The previous binary was so old that it does not work on recent
versions of macOS.

Note that `cipd selfupdate-roll` requires the cipd package to exist
at the given tag for all platforms that the package has ever been
built for. Therefore, I'm using a revision after the latest platform
was added to the builders.

Change-Id: I865c31a5e3823ffc344bcb6585a29935ef6214a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5191588
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Auto-Submit: Brian Ryner <bryner@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Josip Sokcevic 312cd0453c Reland^3 "Upgrade python to 3.11"
This is a reland of commit 6a9dd48b27

Bug: 1500415
Change-Id: I9de26bf55de10da15d7c809cc9223b36b7ae31f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5189582
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Josip Sokcevic 8d14454ba4 Remove python2 from bootstrap
With this change, python2[.bat] will no longer be available in
depot_tools root. vpython continues to work.

Bug: 1376538
Change-Id: Iabe22e4e33d0d79d258068c90128da8de4d3ece1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5170265
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago