Commit Graph

8767 Commits (c4b1b772bc4e6ff8dfd6d76166b739c5953a1f7b)
 

Author SHA1 Message Date
Bruce Dawson c4b1b772bc Prevent path-pollution from vpython3.bat
vpython3.bat adds an entry to the path. Unfortunately that modification
persists after the batch file returns. Repeated running of vpython3.bat
will eventually grow the path so long that the command to update the
path exceeds the 8191 character cmd.exe command-length limit. This can
most easily be seen by repeatedly running this command:

    vpython3 -c "print('Hello world!')" && set path | wc

After about 35 invocations (dependent on exact system setup) this
happens:

    >vpython3 -c "print('Hello world!')" && set path | wc
    The input line is too long.
    The syntax of the command is incorrect.

This batch also (but less critically) leaks the PYTHON3_BIN_RELDIR
environment variable.

The fix is to add a setlocal command to keep environment changes local.

Bug: 1003139
Change-Id: I11a31e1013017da702299bfe8eb4888985c228f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3566378
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Fumitoshi Ukai a9c548efd6 Roll out goma client VERSION=244
Bug: b/223292635
Change-Id: I7347c16be3dd70ef0c4fcc22334b4e1b1b3f7e7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3566337
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
3 years ago
Bruce Dawson db8622bc6b Ensure _PresubmitResult._message is text
It is easy to get type confusion and end up passing a list as the
message parameter to _PresubmitResult. This error will not be detected
until the end of the run - perhaps hours later - when all evidence of
where the list came from is lost.

This change ensures that the message parameter is a string. If it is not
then the exception that is thrown should allow quick identification of
the problematic code.

This also fixes a presubmit unit test that passed None as the message.
We could support that but I don't think that we should.

Bug: 1309977
Change-Id: Ifb1d5100d47922b0ebd8bb834caa6fbba690b43c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3566436
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Josip Sokcevic 017544dc14 Add git cl presubmit --files
Chromium's presubmits contain a lot of latent errors - presubmit errors
that will trigger the next time a file is modified, but have been
waiting for years. Flushing those out with "git cl presubmit --all"
works poorly because it exercises all presubmits simultaneously, which
is too slow and triggers too many failures. Adding a --files option lets
small areas of the tree or specific file types to be exercised in a
controlled manner.

Bug: 1311697
Change-Id: I36ec6a759a80000d6ed4a8cc218ece327d45f8d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3559174
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
3 years ago
Matt Mueller 7f02c0d981 Add *.ts (typescript files) to git-gs
Change-Id: I8fc0161d01caf7adb9298f3ef76cd4e7cd69d771
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3561270
Auto-Submit: Matt Mueller <mattm@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
3 years ago
Andrey Kosyakov c0169f32a3 Skip depot_tools update for gclient recurse
update_depot_tools has become chatty since https://crrev.com/c/3556588,
which interfers with processing output from commands being recursed.

Change-Id: I47ea49fbe2b1c196562ef8389d981abe8eb5788b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3561658
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Auto-Submit: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic 0213e4b2d8 Print updating depot_tools in stderr
stdout print statement may interfere with automated tooling. Instead,
this prints the warning to stderr. See: https://crrev.com/c/3556588

R=gavinmak@google.com
Change-Id: I3fb72b7ab4afe42cb83ea5e506292f3e6e5ea8d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3561445
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
3 years ago
recipe-roller 575321a239 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/8818269521590158689

recipe_engine:
83eab4616e
  83eab46 (whesse@google.com)
      [buildbucket] Relax type check on buildbucket ids

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: Ic7ead94e12af6cfb42488815ef55e90bd67865e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3560081
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
Chan Li 8dd5e6278f [depot_tools] roll dirmd
To release https://chromium-review.googlesource.com/c/infra/infra/+/3558516

Bug: 1285078
Change-Id: If7e00c21ffb5945f04e130a2c4bb28a6da862211
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3558021
Auto-Submit: Chan Li <chanli@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
3 years ago
Bruce Dawson 028f4615ad Fix CheckDirMetadataFormat for Windows command limits
CheckDirMetadataFormat executes dirmd on all applicable files. When
running "git cl presubmit --all" that ends up being ~7,500 files and
the command line that is generated is ~500,000 characters. Windows does
not like that.

This change breaks up the check into multiple invocations of dirmd in
order to avoid these limits. This is important because running all
presubmits is the only way to systematically find bugs, and avoid being
surprised by them when submitting a change.

Bug: 1309977
Change-Id: I24fbc340cdb975dbe7f6a2132e516d6f7e2f9165
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3554633
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Bruce Dawson 8fa42e2b5c Improve git cl presubmit --all output
When running git cl presubmit --all  which is handy for finding
latent presubmit bugs, the 'No diff found for %s' gets printed many
thousands of times, making actual issues difficult to find. This change
suppresses that message, to make actual issues easier to find.

The message for slow presubmits prints the name of the slow presubmit,
but there are 243 different CheckChangeOnCommit functions, so the name
is actually not sufficient. Therefore this change plumbs through the
path to the script containing the presubmit and prints it.

Similarly, the cpplint message "Done processing %s" doesn't add enough
value.

These changes will make it easier to find the signal in the presubmit
noise.

Bug: 1309977
Change-Id: Iba40b5748266e3296eeb530bb00182db4814aa5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3556594
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Josip Sokcevic f560d36bba Let user know when depot_tools is being updated.
R=gavinmak@google.com

Change-Id: Ieacc0cbe21a5b7216bb8057b3a81139f2d2c608e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3556588
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
3 years ago
Chan Li 5ce78e1a3f Roll dirmd
Bug: 1285078
Change-Id: I9dd8b94ecf3b9c936474d5447ec2f3a27e66ff0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3555575
Auto-Submit: Chan Li <chanli@chromium.org>
Reviewed-by: Yuanjun Huang <yuanjunh@google.com>
Commit-Queue: Yuanjun Huang <yuanjunh@google.com>
3 years ago
recipe-roller 6445e79ff5 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/8818423030123458017

recipe_engine:
f15df273f1
  f15df27 (chanli@chromium.org)
      Extend placeholder.py to schedule child builds

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: I1ea7e4e3ef5e08d186699652e868e943aa785992
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3554910
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 01a4536ff8 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/8818784791056569841

recipe_engine:
826d446ec1
  826d446 (kimstephanie@google.com)
      Add new post_process.PropertiesContain to check that key exists

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: Idbdcabdf3492aa6feb63000e42704645f16a46d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3550128
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 62396c5a83 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/8818837640083038065

recipe_engine:
14202da142
  14202da (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from addd54e4fcef to 6da0608e4fa8

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: Ib1cff6d3699af311d2cad63203b4e68ea7e5c1d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3547312
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 2bb5737a65 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/8818859027517432961

recipe_engine:
6d2e271e26
  6d2e271 (gredelston@google.com)
      walkthrough.md: Fix incorrect kwarg "output"

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: I4eb64c382f0425421442b5f2e061fb9d0d709618
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3547302
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 b7f4890531 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/8818861546960423089

recipe_engine:
b788d0a7f9
  b788d0a (vadimsh@chromium.org)
      [scheduler] Expose job ID and invocation ID.

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: I84414ae0738ec657d7c04b6c85c4b827211a85f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3546041
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
Josip Sokcevic 4de5deacd4 Explicitly run everything with python3
R=aravindvasudev@google.com, gavinmak@google.com

Change-Id: Iaa5e960c6226dea3a0814c7cb778d952eafb1502
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3525960
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Aravind Vasudevan 075cd76fe6 Update argument parsing to use argparse
This CL updates argument parsing mechanism from using a custom implementation + optparse to argparse. It is intended to clear tech debt for future changes.

Change-Id: I06ba5d3c532638a7970be960e02ebbafbea9dcb0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3541479
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Robert Iannucci e7eb3eb81a Roll lucicfg to v1.30.11
This is to pick up
6a48964ed4

R=vadimsh

Bug: 1288635, 1306248
Change-Id: I38787b5144641b8d291a29d1361a2cc972f08082
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3543152
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
3 years ago
Ryan Heise d8464b8528 Update Pinpoint CLI to remove some useless prints
Bug:1281693
Change-Id: Ia0a721b42f71aab1ea728c5ae8c5975c3f50267c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3543680
Commit-Queue: Ryan Heise <heiserya@google.com>
Auto-Submit: Ryan Heise <heiserya@google.com>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
3 years ago
Chris Blume bd68291e20 Reland "Support multiple VS installations" (with fix)
This reverts commit 9ce8be3339.

Reason for revert: To apply fix

Original change's description:
> Revert "Support multiple VS installations"
>
> This reverts commit 36d41ceff8.
>
> Reason for revert: Script references VS_VERSION variable that was
> renamed in the prior change, so it doesn't work.
>
> Original change's description:
> > Support multiple VS installations
> >
> > Currently, package_from_installed.py assumes only one version of VS is
> > installed. It takes the path of the first installation.
> >
> > This could be incorrect in several ways:
> > - Maybe both 2017 and 2019 (the supported versions) are installed and
> >   although the user specified using 2019, the 2017 path comes first.
> > - Maybe 2019 and 2022 are installed, and the 2022 path is used even
> >   though it isn't supported.
> >
> > This CL fixes that issue by parsing the vswhere.exe output to confirm
> > the VS version matches what the user specified, using its corresponding
> > path.
> >
> > Change-Id: I2029a4f7126d0a45b5370ad58ab257df55571b3b
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3458722
> > Reviewed-by: Gavin Mak <gavinmak@google.com>
> > Reviewed-by: Chris Blume <cblume@chromium.org>
> > Commit-Queue: Chris Blume <cblume@chromium.org>
> > Auto-Submit: Chris Blume <cblume@chromium.org>
>
> Change-Id: I3d9147a7786f7f54f861087d16967b75d4afe2c5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3504193
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>

Change-Id: Ica90cb8d5ce08b8b127da64969401cb40d4aee63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3497899
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
3 years ago
recipe-roller 57629303a2 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/8819037709122726049

recipe_engine:
3db9e1bd1e
  3db9e1b (chanli@chromium.org)
      Reland "[recipe-py] buildbucket: enable buildbucket tracking pa...

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: I47c4f5d549c3ba93fd7b788fe3f8cd860d638f82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3541481
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
Josip Sokcevic 0399e1762c Add a basic depot_tools version information
depot_tools has no versioning. It's hard to know if reported issues were
caused due to outdated depot_tools or actual unresolved bug.

This CL adds basic information about depot_tools version and it's
included in presubmit failure.

R=aravindvasudev@google.com, gavinmak@google.com

Change-Id: If8577c0826063693a7278a57a0cce629d4b1325f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3541061
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Ryan Macnak fd032192ed Update cpplint.py's interpreter directive to python3.
Change-Id: Ic6c1ebd049350348cdd0cd4db717bda8c6f3dc34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3540610
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
3 years ago
Aleksey Khoroshilov df3228656a Set errorlevel in .bat wrappers on exit /b where appropriate.
Fixed goma_auth/ctl return code on Windows which was always zero.
Fixed other places where exit /b was used without %errorlevel%.

Change-Id: Ib0a647818c595f843a95762db023b111a447a66a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3532153
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic 6ec83a2426 Revert "Add VPYTHON_BYPASS support for vpython on Windows"
This reverts commit bc93924b3b.

Reason for revert: https://crbug.com/1308393

Original change's description:
> Add VPYTHON_BYPASS support for vpython on Windows
>
> At Postman, we use a custom build of Electron which is built using a set
> of tools that are managed by us. Till now, we were using the
> VPYTHON_BYPASS environment variable to use our own managed version of
> Python on macOS but unfortunately, on Windows, depot_tools doesn't
> respect the value of this variable, so this change adds support for that
> on Windows too.
>
> Signed-off-by: Darshan Sen <raisinten@gmail.com>
> Change-Id: I63da0495463ace87d34c3c6fad1c03dee108d14b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3525642
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Bug: 1308393
Change-Id: I8cea8827e185d516b8f860b2aa8a8f21a75a8b1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3539039
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Chenlin Fan f0bc2d2404 New vpython in depot_tools
This is a reland of crrev/c/3461263 with fix for crbug/1298289

This change includes commits:
0a242ce3e02a0e7d9c519601ed4fafb073fc98da Update vpython tests to use py3
fc06fd6815873bc40819476f88808b61ac447739 Change vpython spec search order
c6a2eb6ed31e0c815d7f28a42d7f12ee4cb47119 Update to latest virtualenv package.
038156fc1ffffa56b19c2c60674415eceb95f6bc New virtualenv to vpython.
ef44f81748a55c3aaf028ccfa2ee11876cee1285 Fix vpython filelock
275c4196540e1ca41384031b292ad0b89393a5dc Revert "Fix vpython filelock"
8aadd8b60a6d3801f62c7e5cebdfe3dc828a1546 Fix vpython filelock
43c99d88a24870240c9ca50d67dcfade40b516cc Use resolved path when searching spec
ffda9381bc01fd33e3c5a889e2ed374312c64ec6 Don't eval python symbol link on windows
30a66930f4037fff949d36c45b12f60a40ec524b Include GOARCH to verify cached environment
748dcd23529b6b138424914f1e6e265ed70d377b [vpython] Add period to log

Bug:1279621,1158462,1278132,1279684
Change-Id: I224d6abf6e106116da83aa2c34447e8601e48c67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3530470
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Chenlin Fan <fancl@chromium.org>
3 years ago
Chan Li fbb927599f [depot_tools] roll led
This is to release below changes to get led ready for bbagent get-build mode
crrev.com/c/3511002
crrev.com/c/3507137

Bug:  1219018
Change-Id: I05b383f527f30e4caa0b2d399b8c5c8123470a64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3536929
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Chan Li <chanli@chromium.org>
3 years ago
Darshan Sen bc93924b3b Add VPYTHON_BYPASS support for vpython on Windows
At Postman, we use a custom build of Electron which is built using a set
of tools that are managed by us. Till now, we were using the
VPYTHON_BYPASS environment variable to use our own managed version of
Python on macOS but unfortunately, on Windows, depot_tools doesn't
respect the value of this variable, so this change adds support for that
on Windows too.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
Change-Id: I63da0495463ace87d34c3c6fad1c03dee108d14b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3525642
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
recipe-roller 76979dae56 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/8819395691922433665

recipe_engine:
9eef3210f8
  9eef321 (gbeaty@chromium.org)
      Prevent creation of candidates for dependencies of dependencies.

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: I3c6990049765208e9f11a3e3115fb96fad895ac8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3534725
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 950a6b4225 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/8819498242767688273

recipe_engine:
c827c1b6bb
  c827c1b (chanli@chromium.org)
      Revert "[recipe-py] buildbucket: enable buildbucket tracking pa...

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: I8420e3748e71b20d3b8164b7b1d9207a6c6beb33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3530536
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 b199f54926 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/8819602052226167377

recipe_engine:
087afb884a
  087afb8 (chanli@chromium.org)
      [recipe-py] buildbucket: enable buildbucket tracking parent/chi...

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: I903b335f31dbb9da87162590824c332e4034778f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3527073
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 79b4bab70c 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/8819641688027070305

recipe_engine:
cde011f97c
  cde011f (machenbach@chromium.org)
      [led] Add common logic to trigger a builder

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: I719569bd59dc779ee75b3150dcbbc9096eafb9c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3524133
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
Stephanie Kim 3481645827 Check if json exists in ensure_checkout's finally block
The step_result json can currently be empty if the orchestrator build
is canceled while running bot_update. Trying to do
step_result.json.output in the finally block raises an "Uncaught
exception AttributeError".
Ex: https://ci.chromium.org/ui/p/chromium/builders/try/win10_chromium_x64_rel_ng/1121568/overview

This change checks for the json attr before trying to read json.output.

Bug: 1305332
Change-Id: I1dc277642ece1b96144be6381a7c4b8426cb2bc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3518372
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
3 years ago
Ravi Mistry c848a4ed33 Fix host and repo parsing for download-topics
Previous code was incorrectly assuming that the repo name always matched the host name.

Bug: chromium:1298922
Change-Id: Ic90ed585503d721f4d771b4f390a04c7f5b26622
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3507359
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Ravi Mistry <rmistry@chromium.org>
3 years ago
Josip Sokcevic 1909696991 Reland "Update gsutil to use gsutil version 4.68"
This is a reland of commit 8edc960e9a

Original change's description:
> Update gsutil to use gsutil version 4.68
>
> We can't yet upgrade to version 5.x since it's only py3 compatbile and
> some builders still rely on running gsutil with py2.
>
> R=gavinmak@google.com
>
> Bug: 1184108
> Change-Id: I002cc3625a2184ab42383b88a014c0631d1a33ee
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3508516
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Bug: 1184108
Change-Id: I8f4b726c203ed12d415deeec249972fe855b59c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3514940
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Louis Romero 4ca9e1c783 Remove extraneous newlines from presubmit output
Prior to this CL, we have:

```
Running Python 2 presubmit upload checks ...

Python 2 presubmit checks passed.
Running Python 3 presubmit upload checks ...

Presubmit checks took 10.2s to calculate.

Python 3 presubmit checks passed.
 ios/chrome/browser/... | 20 +++++++++-----------
...
```

The first two checks are harder to parse with the newlines. This CL removes
them:

```
Running Python 2 presubmit upload checks ...
Python 2 presubmit checks passed.

Running Python 3 presubmit upload checks ...
Presubmit checks took 10.2s to calculate.
Python 3 presubmit checks passed.

 ios/chrome/browser/... | 20 +++++++++-----------
...
```

Change-Id: Iaf7ac4b203c401f60d74884fd9bdd3ba4ee12c20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3512873
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Louis Romero <lpromero@chromium.org>
3 years ago
Gavin Mak 37db69d46c Revert "Update gsutil to use gsutil version 4.68"
This reverts commit 8edc960e9a.

Reason for revert: potentially breaking chromeos builders

Original change's description:
> Update gsutil to use gsutil version 4.68
>
> We can't yet upgrade to version 5.x since it's only py3 compatbile and
> some builders still rely on running gsutil with py2.
>
> R=​gavinmak@google.com
>
> Bug: 1184108
> Change-Id: I002cc3625a2184ab42383b88a014c0631d1a33ee
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3508516
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Bug: 1184108
Change-Id: I40ce645ebd928c63116012353c632026c787b154
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3514508
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
3 years ago
Yulan Lin 48034f273b [lucicfg]: uprev lucicfg
Bug:1094754
Change-Id: Ib644df8f2979f7059925d42f183c3df0b55d6b43
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3500693
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Yulan Lin <yulanlin@google.com>
3 years ago
Chris Blume fba3a30684 Only call GetVSPath() once
Currently, GetVSPath() is called twice. The result if that call is used
locally in both situations.

This commit makes only one call, passing the result to where it is
needed.

Change-Id: I186bd7f0387091ad16c2791de99d1de8a89f266c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3510528
Auto-Submit: Chris Blume <cblume@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Darshan Sen 1b4881c930 Fix vpython3 version mismatch error
I ran into this error coming from the gclient.py script when I was
trying to run it on a Cygwin setup on Windows:

...
________ running 'vpython.bat -vpython-spec src/.vpython -vpython-tool install' in '/c/Users/circleci/project'
Hook 'vpython.bat -vpython-spec src/.vpython -vpython-tool install' took 34.10 secs
________ running 'vpython3 -vpython-spec src/.vpython3 -vpython-tool install' in '/c/Users/circleci/project'
[E2022-02-17T07:07:56.374746Z 10204 0 annotate.go:273] goroutine 1:
#0 go.chromium.org/luci/vpython/venv/config.go:309 - venv.(*Config).resolvePythonInterpreter()
  reason: none of [C:/Users/circleci/project/vendor/depot_tools/bootstrap-2@3_8_10_chromium_23_binpython3bin/python3] matched specification 3.8.0

#1 go.chromium.org/luci/vpython/venv/config.go:153 - venv.(*Config).resolveRuntime()
  reason: failed to resolve system Python interpreter

#2 go.chromium.org/luci/vpython/venv/venv.go:143 - venv.With()
  reason: failed to resolve python runtime

#3 go.chromium.org/luci/vpython/application/subcommand_install.go:61 - application.(*installCommandRun).Run.func1()
  reason: failed to setup the environment
...

Similar to the Windows-only "vpython" -> "vpython.bat" modification, I
added the necessary code to do it for vpython3 too, i.e.,
"vpython3" -> "vpython3.bat", and it fixed the problem for me.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
Change-Id: Iac167ffe61b04a2836b03e620b98ee97b56965e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3513473
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic 8edc960e9a Update gsutil to use gsutil version 4.68
We can't yet upgrade to version 5.x since it's only py3 compatbile and
some builders still rely on running gsutil with py2.

R=gavinmak@google.com

Bug: 1184108
Change-Id: I002cc3625a2184ab42383b88a014c0631d1a33ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3508516
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Brian Ryner a39e2d318b git 2.35.1.chromium.8 to depot_tools stable.
Change-Id: I3fa03e91d64f8caa2ed0c339cc8245ba0e71ae2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3505444
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Brian Ryner <bryner@google.com>
3 years ago
Fumitoshi Ukai a96b54b0cf Roll out goma client VERSION=243
Bug: b/219613977
Change-Id: I9ea3c999ea783eebba149bfdd047a5e2b063570c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3507574
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
3 years ago
Bruce Dawson 9ce8be3339 Revert "Support multiple VS installations"
This reverts commit 36d41ceff8.

Reason for revert: Script references VS_VERSION variable that was
renamed in the prior change, so it doesn't work.

Original change's description:
> Support multiple VS installations
>
> Currently, package_from_installed.py assumes only one version of VS is
> installed. It takes the path of the first installation.
>
> This could be incorrect in several ways:
> - Maybe both 2017 and 2019 (the supported versions) are installed and
>   although the user specified using 2019, the 2017 path comes first.
> - Maybe 2019 and 2022 are installed, and the 2022 path is used even
>   though it isn't supported.
>
> This CL fixes that issue by parsing the vswhere.exe output to confirm
> the VS version matches what the user specified, using its corresponding
> path.
>
> Change-Id: I2029a4f7126d0a45b5370ad58ab257df55571b3b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3458722
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Reviewed-by: Chris Blume <cblume@chromium.org>
> Commit-Queue: Chris Blume <cblume@chromium.org>
> Auto-Submit: Chris Blume <cblume@chromium.org>

Change-Id: I3d9147a7786f7f54f861087d16967b75d4afe2c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3504193
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Garrett Beaty 257f7df564 Revert "Reland "Update gsutil to use gsutil version 5.6, python3""
This reverts commit d1d7b0a43e.

Reason for revert: This seems likely the cause of infra failures for
perf builders.

Original change's description:
> Reland "Update gsutil to use gsutil version 5.6, python3"
>
> This is a reland of commit c0af61c8dd
>
> Original change's description:
> > Update gsutil to use gsutil version 5.6, python3
> >
> > R=gavinmak@google.com
> >
> > Bug: 1184108
> > Change-Id: I933c07132006b731a97153080ebe86ed756fbdb2
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3497998
> > Reviewed-by: Gavin Mak <gavinmak@google.com>
> > Commit-Queue: Josip Sokcevic <sokcevic@google.com>
>
> Bug: 1184108
> Change-Id: I72c5b967f52e8b4531c238b20444596c549a5726
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3502172
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Bug: 1184108
Change-Id: Iad314a3b6147f460e2f301481b03c5d3d7d601db
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3503959
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Xinan Lin ca3aae0014 Add step test data for update_files() in Gerrit module
Thus downstream recipes could run "train" without explicit
mock data everywhere.

BUG=1293270
TEST=train
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Change-Id: I09f6a27097f400dabd990f6ef61e301a75a39691
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3502768
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Xinan Lin <linxinan@chromium.org>
3 years ago
Josip Sokcevic d1d7b0a43e Reland "Update gsutil to use gsutil version 5.6, python3"
This is a reland of commit c0af61c8dd

Original change's description:
> Update gsutil to use gsutil version 5.6, python3
>
> R=gavinmak@google.com
>
> Bug: 1184108
> Change-Id: I933c07132006b731a97153080ebe86ed756fbdb2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3497998
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Bug: 1184108
Change-Id: I72c5b967f52e8b4531c238b20444596c549a5726
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3502172
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago