This change adds git cache's epoch timestamp to bot_update's output.properties. It achieves this by adding a marker file to the cache directory which stores the epoch time.
Design: go/query-bot-update-cache-age
Bug: 1448769
Change-Id: I610c6bca5ced7e2a0fe3ee8570decf0f135fe54c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4563726
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
This cl will be submitted after the cl to add the metadata to the
reproxy.cfg file has been submitted to chromium/src: crrev/c/4513215
Bug: b/281504726
Change-Id: Ifa6d5f56d4a85ccb9ec8e4f70207d8b6b9382e89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4516023
Commit-Queue: Ben Segall <bentekkie@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
CheckOwnersFormat requires network and code owners plugin to be enabled.
This moves that check under condition.
R=jojwang@google.com
Change-Id: Ic9cfd5e33987cac9aae93d744ebfb2482eb309be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4571106
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
(1) bot_update (http://shortn/_I814yt6r9U) will use got_revision_mapping
in these configs to create builder properties
{
'got_revision': <revision>
'got_revision_superroject': <revision>
}
(2)
recipe testing a change will use these configs to go from:
CL's project -> project's name in gclient solutions -> got_revision string
(e..g 'https...infra/infra_superproject' -> '.' -> 'got_revision_superproject'
(3) then use e.g. 'got_revision_superproject' to get the <revision> it should use from (1) and pass to wherever. in the presubmit recipes case, we're passing it as upstream to presubmit_support.py http://shortn/_BHBdN9p7ja
After this change we can add infra and internal presubmit tryjobs to the infra_superproject repo.
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: chromiumos
Bug: 1415507
Change-Id: Ia9804325c35b6071afa73d1b1099695ea6ae0b03
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4570829
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
https://crbug.com/603378#c4 introduces gerrit.skipEnsureAuthenticated as simple workaround to allow git_cl work with `sso://` URLs. However, git_cl still warns users to not use `sso://` and all the gerrit API calls break.
This change is a fix quick to allow git_cl to work with `sso://` when gerrit.skipEnsureAuthenticated is set to true in .git/config.
The authentication check will be fixed to support `sso://` is a follow-up change.
Bug: 1431292
Change-Id: Iefc43d205ac3b7fb67b32092567fd13eded205a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4404933
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
This would add support for uploading/installing Xcode with MacOS13 adoption
Recipe-Nontrivial-Roll: build_limited
Bug: 1441931
Change-Id: I7496a80a6876fc4b0df712ce1634611f59240e67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4566408
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Jeff Yoon <jeffyoon@google.com>
Commit-Queue: Yue She <yueshe@google.com>
At the moment on repo's with many CIPD packages the number
of CLI calls to 'cipd describe' can make it very slow.
This mechanism will call cipd ensure-file-resolve with the entire
list in one call then reference items from the list before trying
individual cipd describe commands.
Bug:b/279097790
Change-Id: Ieb4bc77853357cfadb3ea6311fa0013aa7999ac6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4551125
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
Calling CheckChangeHasNoUnwantedTags and
CheckChangeHasBugFieldFromChange from a PostUploadHook is useful because
it ensures that users will see a message if they add a bad tag when
creating the commit message during upload. Allowing this requires
creating entry points for these functions that take a change parameter
instead of an input_api parameter. It also requires fixing our use of
the deprecated inspect.getargspec function.
In order to not tell users twice (once before and once after upload)
that they haven't used a Bug: tag (it is optional, after all) a flag
to make these suggestions optional is also added.
This change is required in support of crrev.com/c/4490087.
Bug: 1434702
Change-Id: I3fd909a71c6c7d7671d6f986ad60d5375143a2f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4519532
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
When updating with external changes, depot_tools applies diff between
patchsets. It's not sufficient to just check local `base` commit with
the latest remote since both could be updated (e.g. via rebase-update
and Gerrit rebase).
R=gavinmak@google.com, jojwang@google.com
Bug: 1448243
Change-Id: Ib92d2f3958de15090a261c810ad19bdf085219a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4559308
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
pwsh, cmd and powershell interoperability breaks `Get-FileHash` cmdlet
which is used in .cipd_impl.ps1. The issue prevents loading of correct
PowerShell module due to how $PSModulePath is structured in some cases.
With this CL, we always import the compatible module at the beginning
of the script. This ensures Get-FileHash is always available to us
regardless of the PowerShell version being used.
Bug: 1443163
Change-Id: I117e5077239c5371bb392b36b521671095029abf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4506722
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Adam Todd <actodd@google.com>
Auto-Submit: Tushar Singh <tusharvickey1999@gmail.com>
This would add support for uploading/installing Xcode with MacOS13 adoption
Bug: 1441931
Change-Id: I81e8edc0761548b6650535f3ac6b6c504673e6a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4532378
Reviewed-by: Chan Li <chanli@chromium.org>
Commit-Queue: Yue She <yueshe@google.com>
The double quotations are necessary to preserve "^" for Ninja's single file compilation.
But Siso doesn't support this syntax for now.
Bug: b/270653823
Change-Id: I9c775ad295119dad3b1ba5aebdccce59127232c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4551121
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Fixes this error:
http://shortn/_MMjWQ6UDNN
presubmit.execute() (http://shortn/_IqUEskOvZy) calls get_project_revision_properties (http://shortn/_2YWZfKEBWb).
the `project_name` passed in was '.' (the solution root) so get_project_revision_properties was returning nothing.
setting 'infra_internal' in repo_path_map leads to this code (http://shortn/_7cO431MLDm) setting `self._relative_root` to `infra_internal` as expected. So `project_name` above will be `infra_internal` not '.'
In this case, also seems to fix the empty commit patch issue, as the `git commit` gets executed in infra_internal now.
led run: http://shortn/_UM6iapZUkx
Bug: 1415507
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Change-Id: Ib457ded91ffe5b9041b8b1bb0345229bfd07d1f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4545587
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Note: we are only evaluating cipd variables in the URL not the package string on the left hand side, as to not break any existing expected behaviour.
Bug:b/279097790
Change-Id: I0b6008254bd387584b9c0ee083c79bf5dc77fbc8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4536475
Commit-Queue: Dan Le Febvre <dlf@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
PRESUBMIT.py files can invoke other scripts, and those scripts may be
run under Python 2 or Python 3. There are multiple mechanisms that
govern which version will be used, sometimes requiring several flags
to be passed.
This change removes support for Python 2 from this system, thus making
it simpler to invoke Python 3 scripts.
The function parameters that are used to select Python versions are
passed in from multiple places so they still need to be supported, but
they are now ignored. The parameters are deleted to prevent accidental
use.
This change was tested by running this command in a Chromium repo:
git cl presubmit --force --all
Bug: 1207012
Change-Id: I4adc7164417e155ff80d3a039cf36ed030756456
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4328470
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Goma is not available on ppc/s390x platforms and causes
a crash when running gclient as it cannot find goma_ctl.py.
Change-Id: Icf08c6782d66f99eaf8f3c6ba42a170521afeb86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4545381
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
When using async jobs, information about presubmit is not present in
callstack and it's just noise.
Change-Id: Ib95af92f9e83f1fb8b8d68c7aece6bbb4b03e61c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4505697
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
The contents of this change, imitate the exact behaviour of the real CIPD command.
Bug:b/279097790
Change-Id: Id7e0e906b59e8c7c08b235e2741431163b0387a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4536477
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
This reverts commit e27d7c3816.
Reason for revert: Retroactively broke branch builds for Nest
Original change's description:
> Drop support for py2 presubmit hook win mapping
>
> We no longer support py2 so we shouldn't have a special handling for py2
> hooks.
>
> R=gavinmak@google.com
>
> Change-Id: I038f462a4991d17bedb3e02104374b3ad1ffa5ff
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4541664
> Commit-Queue: Gavin Mak <gavinmak@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Change-Id: Id4f0f3950d41a5829b279c4844f02c2a6ccf41fe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4544429
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
goma_ctl.bat requires python3 to be available, otherwise we get this:
'"\python3.exe"' is not recognized as an internal or external command.
Change-Id: I60734f8f5fb878eff451de9dad13531ac360480a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4532006
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Now that the presubmit system no longer supports Python 2 we can remove
support for it from the presubmit system tests. This change removes all
references to sys.version_info from this file.
This also fixes an unclosed file warning that suddenly appeared and
was stopping this change from landing.
Bug: 1207012
Change-Id: Ib74e9009b9d5cea0caf37c88e3258e9dd818f269
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4522416
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
This reverts commit d69302761b.
Reason for revert: Broke Dart CI
```
gclient.py revinfo --output-json output.json
--filter='https://chrome-infra-packages.appspot.com/dart/dart-sdk/${platform}'
```
No longer returns:
```
{
"sdk/tools/sdks/dart-sdk:dart/dart-sdk/${platform}": {
"rev": "git_revision:7a6514d1377175decd3a886fe4190fbbebddac3a",
"url": "https://chrome-infra-packages.appspot.com/dart/dart-sdk/${platform}"
}
}
```
Bad build:
https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/vm-aot-msan-linux-release-x64/90/overview
Good build:
https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/vm-aot-msan-linux-release-x64/89/overview
Original change's description:
> Reland "resolve CIPD package names in gclient"
>
> This CL relands the below CL with the addition of handling situations where the CIPD package name has a variable=value and does not equate to true. In this case just return the original value in DEPS.
>
> This is a reland of commit 8faa5514ec
>
> Original change's description:
> > resolve CIPD package names in gclient
> >
> > Currently the package names are not resolved in gclient output, see example below.
> >
> > This is part of broader work to improve CIPD output, the next CL will replace 'None'.
> >
> > ```
> > $~ gclient revinfo -a | grep '${platform}\|${arch}'
> >
> > src/buildtools/linux64:gn/gn/linux-${arch}: None
> > src/buildtools/reclient:infra/rbe/client/${platform}: None
> > src/third_party/dawn/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
> > src/third_party/dawn/tools/golang:infra/3pp/tools/go/${platform}: None
> > src/third_party/devtools-frontend-internal/devtools-frontend/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
> > src/third_party/devtools-frontend/src/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
> > src/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
> > src/tools/luci-go:infra/tools/luci/isolate/${platform}: None
> > src/tools/luci-go:infra/tools/luci/swarming/${platform}: None
> > src/tools/resultdb:infra/tools/result_adapter/${platform}: None
> > ```
> >
> > Bug:b/279097790
> > Change-Id: I21abf2579910e9d79d9ee0dcd018ee761e3d3c1c
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4463983
> > Reviewed-by: Rachael Newitt <renewitt@google.com>
> > Reviewed-by: Gavin Mak <gavinmak@google.com>
> > Commit-Queue: Dan Le Febvre <dlf@google.com>
>
> Bug: b/279097790
> Change-Id: Ib08dac506ce221243c595dde5cb00e8e0d7dc7ed
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4501582
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Dan Le Febvre <dlf@google.com>
Bug: b/279097790
Change-Id: Ibf82354ac5005d9d6279d88aa99c8fb344aa6833
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4518113
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Dan Le Febvre <dlf@google.com>
This CL relands the below CL with the addition of handling situations where the CIPD package name has a variable=value and does not equate to true. In this case just return the original value in DEPS.
This is a reland of commit 8faa5514ec
Original change's description:
> resolve CIPD package names in gclient
>
> Currently the package names are not resolved in gclient output, see example below.
>
> This is part of broader work to improve CIPD output, the next CL will replace 'None'.
>
> ```
> $~ gclient revinfo -a | grep '${platform}\|${arch}'
>
> src/buildtools/linux64:gn/gn/linux-${arch}: None
> src/buildtools/reclient:infra/rbe/client/${platform}: None
> src/third_party/dawn/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
> src/third_party/dawn/tools/golang:infra/3pp/tools/go/${platform}: None
> src/third_party/devtools-frontend-internal/devtools-frontend/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
> src/third_party/devtools-frontend/src/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
> src/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
> src/tools/luci-go:infra/tools/luci/isolate/${platform}: None
> src/tools/luci-go:infra/tools/luci/swarming/${platform}: None
> src/tools/resultdb:infra/tools/result_adapter/${platform}: None
> ```
>
> Bug:b/279097790
> Change-Id: I21abf2579910e9d79d9ee0dcd018ee761e3d3c1c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4463983
> Reviewed-by: Rachael Newitt <renewitt@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Dan Le Febvre <dlf@google.com>
Bug: b/279097790
Change-Id: Ib08dac506ce221243c595dde5cb00e8e0d7dc7ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4501582
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
This changes all references to the LUCI_OMIT_PYTHON2 environment
variable to instead assume that it is `'true'`.
R=sokcevic, tikuta
Bug: 1441784
Recipe-Nontrivial-Roll: build
Change-Id: Iea161a372adb68cdcb330d131df2c19ca2fe7b37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4522480
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>