Commit Graph

27 Commits (18785bb297bf4c3db076e5ae10a9c42edebde59f)

Author SHA1 Message Date
Garrett Beaty 18785bb297 Fix the environment for calling git number.
Calling git number requires that that depot tools is on the path so that
git-number can be found and requires the CHROME_HEADLESS environment
variable to be set.

Change-Id: Iabb8ec6732ca2bcc0f3209449e23a7d0a4f629e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3314033
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
3 years ago
Garrett Beaty 320a1caf81 Add a method to the git API for running git number.
Change-Id: Ieac13aac86df1c3e759f5aa66015ee6a3ac5c826
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3307495
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
3 years ago
Garrett Beaty 2e486c0d9d Replace can_fail_build with raise_on_failure.
The step API now supports the same functionality that can_fail_build
provides, so standardize on that argument rather than maintaining a
duplicate mechanism.

Bug: 1274644
Change-Id: Idcc3c0dacbab8d2d786b27ec277713063da6d334
Recipe-Manual-Change: build_limited
Recipe-Manual-Change: infra
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3301439
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
3 years ago
Garrett Beaty 4f272fd082 Decode the output for the get_timestamp operation.
Change-Id: I31007dbbbe9c76f5e4aaf8aef0001979d05c1066
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3224017
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
4 years ago
Yuanjun Huang 8f09549ffc [python3] Solve soft errors in the recipes of git module
These soft errors will become hard failures and block the proto module
to be marked PY2+3 in upstream recipe engine repo.


Bug: 1227140
Change-Id: I0e5fdebe7e7cf43552b525d63c12f82c96c49902
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3152784
Commit-Queue: Yuanjun Huang <yuanjunh@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
4 years ago
Gavin Mak bd0674c0d0 Fix remaining unicode py2+3 recipe module errors
Bug: 1227140
Change-Id: Ic29fff7556884935c301b35ba3995e281f178540
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3124901
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 years ago
Gavin Mak dde93a5a74 Add PYTHON_VERSION_COMPATIBILITY to git recipe module
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: infra
Bug: 1227140
Change-Id: Ia1fc9c67dd4e8cac08bd8892696ffc6da6c6ccd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3123944
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
4 years ago
Sven Zheng af70e1bf3b git new-branch adds upstream_current
git new-branch --upstream_current <branch_name>
can create a new branch tracking the current branch.
I need this in my recipe so adding this flag to the
recipe module.

Bug: 1238169
Change-Id: I1816b8d78867848e7a8f80337a6d82db8b6ef777
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3095037
Commit-Queue: Sven Zheng <svenzheng@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
4 years ago
Josip Sokcevic ce332a47a9 Use main as default branch in all recipes
Recipe-Manual-Change: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: I89008bc07b1c3de13d9c6dd64e723fe6dc8d01d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3015262
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
4 years ago
Gavin Mak 758807c0a4 Add python3 support to git recipe module
Bug: 1227140
Change-Id: I71ad53a978ecb7040b2482b97ee23ed4c1c8f59a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3010717
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
4 years ago
Josip Sokcevic b3d52d34cd Revert "Use main as default branch for git recipe module"
This reverts commit 6b08432689.

Reason for revert: creates CLs that are on top of stale commits, not ToT

Original change's description:
> Use main as default branch for git recipe module
>
> R=​apolito@google.com, ehmaldonado@chromium.org
>
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Change-Id: Ia0d39ae574852fa008a55e366c2320eb1845dc86
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2941678
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
> Reviewed-by: Anthony Polito <apolito@google.com>

Change-Id: I64ed8e7fbeab8cf8a0be6be4456fee400f770883
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2998588
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>
4 years ago
Josip Sokcevic 6b08432689 Use main as default branch for git recipe module
R=apolito@google.com, ehmaldonado@chromium.org

Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: Ia0d39ae574852fa008a55e366c2320eb1845dc86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2941678
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
4 years ago
Josip Sokcevic 7e73512268 Revert "Use HEAD instead of hardcoded branch"
This reverts commit 6651fd8847.

Reason for revert: broke some cros builds (check original CL for
discussion)

Original change's description:
> Use HEAD instead of hardcoded branch
>
> Repositories may have different default branches. This ensures to fetch
> remote HEAD branch which is default branch. Only downside to this
> approach is that actual branch (e.g. origin/main) reference won't be
> updated. Since we don't need it for this particular case, it should be
> fine to use HEAD.
>
> R=​apolito@google.com, ehmaldonaldo@chromium.org
>
> Bug: 1155492
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Change-Id: Ib2e6e50901a0a10ed647acea3aeb517b83567702
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2580190
> Reviewed-by: Anthony Polito <apolito@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

TBR=ehmaldonado@chromium.org,apolito@google.com,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1155492
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: build
Change-Id: Ibd9f67bea71ee4a644b1077a365dbcd2a2c469f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2597065
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
4 years ago
Josip Sokcevic 6651fd8847 Use HEAD instead of hardcoded branch
Repositories may have different default branches. This ensures to fetch
remote HEAD branch which is default branch. Only downside to this
approach is that actual branch (e.g. origin/main) reference won't be
updated. Since we don't need it for this particular case, it should be
fine to use HEAD.

R=apolito@google.com, ehmaldonaldo@chromium.org

Bug: 1155492
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Change-Id: Ib2e6e50901a0a10ed647acea3aeb517b83567702
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2580190
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
4 years ago
Quinten Yearsley b674f8a277 Edit depot_tools recipe_modules docstrings for consistency
Change-Id: I454e9c90d3159598ae34d97d22c96b9d20d55f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2521656
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
5 years ago
Robert Iannucci 4504fd580a Remove infra_paths module.
We no longer need it to bridge path differences between buildbot and
LUCI, and it shouldn't be in use downstream now either.

R=machenbach@chromium.org, martiniss@chromium.org, tandrii@chromium.org, yiwzhang@google.com

Bug: 1015181
Change-Id: Iaba2100653ae9f06799d1d510bef993f7f710dc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2220171
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
5 years ago
Quinten Yearsley 925cedba7b Run spellchecker on depot_tools
This was made by running `codespell` and `scspell`
and then checking the results.

Change-Id: I169fd5b40294f83015075b4a899fbca263821f25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2144602
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Auto-Submit: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Marc-Antoine Ruel 8e57b4bc55 python3 improvements
Ran:
  vi $(git grep --name-only iteritems | grep -v third_party)
  vi $(git grep --name-only itervalues | grep -v third_party)
  vi $(git grep --name-only 'print ' | grep -v third_party)

and edited the files quickly with adhoc macros. Then ran in recipes/:
  ./recipes.py test train

There was only a small subset of files that had been updated to use
six.iteritems() and six.itervalues(). Since the dataset size that is
being used in gclient is small (pretty much always below 200 items),
it's better to just switch to .items() right away and take the temporary
performance hit, so that we don't need to come back to rewrite the code.

Recipe-Nontrivial-Roll: build
Bug: 984182
Change-Id: I5faf11486b66b0d73c9098ab0f2ce1b15a45c53e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1854900
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Marc-Antoine Ruel <maruel@chromium.org>
6 years ago
Andrii Shyshkalov 1458d572f9 recipe_module git: remove non-LUCI mode.
R=maruel

Bug: 1012148
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: release_scripts
Recipe-Nontrivial-Roll: build
Change-Id: I386b540ef1d68d2f20031111ad5b693eb35c57a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1846736
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Auto-Submit: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
6 years ago
Robert Iannucci efc7e91fa7 [recipes] Manual roll.
Update "import DEPS" syntax and package_repo_resource.

recipe_engine:
  https://crrev.com/a42dce4e0b0db8bd6b7688030e723197919306db [engine] Rewrite/simplify loading infrastructure. (iannucci@chromium.org)

R=jchinlee@chromium.org, martiniss@chromium.org, tandrii@chromium.org

Recipe-Manual-Change: skia
Recipe-Manual-Change: skiabuildbot
Recipe-Manual-Change: build
Recipe-Manual-Change: build_limited_scripts_slave
Recipe-Manual-Change: infra
Recipe-Manual-Change: release_scripts
Bug: 914992
Change-Id: Ie3a3be9124e1ca4abd5e79af2f8c946b3ce906ff
Reviewed-on: https://chromium-review.googlesource.com/c/1464761
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
6 years ago
Joey Scarr 143872d11b Update git recipes to use buildbucket API.
Bug: 902400
Change-Id: I816dc06bfaabffac549d25ced60ddc61499fc38d
Reviewed-on: https://chromium-review.googlesource.com/c/1343628
Commit-Queue: Joey Scarr <jsca@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
6 years ago
Robert Iannucci 98f1e59b41 [git] Stop using git-retry wrapper on LUCI.
The LUCI environment alreadly does `git retry` style retries by virtue
of it's Go git-wrapper program. No need to put an extra python
interpreter in the middle.

R=hinoka@chromium.org, nodir@chromium.org

Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Change-Id: I2918d7f413dde667fccd45c83ad6f4b96c2afe2e
Reviewed-on: https://chromium-review.googlesource.com/c/1292236
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
7 years ago
Ryan Tseng 2fddb95698 [git recipe_module] Add tags flag for fetch
Some projects that use the git module (eg flutter) require tags.

Bug:  870558
Change-Id: Idae50ef5c8a092e5f0109b6c14c562268a2ad236
Reviewed-on: https://chromium-review.googlesource.com/c/1274245
Reviewed-by: Jao-ke Chin-Lee <jchinlee@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
7 years ago
Emma 0f09f97100 Adds progress argument option to fetch for git checkout
Bug:768229
Change-Id: If6988e3a75e66beb2900360b10d63560b4c0b345
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: release_scripts
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/681194
Commit-Queue: Emma Söderberg <emso@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Dan Jacques 209a681f9c [git] Remove hard-coded "depot_tools" Git.
Several tools, including the "git" recipe module, hard-code a
checkout-relative "git.bat" path. Git is a feature that is provided by
the system, both to tooling and recipes:

1) For users, "depot_tools" must be on PATH, and during setup it will
   have installed "git.bat", ensuring that Git tooling is available in
   PATH.
2) For bots, the system is responsible for providing "git.bat" on PATH.
   This is typically done at "/b/depot_tools/git.bat", which is sync'd
   through the "update_scripts" step.

By formally treating Git as a system resource, we absolve Windows bots
and users from manually installing a depot_tools-local Git, bringing
them in line with other platforms.

BUG=chromium:590806
TEST=local

Change-Id: I93e89855cdd330a2ba7a8cfb8117a1789d1ab54e
Reviewed-on: https://chromium-review.googlesource.com/568694
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Robert Iannucci 5702f0baef [recipes] convert all recipe_modules to use new context module.
R=recipe-roller@chromium.org

Bug:
Change-Id: I84c19965b779f1010c00cd8c857b7533eec7413f
Reviewed-on: https://chromium-review.googlesource.com/502929
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Paweł Hajdan, Jr f14709556d Move recipes to their own subdirectory
This will help remove confusion when depot_tools' recipes.py
ends up in PATH.

BUG=699120

Change-Id: Id4c21b0cc6bb022ea2c21145abe76bebb0a8d9c1
Reviewed-on: https://chromium-review.googlesource.com/458430
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago