Commit Graph

10245 Commits (7dc148fe3ca0df5a010cfb3b2fcaa9ea2b48e92d)
 

Author SHA1 Message Date
Mike Frysinger 7dc148fe3c repo: do not update citc depot_tools
This shouldn't really happen, but who knows what users might
(accidentally) try to do.

Change-Id: Ic968f133693532a816b9bd3c8c5b97cba3261bc5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5309411
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Sergey Frolov <sfrolov@google.com>
Commit-Queue: Sergey Frolov <sfrolov@google.com>
1 year ago
Chan Li 2c2371dc88 [depot_tools] roll led
Bug: b/325277159
Change-Id: Ib38a530ffae6bec2c8014e873bf485647aa7544e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5310895
Commit-Queue: Chan Li <chanli@chromium.org>
Reviewed-by: Yuanjun Huang <yuanjunh@google.com>
1 year ago
Gavin Mak 62dc9f462e Implement support for change info thru diff file
This will be used in cases where git workspace is unavailable.

Bug: b/323243527
Change-Id: I51056cfbac50f76a0de1b98cfec488d8f133e353
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5263021
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
1 year ago
Takuto Ikuta 280bb93210 Revert "Remove ability to use_goma via autoninja."
This reverts commit 1592a89c9f.

Reason for revert:
b/325856422

Original change's description:
> Remove ability to use_goma via autoninja.
>
> Doesn't run a build if use_goma is true, point to reclient docs.  Turns
> off use_goma for linux and mac builds.  Windows will follow in 2-3 weeks.
>
> Bug: b/277197166
> Change-Id: Icf000ee5e4bdfeba82cadbbf2e02e7cd728e89b0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5272474
> Reviewed-by: Ben Segall <bentekkie@google.com>
> Reviewed-by: Ramy Medhat <abdelaal@google.com>
> Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
> Commit-Queue: Michael Savigny <msavigny@google.com>

Bug: b/277197166 b/325856422
Change-Id: Iaec83b254af002f420bfd2df1154ce94e18fac15
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5308674
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Owners-Override: David Munro <davidmunro@google.com>
Reviewed-by: David Munro <davidmunro@google.com>
1 year ago
Michael Savigny 9d7c8e76f8 Change source of hash for reproxy socket.
Use the log directory for the hash used to determime the socket used, so
developers get a distinct socket per build instead of per build
directory.  Should allow concurrent builds against the same output
directory as much as ninja allows it.

Bug:b/321554715
Change-Id: I714dd2d32e2c651075055134e1568423a43eabdb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5290983
Auto-Submit: Michael Savigny <msavigny@google.com>
Commit-Queue: Michael Savigny <msavigny@google.com>
Reviewed-by: Ben Segall <bentekkie@google.com>
1 year ago
recipe-roller c543d97536 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/8755931887647914417

recipe_engine:
88c63dd9fd
  88c63dd (mingkong@google.com)
      [ResultDB] Add QueryTestVariants to recipe module API

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I4b71144ccef012c837073e32bacf4688b021ce00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5299725
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
Gavin Mak b1b1a43f07 Move LSC check into pan project presubmit checks and check num files
git cl upload prompts a user if they upload a particularly large change,
determined by the number of CCs added on the change. With the watchlists
analyzer and eventual removal of CCing watchers from git cl, this check
needs to be updated to work without knowing the number of CCs.

This change does two things:
1. Moves the check from git cl upload to a pan-project presubmit check.
2. Update the heuristic of a LSC from > 100 CCs to > 100 files modified.

Bug: 324562917
Change-Id: I6bd0db9fde942273acebc320c8b52e81b02bd42f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5296199
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
1 year ago
Patrick Meiring 72bf410aff [ResultDB] Roll RDB CLI.
BUG=b:323922972

Change-Id: Iaa46b9bda245cd6c55ca3cfcc6cbfab5067a4e98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5298434
Reviewed-by: Yuanjun Huang <yuanjunh@google.com>
Reviewed-by: Chan Li <chanli@chromium.org>
Commit-Queue: Patrick Meiring <meiring@google.com>
1 year ago
Chan Li 553b749663 [depot-tools] roll dirmd
Bug: b:323922972
Change-Id: Ie6aaa987ba56b959c6acd31786f6c3a261679e7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5296200
Reviewed-by: Patrick Meiring <meiring@google.com>
Commit-Queue: Chan Li <chanli@chromium.org>
Reviewed-by: Yuanjun Huang <yuanjunh@google.com>
1 year ago
Gavin Mak 4c331a1ee2 Reland "Reland "Refactor git functionality out of Change and _DiffCache""
This is a reland of commit 4d2864f3a1

The previous change initiated "self._diff_cache()" per file.

Original change's description:
> Reland "Refactor git functionality out of Change and _DiffCache"
>
> This is a reland of commit dd1a596c3e
>
> It is not a pure reland and adds support for caching submodules.
>
> Original change's description:
> > 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>
>
> Bug: b/323243527
> Change-Id: I74bbb179d4cbda7431101a2d707131fab2093029
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5280620
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Bug: b/323243527
Change-Id: I4733b6870935d4200cb32255214c57cdb55e84f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5286636
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
recipe-roller a5a09d23fa 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/8756150199265923361

recipe_engine:
c9c93ff221
  c9c93ff (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from af661f1bc2c4 to 3df60a11d33a

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: Idba6bdb87690a9f65cfd41eb9bd6a50f699597a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5292953
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
Aravind Vasudevan 7571749aad [gclient_scm] Use --replace-all within set_config
Bug: 40942309
Change-Id: Iee6473e73fa7a0ce7ec33640c0d2fe8f49054c3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5292943
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Auto-Submit: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Michael Savigny 993e5147a9 Remove extra prints I forgot to in previous cl.
Had some debugging logging in autoninjas test.  Removed it.  Lines were erroneously added in https://crrev.com/c/5272474 to address b/277197166

Lines initially added to debug a problem in during development.  In the initial review I received a +1 CR with a comment requesting they be removed.  I made the change, started the patchset upload, went to a meeting, forgot to enter the patchset comment (thinking I had done it before the meeting) and submitted the change without the patchset.  Basically context switching got me 😅
Bug: b/277197166
Change-Id: I504569c713dbca7302988c39230caf9e9e6fa2c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5292094
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Ben Segall <bentekkie@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Michael Savigny <msavigny@google.com>
1 year ago
Michael Savigny 1592a89c9f Remove ability to use_goma via autoninja.
Doesn't run a build if use_goma is true, point to reclient docs.  Turns
off use_goma for linux and mac builds.  Windows will follow in 2-3 weeks.

Bug: b/277197166
Change-Id: Icf000ee5e4bdfeba82cadbbf2e02e7cd728e89b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5272474
Reviewed-by: Ben Segall <bentekkie@google.com>
Reviewed-by: Ramy Medhat <abdelaal@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Michael Savigny <msavigny@google.com>
1 year ago
Michael Savigny f76550541c Redo of racing temp directory.
Change is that racing directory is deleted atexit instead of being
cleaned up in a sweep at the start, whick wouldn't work anyway for the
actual use case the change was for (in-use racing directories would get
deleted, breaking concurrent builds).

Bug:b/324877315
Change-Id: I3baf25b07c13061e9b4c14a3a701ed9eceb9bbb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5288415
Auto-Submit: Michael Savigny <msavigny@google.com>
Commit-Queue: Michael Savigny <msavigny@google.com>
Reviewed-by: Ben Segall <bentekkie@google.com>
1 year ago
Aravind Vasudevan 6c92a665e1 [scm] Clean up unused functions
This change removes some dead code from back in the SVN days. `GetCasedPath()`[1] and `GenFakeDiff()`[2] were a part of the SVN class from when scm.py used to support two scm. `only_int()` was used within `AssertVersion()` which was removed[3]. I could not find any usage for `ValidateEmail()` even within the old commits[4].

[1] https://codereview.chromium.org/538009
[2] https://codereview.chromium.org/1965001
[3] https://crrev.com/c/2116938
[4] https://codereview.chromium.org/501166

Bug: 1475776
Change-Id: I730f0d994d8027bd67587fd16ad1e502bdfb94fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5279813
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
1 year ago
Aravind Vasudevan 9f9bab25da Reland "Update gclient to use git config caching"
This reverts commit 3569608028.

Reason for revert: This includes a fix for crbug.com/324358728.

The rebase-update command has logic which tries to specifically set a key to an empty string and this has been intentionally set this way[1]. The new SetConfig implementation does treats empty string as None and hence tries to unset the config, resulting in error code 5. The patchset 2 fixes this bug and adds a test to ensure SetConfig can set an empty string to be backward compatible.

[1] https://codereview.chromium.org/228353003

Original change's description:
> Revert "Update gclient to use git config caching"
>
> This reverts commit 3edda8d185.
>
> Reason for revert: Breaks rebase-update; crbug.com/324358728
>
> Original change's description:
> > 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>
>
> Bug: 1501984
> Change-Id: I4a603238d9ed43edafc8e574493800670520a1d9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5279198
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>

Bug: 1501984
Change-Id: I405abc16c2ef6f0689031c82c61af71aad302122
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5280779
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
1 year ago
Michael Savigny 2acd6f4c9d Revert "Changing location of temp racing directory."
This reverts commit 566c3772a0.

Reason for revert: Seems to be causing flaky failures in win-trace angle try builder, see b/323830218 for details.

Original change's description:
> Changing location of temp racing directory.
>
> Put temporary racing artifacts into
> .reproxy_tmp/racing/<timestamp>-<hash> in prep for permitting
> simultaneous builds against the same output directory.
>
> Bug: b/321554715
> Change-Id: Iae9af9aed03197184e6d11da010d0bb10779ed23
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5273209
> Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
> Commit-Queue: Michael Savigny <msavigny@google.com>
> Reviewed-by: Junji Watanabe <jwata@google.com>
> Reviewed-by: Ben Segall <bentekkie@google.com>

Bug: b/321554715
Change-Id: Ib6fa285bb435d7c0d82960633364669e6575d73b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5286354
Commit-Queue: Michael Savigny <msavigny@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ben Segall <bentekkie@google.com>
Reviewed-by: Ben Segall <bentekkie@google.com>
Auto-Submit: Michael Savigny <msavigny@google.com>
1 year ago
Gavin Mak 32769fe939 Revert "Deprecate --bypass-watchlists flag"
This reverts commit e98e458a9f.

Reason for revert: keep depot_tools CCing watchers while b/324466185 is open

Original change's description:
> Deprecate --bypass-watchlists flag
>
> CCing watchers is now handled by the Watchlists AyeAye analyzer on
> all Gerrit projects that use it, and not CCing watchers locally has
> no effect. Rely on that instead of logic in git cl.
>
> Bug: 41494851, 40242793
> Change-Id: I58fdf8c0a741a9189cccec3b3b56d0a8a1c44058
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5276660
> Reviewed-by: Scott Lee <ddoman@chromium.org>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Bug: 41494851, 40242793
Change-Id: Ied75beb163b2628343d4dcac5819b5bd77854de8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5281700
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Gavin Mak <gavinmak@google.com>
1 year ago
Arthur Sonzogni aa475e6a12 Revert "Reland "Refactor git functionality out of Change and _DiffCache""
This reverts commit 4d2864f3a1.

Reason for revert: This still doesn't scale well with large commit:
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8756578662173359185/+/u/presubmit/stdout?format=raw

This is now a different instruction called repeatedly needlessly:
```
git -c core.quotePath=false diff -p --no-color --no-prefix --no-ext-diff f0b151b0e519ceb3efae2ad8951d8a9ce86e4fbd...HEAD --no-renames;  cwd=D:\b\s\w\ir\cache\builder\win_presubmit\src
```
called for each affected files.

We probably want to cache the output for this too?

Original change's description:
> Reland "Refactor git functionality out of Change and _DiffCache"
>
> This is a reland of commit dd1a596c3e
>
> It is not a pure reland and adds support for caching submodules.
>
> Original change's description:
> > 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>
>
> Bug: b/323243527
> Change-Id: I74bbb179d4cbda7431101a2d707131fab2093029
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5280620
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Bug: b/323243527, b/324293047
Change-Id: Iffde46facefa9d2e3a0d3a9ab5f8e753c53ea6d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5272317
Auto-Submit: Arthur Sonzogni <arthursonzogni@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
1 year ago
Michael Savigny 566c3772a0 Changing location of temp racing directory.
Put temporary racing artifacts into
.reproxy_tmp/racing/<timestamp>-<hash> in prep for permitting
simultaneous builds against the same output directory.

Bug: b/321554715
Change-Id: Iae9af9aed03197184e6d11da010d0bb10779ed23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5273209
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Michael Savigny <msavigny@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Ben Segall <bentekkie@google.com>
1 year ago
Aravind Vasudevan 05048d2cb0 [scm] Fix _load_config to support multi-line
Bug: 1501984, 324449654
Change-Id: Ibe64317e92731735f4ab23c8491eb42e960f9432
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5279207
Auto-Submit: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
1 year ago
Gavin Mak 4d2864f3a1 Reland "Refactor git functionality out of Change and _DiffCache"
This is a reland of commit dd1a596c3e

It is not a pure reland and adds support for caching submodules.

Original change's description:
> 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>

Bug: b/323243527
Change-Id: I74bbb179d4cbda7431101a2d707131fab2093029
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5280620
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
1 year ago
Aravind Vasudevan 3569608028 Revert "Update gclient to use git config caching"
This reverts commit 3edda8d185.

Reason for revert: Breaks rebase-update; crbug.com/324358728

Original change's description:
> 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>

Bug: 1501984
Change-Id: I4a603238d9ed43edafc8e574493800670520a1d9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5279198
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
1 year ago
Gavin Mak e98e458a9f Deprecate --bypass-watchlists flag
CCing watchers is now handled by the Watchlists AyeAye analyzer on
all Gerrit projects that use it, and not CCing watchers locally has
no effect. Rely on that instead of logic in git cl.

Bug: 41494851, 40242793
Change-Id: I58fdf8c0a741a9189cccec3b3b56d0a8a1c44058
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5276660
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
1 year ago
Arthur Sonzogni b1d51e6113 Revert "Refactor git functionality out of Change and _DiffCache"
This reverts commit dd1a596c3e.

Reason for revert: This doesn't scale well with large commit:
https://issues.chromium.org/issues/324293047

Original change's description:
> 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>

Bug: b/323243527
Change-Id: Ic5179de6744a2ead629f512a5098f6e8c63d01c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5277255
Commit-Queue: Gavin Mak <gavinmak@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
1 year ago
Peter Boström 74a6ca92bb Clean up stacked-changes dogfood
This removes logspam from `git cl` when a user (like me) hasn't opted
either in or out. DOGFOOD_STACKED_CHANGES=1 is the codified behavior.
This removes the DOGFOOD_STACKED_CHANGES=0 opt-out.

Bug: b/265929888
Change-Id: Ia159f898512d815e3a4b76cc8859c599016a7bec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5274266
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
1 year ago
Aravind Vasudevan 784db7a5f0 [git-templates] Remove git-templates
The last usage was removed in https://codereview.chromium.org/348703002.

Bug: 1475776
Change-Id: I4ddfb0c32dbf0294baa43c15ccd0744498cbee6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5264164
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
1 year ago
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