Commit Graph

9115 Commits (38d1673525c0259abaf8d991e472040404dde70c)
 

Author SHA1 Message Date
Richard Wang bb07d9eb0b Remove use_rbe gn arg support
As it is removed in https://crrev.com/c/3744967, this cleans up the check for a no longer existing arg.

Bug: chromium:1247781
Change-Id: Ic7288cf34e63cd52087e2b51f1b4c816bbbc0363
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3745201
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Richard Wang <richardwa@google.com>
3 years ago
recipe-roller 78c53d11a0 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/8809798072144355457

recipe_engine:
bb01260dc9
  bb01260 (alexschulze@chromium.org)
      Revert "[file] Add fail_silently to copy and copytree"

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: I8a9a0b99dc04b341eda782dce6b1f8b272159f75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3741122
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>
3 years ago
Bruce Dawson 6e70e86d6f Fix presubmit_support.py to handle CRLF in PRESUBMIT.py
PRESUBMIT.py files should not have CRLF line endings, but if a git repo
is misconfigured this may happen and it is important for the presubmits
to run properly so that they can report on this issue.

In particular, the regex which detects USE_PYTHON3 = True did not work
with CRLF line endings.

It was supposed to handle these, and there is even a comment saying:

  # Accept CRLF presubmit script.

However the line after that uses 'rU' as the file open mode in order to
try to get universal newlines, but FileRead ignores the file mode. So,
the replace method is now used instead.

Bug: angleproject:7475, angleproject:4905
Change-Id: I38321176feca089a5796b24756b371709d852243
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3739269
Reviewed-by: Eddie Hatfield <eddiehatfield@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Joanna Wang 5a7c824fee [no-sync] Add method to check for diffs between the current checkout and another commit.
Bug: 1339472

Change-Id: If97d2fad7e5c61ec907e15a00db225b653a62bef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3738365
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
3 years ago
Joanna Wang c6798c8989 [depot tools] Update six version.
Change-Id: Ic776edca9a399b4667451e702388c2747d397f9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3738368
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Joanna Wang 18af7efdd8 [no-sync] Update ParseDepsFile to process deps and hooks appropriately with should_sync.
Bug: 1339472
Change-Id: Iea077cdb655105d27431ff4f677d93eec121bc31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3738361
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
3 years ago
recipe-roller 9af90cb59e 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/8809860362074427393

recipe_engine:
2fdd5ba812
  2fdd5ba (jwata@google.com)
      Add fast recipe rollback instrucitons

More info is at https://goo.gl/zkKdpD. 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: Icd28d520df42d17a965a30ad06b5aa836a0fe2b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3739931
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>
3 years ago
recipe-roller 9dec1b42e1 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/8809884896443954673

recipe_engine:
fe626574f3
  fe62657 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 361f01c81b49 to d3fd72180a64

More info is at https://goo.gl/zkKdpD. 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: I25853499048f64c87c231e0e97ed1c469828d717
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3739278
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>
3 years ago
Joanna Wang 6628661eba [no-sync] Add a skip_sync_revisions and process it before running deps.
Bug: 1339472
Change-Id: I429489f7deea035c47e27e32ada858fb8a827643
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3735487
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
3 years ago
manukh 566e9d0177 [git-cl] If set, use `options.title` for initial uploads.
Change-Id: Ia57b7a7b769d352e05820af0e40a52fcab471ddb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3736424
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: manuk hovanesian <manukh@chromium.org>
3 years ago
Joanna Wang 4e6264cc28 [gclient] Specify which DEPS is still using `use_relative_hooks`.
Bug:1107325, 1340011
Change-Id: I90bce90cba2ccf2a37b703b9bad49b5f79cfde33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3738359
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
3 years ago
Vadim Shtayura 0e5881fb4e [cipd] Update the client v2.6.5 => v2.6.7.
Adds support loading the machine-global config file to pick up
location of the admission plugin binary. See the bug for details.

BUG=1310363
R=iannucci@chromium.org
CC=akashmukherjee@google.com

Change-Id: I7a0cec6a994b79929e204766d32e0f9649b9dc8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3736694
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
3 years ago
Yulan Lin e7fd0ca4c5 [verified-builds]: Update lucicfg to 1.31.4
Changes:
- add the "wrapper" parameter to luci.recipe()
- add shadow bucket

Bug:1339006
Change-Id: I0f5c23f631b23b46fb40c728c432fb759bcefd7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3736695
Commit-Queue: Yulan Lin <yulanlin@google.com>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
3 years ago
Will Cassella 253031197f Allow depot_tools/.git to be a file
This CL relaxes the check for the .git folder on Windows so that it
may be either a file or a folder, as may be the case if depot_tools
is a git submodule or a worktree.

Bug: 1333997
Change-Id: Ib805912903696fc247f85d15c35b6e3093cd57f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3736684
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
recipe-roller 4b272722ea 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/8809989966553312161

recipe_engine:
fd20a01913
  fd20a01 (atyfto@google.com)
      [protoc] Use infra/3pp/tools/protoc

More info is at https://goo.gl/zkKdpD. 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: I75523ad6996a45239ac0e9a51bbb83acfb95cca0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3736686
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>
3 years ago
Yuanjun Huang a83ac9395c [depot_tools] roll led
To include https://crrev.com/c/3727771.

all changes:
498086360..675ae8e

Bug:1339383
Change-Id: I54849b921964dea83a3d21a1966de2aa872c643a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3732792
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Yuanjun Huang <yuanjunh@google.com>
3 years ago
recipe-roller 3c4d401cbd 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/8810158576984191137

recipe_engine:
606ae4d1de
  606ae4d (yiwzhang@google.com)
      cv: export config proto from recipe engine

More info is at https://goo.gl/zkKdpD. 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: Ia2b5d78582073ce06e94c9f76ad67fe13f1b9a32
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3731249
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>
3 years ago
Will Cassella 418f021a0e Print helpful error message when updating depot_tools on Windows
The depot_tools directory may get into a state in which its no longer a
git repo, in which case we can't update it. On Windows this would cause
the update_depot_tools.bat script to fail with a somewhat confusing
error message, this CL fixes that to inform the user what happened and
what they should do about it.

Bug: 1333997
Change-Id: I2c60fc46f1fae7811ff6610e25380d08010d0597
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3718926
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Josip Sokcevic 3ffbdfdb1f Set default pylint version to 2.7
This was announced in infra-announce@chromium.org.

R=gavinmak@google.com

Bug: 1105747
Change-Id: I5ac21683ae8b72d7b8f1caacda5dc5faf131fd2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3722041
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
3 years ago
Fumitoshi Ukai 2f3c96d5e4 Roll out goma client VERSION=249
Bug: b/234780712
Change-Id: I61e654896979438a2e8a7de6f7d11c473df0092e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3721609
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
3 years ago
Josip Sokcevic ebccac7185 Remove tmp gclient files on fetch
Regression was introduced as part of gclient_scm change to support cog.
The directory should be cleaned up regardless if is empty or not, and if
statement is used only to warn user about non-empty directory, which si
not expected.

R=jojwang@google.com

Fixed: 1339077
Change-Id: Ie3bc6bcac168bad9cf2cb6adc6ae4024fe9ef167
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3724051
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
3 years ago
Joanna Wang 0a2356cd39 Remove redundant should_process check.
AFAICT
- the code never reaches this point because we already check should process before adding it to the queue. http://shortn/_PWFae17qw4

- this might be necessary if the value of should_process changes between adding it to the queue and running it. But I don't see that happening anywhere. should_process is only ever set and modified here: http://shortn/_eirozAoIm4 which happens during in the parent's run() before the deps get added to the queue.

The should_process check that happens at the beginning of run() was added here: https://codereview.chromium.org/3124017/diff/2001/gclient.py

The should_process check before a deps gets enqueued was added later here: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/559150/

where several should_process checks were added and I think the author just didn't realize that, while the other methods might need them, run() already had a should_process check.

Alternatively, we could remove the should_process check before enqueue-ing. But that would result in enqueuing things that we currently don't enqueue, even if we ultimately don't do anything with it.

Change-Id: Ib3be61310c09a681988baa75fd562c7596e9e044
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3721600
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
3 years ago
recipe-roller d9a9c40738 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/8810528512950350097

recipe_engine:
5a7f940c8e
  5a7f940 (yiwzhang@google.com)
      roll the pin of luci-go proto (excluding buildbucket proto for...

More info is at https://goo.gl/zkKdpD. 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: I3cc6b248d7b6e38cf05a61f413ceb1b5458d82ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3722721
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>
3 years ago
Yiwei Zhang 3ef340ac19 lucicfg: Update from 1.31.2 to 1.31.3
Notable change:
  https://crrev.com/c/3720728: fix bugs when generating location_filter

R=qyearsley, vadimsh

Bug: 1171945
Change-Id: Ifa19ac2b49b0aa1062e0a9c624587c2e78a84a29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3722032
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
3 years ago
Bruce Dawson 1d5d7803fa Make not-run tests an error again
If a presubmit test is misconfigured then it may end up running on
neither Python 2 nor Python 3. This was supposed to trigger a warning
but the warning code was broken for almost a year. It was then fixed so
that it issued an error, but that caused some breakage, so it was made a
warning.

The known problems with tests not running at all have been fixed and
the warning has been on for over two weeks so this change turns the
warning back into an error. This is appropriate because a test that
is not run at all is a serious bug. This change will allow us to move
more confidently when switching tests to Python 3, and it shouldn't
cause any additional breakage.

Bug: 1330859
Change-Id: I51028bb9c896c60c5cf3ccb6f472ade0bb1e0c16
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3717242
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
3 years ago
Vadim Shtayura dd8da39995 [lucicfg] Update 1.30.11 => 1.31.2.
Notable changes:
* Updated `buildifier` dependency, adding more linting checks.
* Experiment to generate `location_filters` in CQ configs:
  https://chromium.googlesource.com/infra/luci/luci-go.git/+/6915bcc1

R=yiwzhang@google.com

Change-Id: I09ba35cf572eaa8cb0478db2bee19f7496f8eaee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3718931
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
3 years ago
Junji Watanabe 350d210871 Revert .cipd_bin setup in depot_tools recipe module
This reverts https://crrev.com/c/3697958 and https://crrev.com/c/3704921.
One reason is that recipe bundle is not designed to be mutated.
Another reason is the presence of gomacc binary under .cipd_bin causes an unexpected side effect. https://crbug.com/1337048

Bug: 931218, 1337048
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: Iaea12a0ad9246c0781035aa499cc6c0bb42d71c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3715873
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
3 years ago
Ergün Erdoğmuş 28190a2f35 Fix not creating GNArgs file when there are multiple dependencies
Bug: 1336227
Change-Id: I53a13b452829f280816cc07a0907958348c23d56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3702359
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
recipe-roller 39e4055004 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/8810710336430356577

recipe_engine:
13b77f0e1d
  13b77f0 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 5f84a66bf481 to 5d9b6ecf87cd

More info is at https://goo.gl/zkKdpD. 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: I8efdd2373d88e3c423a4b51069e6d0e9f3a73528
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3716452
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>
3 years ago
dan sinclair 9a3c4bc67c Add some c++17 headers to the list of known headers.
This CL updates cpplint.py to add some of the c++17 header files to the
list of known c++ headers. We're specifically using optional and variant
in the Tint project and would like to remove the NOLINT lines necessary
to keep the linter happy.

Bug: dawn:1379
Change-Id: I41cacd21e0742f992cdd6913b7f4def556b543c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3709241
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Bruce Dawson 8254f06ba7 Mitigate Python 3 multiprocessing bug on Windows
The multiprocessing module on Windows has a bug where if you ask for
more than 60 child processes then it will hang. This is related to the
MAXIMUM_WAIT_OBJECTS (64) limit of WaitForMultipleObjects. Other sources
have listed the multiprocessing limit as being 61, or have said that the
the maximum number of objects that can be waited on is actually 63, but
those details don't really matter.

The original fix for this class of issues was crrev.com/c/2785844. This
change extends those fixes to depot_tools, which was missed last year.
This change also updates how PyLint is called by further limiting the
number of jobs to the number of files being processed divided by 10.
This is because there is a significant cost to creating PyLint
subprocesses - each takes about 0.5 s on my test machine. So there needs
to be enough parallelism to justify this.

Patches for PyLint and a bug for cpython are planned.

This will stop PyLint from hanging during presubmits on many-core
machines. The command used to reproduce the hangs and validate the fix
was:

  git cl presubmit -v --force --files "chrome/test/mini_installer/*.py"

Prior to this change this command would use (on my many-core test
machine) 96 processes and would hang. How it uses just two processes
because there are only 16 files to analyze.

Output before:
  Pylint (16 files using ['--disable=cyclic-import'] on 96 cores)
Output after:
  Pylint (16 files using ['--disable=cyclic-import'] on 2 processes)

This is actually not quite true because the hang would prevent the
old message from being displayed.

Bug: 1190269, 1336854
Change-Id: Ie82baf91df4364a92eb664a00cf9daf167e0a548
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3711282
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Brian Ryner 6cebde7ca2 Update pylint vpython specs to use a specific minor version.
This is always recommended, since wheel availability varies between
minor versions. We may not support major-version-only specifiers
in the future.

Change-Id: Ib41426fa39212fe3e49d87c1d1c8b5bbc49aef7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3708295
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Brian Ryner <bryner@google.com>
3 years ago
Vadim Shtayura a375d76090 Revert "[lucicfg] Update 1.30.11 => 1.31.1."
This reverts commit 945d6a248f.

Reason for revert: Python portion of CQ doesn't recognize location_filters field.

Original change's description:
> [lucicfg] Update 1.30.11 => 1.31.1.
>
> Notable changes:
> * Updated `buildifier` dependency, adding more linting checks.
> * Experiment to generate `location_filters` in CQ configs:
>   https://chromium.googlesource.com/infra/luci/luci-go.git/+/6915bcc1
>
> R=​qyearsley@chromium.org
>
> Change-Id: I2874251e40b857ce671200f69ea172e20227584c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3704326
> Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
> Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>

Change-Id: If660f21ff0127d38b5be48e1a0ac3690d5146b1d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3709407
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Vadim Shtayura <vadimsh@chromium.org>
3 years ago
Vadim Shtayura 945d6a248f [lucicfg] Update 1.30.11 => 1.31.1.
Notable changes:
* Updated `buildifier` dependency, adding more linting checks.
* Experiment to generate `location_filters` in CQ configs:
  https://chromium.googlesource.com/infra/luci/luci-go.git/+/6915bcc1

R=qyearsley@chromium.org

Change-Id: I2874251e40b857ce671200f69ea172e20227584c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3704326
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
3 years ago
recipe-roller 505a265e52 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/8811179050635971201

recipe_engine:
bc859d1d57
  bc859d1 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from e5e97e5390db to df39938896c4

More info is at https://goo.gl/zkKdpD. 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: I97e2c36954dc1818cb21ded8310395f6569ded85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3708716
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>
3 years ago
Junji Watanabe 93fbd989e0 Revert "Retry switching to use CIPD ninja v1.8.2"
This reverts commit 3133f98f3f.

Reason for revert: angle recipe fails to find third_party/depot_tool/ninja.exe
https://luci-milo.appspot.com/ui/p/angle/builders/try/win-trace/2061/overview

https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/tests/capture_replay_tests.py;l=134;drc=1d67951e0851d855c016c04cd5d11e10a0e12454

Original change's description:
> Retry switching to use CIPD ninja v1.8.2
>
> This reverts commit 0a5bae7ebc + some modifications on recipe module.
>
> The previous CL https://crrev.com/c/3697958 ensures depot_tools/.cipd_bin in recipe environments. This CL copies ninja.exe from .cipd_bin to depot_tools root as cipd_bin_setup.bat.
> For developers, it's expected to run update_depot_tools which triggers cipd_bin_setup.
> For CI/CQ, depot_tools._cipd_bin_setup() should be called before using ninja/autoninja recipe module APIs.
>
> Builds with depot_tools recipe bundle are tested using led.
>
> # Windows
> > led get-build 8811491780369249585 | led edit-recipe-bundle -O depot_tools="$HOME/depot_tools" | led launch
> https://ci.chromium.org/swarming/task/5b7512ee9d91fc10?
>
> # Linux
> > led get-build 8811504372914233697 | led edit-recipe-bundle -O depot_tools="$HOME/depot_tools" | led launch
> https://ci.chromium.org/swarming/task/5b7515832d0f7c10
>
> Original change's description:
> > Revert "Switch to use CIPD ninja v1.8.2"
> >
> > This reverts commit c90a982106.
> >
> > Reason for revert:
> > https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8811949917908303825/+/u/compile/stdout
> >
> > Original change's description:
> > > Switch to use CIPD ninja v1.8.2
> > >
> > > https://crrev.com/c/3674981 installed CIPD ninja packages.
> > > This CL switches from the old ninja binaries to them.
> > >
> > > Note that this CL doesn't change ninja version. the old/CIPD ninja binaries are v1.8.2.
> > >
> > > The differences from the old binaries are
> > > - the CIPD packages don't use chromium's clang.
> > > - the CIPD package for Linux doesn't use chromium's sysroot.
> > > - the min macOS version is 10.13, which was 10.6.
> > > Please also see https://crsrc.org/i/3pp/ninja/install_bootstrap.sh
> > >
> > >
> > > On Windows, ninja.exe will be installed under .cipd_bin.
> > > But there are many places that assume that ninja.exe exists on depot_tools root. So this CL also copies the ninja.exe from .cipd_bin to root in cipd_bin_setup.bat.
> > >
> > > Bug: 931218
> > > Change-Id: Ib67eee5e9b6ad9b2937b789626970d9c85867dbd
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3674982
> > > Commit-Queue: Junji Watanabe <jwata@google.com>
> > > Reviewed-by: Philipp Wollermann <philwo@google.com>
> > > Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
> > > Reviewed-by: Nico Weber <thakis@chromium.org>
> > > Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> >
> > Bug: 931218
> > Change-Id: I08d61dad119a0d23ae9ec8b1ed787dd3915de697
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3686854
> > Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> > Owners-Override: Takuto Ikuta <tikuta@chromium.org>
>
> Bug: 931218
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: chrome_release
> Recipe-Nontrivial-Roll: infra
> Change-Id: Ic7a9395c0e858823375f1a6ec79034dbc54230bb
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3696963
> Reviewed-by: Fumitoshi Ukai <ukai@google.com>
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Junji Watanabe <jwata@google.com>
> Reviewed-by: Takuto Ikuta <tikuta@chromium.org>

Bug: 931218
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: infra
Change-Id: I6d44be002940331eb4b7cf88ca7aa1e717ba1514
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3708294
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Owners-Override: Takuto Ikuta <tikuta@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
3 years ago
Junji Watanabe ecb22a6b70 Revert "Check-in CIPD ninja.exe as a workaround"
This reverts commit c5c48533cf.

Reason for revert: This breaks infra builders.
https://ci.chromium.org/ui/p/infra/builders/try/infra-try-win/b8811240099559668929/overview
https://ci.chromium.org/ui/p/infra/builders/ci/infra-continuous-win10-64/34002/overview


Original change's description:
> Check-in CIPD ninja.exe as a workaround
>
> There are still some places that directly calls depot_tools/ninja{,.exe} without ensuring .cipd_bin dir.
> This is a binary build on 3pp CIPD pipeline specified in cipd_manifest.txt.
>
> Bug: 931218
> Change-Id: I9f455bf47d648ce8e5bf74bd6c6d356867766314
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3708571
> Auto-Submit: Junji Watanabe <jwata@google.com>
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Bug: 931218
Change-Id: I3f93f029ef6e81f022007cd2ce273d2dd87fd2d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3708293
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Owners-Override: Takuto Ikuta <tikuta@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
3 years ago
Junji Watanabe c5c48533cf Check-in CIPD ninja.exe as a workaround
There are still some places that directly calls depot_tools/ninja{,.exe} without ensuring .cipd_bin dir.
This is a binary build on 3pp CIPD pipeline specified in cipd_manifest.txt.

Bug: 931218
Change-Id: I9f455bf47d648ce8e5bf74bd6c6d356867766314
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3708571
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Junji Watanabe 7ff520f026 call _cipd_bin_setup() in depot_tools.on_path() recipe module API
Some users call ninja/autoninja inside a depot_tools.on_path() context.
e.g. https://source.chromium.org/chromium/chromium/tools/build/+/main:recipes/recipes/chromium_upload_clang.py;l=92;drc=5bf3de010da6bd44d776f98c136e3b41f82cdfe8

Tested on a led build.
https://ci.chromium.org/swarming/task/5b802dcdfe0a2810

Bug: 931218
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: If3ece36c1d6590d30bc071deba6387d39b7c33a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3704921
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
3 years ago
Junji Watanabe 3133f98f3f Retry switching to use CIPD ninja v1.8.2
This reverts commit 0a5bae7ebc + some modifications on recipe module.

The previous CL https://crrev.com/c/3697958 ensures depot_tools/.cipd_bin in recipe environments. This CL copies ninja.exe from .cipd_bin to depot_tools root as cipd_bin_setup.bat.
For developers, it's expected to run update_depot_tools which triggers cipd_bin_setup.
For CI/CQ, depot_tools._cipd_bin_setup() should be called before using ninja/autoninja recipe module APIs.

Builds with depot_tools recipe bundle are tested using led.

# Windows
> led get-build 8811491780369249585 | led edit-recipe-bundle -O depot_tools="$HOME/depot_tools" | led launch
https://ci.chromium.org/swarming/task/5b7512ee9d91fc10?

# Linux
> led get-build 8811504372914233697 | led edit-recipe-bundle -O depot_tools="$HOME/depot_tools" | led launch
https://ci.chromium.org/swarming/task/5b7515832d0f7c10

Original change's description:
> Revert "Switch to use CIPD ninja v1.8.2"
>
> This reverts commit c90a982106.
>
> Reason for revert:
> https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8811949917908303825/+/u/compile/stdout
>
> Original change's description:
> > Switch to use CIPD ninja v1.8.2
> >
> > https://crrev.com/c/3674981 installed CIPD ninja packages.
> > This CL switches from the old ninja binaries to them.
> >
> > Note that this CL doesn't change ninja version. the old/CIPD ninja binaries are v1.8.2.
> >
> > The differences from the old binaries are
> > - the CIPD packages don't use chromium's clang.
> > - the CIPD package for Linux doesn't use chromium's sysroot.
> > - the min macOS version is 10.13, which was 10.6.
> > Please also see https://crsrc.org/i/3pp/ninja/install_bootstrap.sh
> >
> >
> > On Windows, ninja.exe will be installed under .cipd_bin.
> > But there are many places that assume that ninja.exe exists on depot_tools root. So this CL also copies the ninja.exe from .cipd_bin to root in cipd_bin_setup.bat.
> >
> > Bug: 931218
> > Change-Id: Ib67eee5e9b6ad9b2937b789626970d9c85867dbd
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3674982
> > Commit-Queue: Junji Watanabe <jwata@google.com>
> > Reviewed-by: Philipp Wollermann <philwo@google.com>
> > Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Reviewed-by: Josip Sokcevic <sokcevic@google.com>
>
> Bug: 931218
> Change-Id: I08d61dad119a0d23ae9ec8b1ed787dd3915de697
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3686854
> Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Owners-Override: Takuto Ikuta <tikuta@chromium.org>

Bug: 931218
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: infra
Change-Id: Ic7a9395c0e858823375f1a6ec79034dbc54230bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3696963
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
3 years ago
recipe-roller 407333d424 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/8811411832944140097

recipe_engine:
57e0012cfe
  57e0012 (olivernewman@google.com)
      [cas] Add log_level arg to archive()

More info is at https://goo.gl/zkKdpD. 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: If9036779b5db21f13d0245f85456061afc96e4f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3704761
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>
3 years ago
Junji Watanabe b6030901cf Setup cipd bin before calling ninja/autoninja
Tested in led builds on chromium/tools/build repo.

# Linux
```
> led get-build 8811504372914233697 | led edit-recipe-bundle -O depot_tools="$HOME/depot_tools" | led launch
...
https://ci.chromium.org/swarming/task/5b749884a3f3fa11
```

# Windows
```
> led get-build 8811491780369249585 | led edit-recipe-bundle -O https://ci.chromium.org/swarming/task/5b74bc67963d7610
```

Bug: 931218
Change-Id: I4a967f7544f71a9fef8a44baad45196365659596

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: infra
Change-Id: I4a967f7544f71a9fef8a44baad45196365659596
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3697958
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
3 years ago
Aravind Vasudevan 810598d1f3 Add protocol_override entry to .gclient
The meta quest browser has an issue with the initial design where the all the dependencies within the same tree are overridden with the solution URL's scheme. This fix updates fetch to add a .gclient entry instead of implicitly overriding the URL's scheme.

Bug: 1336027
Change-Id: Iabe5b9017f6eb9e682a0c721f43dd5f347ffcbfb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3703942
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Aleksey Khoroshilov 544594e0b2 Reland "Make depot_tools scripts return exit codes properly on all platforms."
This reverts commit 6754c49e02.

Reason for revert: will be relanded with fixed batch comments that triggered parser error.

Original change's description:
> Revert "Make depot_tools scripts return exit codes properly on all platforms."
>
> This reverts commit 7c4f7ec408.
>
> Reason for revert: bugs reported by users (see comments in Gerrit).
> error: block. was unexpected at this time.
>
> Original change's description:
> > Make depot_tools scripts return exit codes properly on all platforms.
> >
> > Changes:
> > 1. Windows: exit /b %errorlevel% should be used instead of goto :EOF to get valid exit codes during cmd /c <script>.bat invocation.
> > 2. Windows: delayed var expansion is required in update_depot_tools.bat exit code generation.
> > 3. Posix: update_depot_tools returns exit code from update_git_repo function in case of a failure.
> >
> > A rule of thumb on Windows: goto :EOF should not be used if %errorlevel% must be returned for all possible invocations.
> >
> > Test case for update_depot_tools changes:
> > 1. Make a change to depot_tools sources that will conflict with next depot_tools update
> > 2. Run update_depot_tools either directly or via gclient
> > 3. Expect a git error is triggered
> > 4. Inspect %errorlevel% or $? depending on platform
> > 5. Expected 1, but the actual result is 0.
> >
> > Test case for changes in other .bat files:
> > 1. Make a change to depot_tools sources that will conflict with next depot_tools update
> > 2. Run cmd /c gclient
> > 3. Expect a git error is triggered
> > 4. Inspect %errorlevel%
> > 5. Expected 1, but the actual result is 0.
> >
> > Change-Id: I64459982bcd9cc3db1319a9b39224b7a7af8c5aa
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3688632
> > Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> > Commit-Queue: Josip Sokcevic <sokcevic@google.com>
> > Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
> > Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
>
> Change-Id: I85d598af01d75588cdee77165d6af22270ee031d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3694139
> Auto-Submit: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Change-Id: I377f966ea1b1a567de815caca703b5e124a76b64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3696396
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
3 years ago
recipe-roller 6fbb744238 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/8811716339900330657

recipe_engine:
dfb53acac9
  dfb53ac (jkusuma@google.com)
      Update resultdb recipe module to support gcs uri.

More info is at https://goo.gl/zkKdpD. 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: I873e31a9bd0d955f7f04b11305874c6f083840e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3699409
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>
3 years ago
Bruce Dawson f2b0421fff Report when vpython (Python 2) is run during presubmits
While all Chromium PRESUBMIT.py scripts have been running on Python 2
for a long time they continue to invoke child scripts under Python 2.
Part of the reason for slow progress on this transition is that it is
not easy to tell that this is happening, and most developers probably
assume that Python 3 presubmits implies a lack of Python 2.

This change adds a warning when it detects Python 2 scripts being run.
Typical output (edited for clarity) looks like this:

  git cl presubmit --files "chrome/updater/tools/*;ppapi/generators/*"
...
  Python 2 scripts were run during Python 3 presubmits. Please ask ??? if help is needed in preventing this.
   "depot_tools\pylint-1.5" --args-on-stdin from chrome\updater\tools \
   "depot_tools\pylint-1.5" --args-on-stdin from chrome\updater\tools \
   idl_tests.py from ppapi\generators

If Python 2 scripts launch child scripts, especially if they use
sys.executable, then they will not be reported. However this is a good
thing because it means that the report focuses on the top-level scripts
that drive Python 2 usage.

This change works by modifying vpython.bat to write invocation
information to a text file. The data in this text file is picked up by
presubmit_support.py when it finishes running a set of presubmits.

Bug: 1313804
Change-Id: Ic632b38eae07eca2e02e94358305cc9c998818e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3699002
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Joanna Wang a9467d8216 Remove duplicate sparse-checkout call.
Bug:1330629
Change-Id: Ieccf72c75dda7cbec473fcfa07d25fb59f8eb7c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3689728
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Josip Sokcevic a4b3602457 Use remote information about default branch
When initializing git_cache repository, we can't assume the default
branch is main. This results in HEAD pointing to invalid ref for repos
that don't have main branch.

Instead, fetch information from remote git repository.

R=gavinmak@google.com

Fixed: 1334889
Change-Id: I84e6d8e09c81bdae7e5e31af88973534431824e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3696906
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Junji Watanabe eb8db11557 Add .cipd_impl.ps1 to recipe bundle
https://crrev.com/c/3686855 missed this file to run cipd.bat.

Bug: 931218
Change-Id: Ib4f8d9d31c259477d5531f32bf1e6f44d71d2ace
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3697956
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
3 years ago
Leszek Swirski c1c45f8a85 [gerrit] Add more gerrit API wrappers
Add helpers to gerrit_util for:

  * Setting the commit message on a ChangeEdit,
  * Creating a cherry-pick,
  * Getting the contents of a file in a change.

Bug: v8:12849
Change-Id: I1a5de3054a366d480def32942fd42be179ffb749
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3683383
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago