Commit Graph

72 Commits (a5f17dd7b3cef04e687c33b69b033b2fecf0919f)

Author SHA1 Message Date
Gavin Mak a5f17dd7b3 Revert "Drop py2 support in recipe modules"
This reverts commit 5819c303f0.

Reason for revert: breaking dart builds

Original change's description:
> Drop py2 support in recipe modules
>
> python3 is the only supported version of python in depot_tools.
>
> Bug: 1475402
> Change-Id: I479de09a0c34b438aced35e4ced58a5972108132
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4808518
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Bug: 1475402
Change-Id: I0fef7581835bb25ea7e4f22303eef11e72df9536
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4811596
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Gavin Mak 5819c303f0 Drop py2 support in recipe modules
python3 is the only supported version of python in depot_tools.

Bug: 1475402
Change-Id: I479de09a0c34b438aced35e4ced58a5972108132
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4808518
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2 years ago
Gavin Mak 6fde53139b Upload git traces from bot_update
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Bug: 1351547
Change-Id: I1e018a8407c10ad4f9b6674d4b17ccae1e863389
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4568628
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2 years ago
Joanna Wang 1affd9c35d Add arg in bot_update recipes api to override deps revisions.
Bug: 1415507
Change-Id: I0bb224eb2b9b4f37d56543c40612736c3c8322a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4561776
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang d04720454a Update recipes python tests.
For: http://shortn/_j5mixA1Mjr

Change-Id: I7ac4471fbb1e0629d59263266b3470e372d03a19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4368938
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Gavin Mak ea11cc31c5 Remove apply_patch_on_gclient property
This property isn't used anymore.

Bug: 891917
Change-Id: I005f5b320cb33afddb1d3272f3f626542996bb62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3766100
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
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
Josip Sokcevic 289dedd36b Remove unused arguments from bot_update recipe
gclient removed syntax validation flag in 2020:
https://crrev.com/c/2083589, so this can safely be removed.

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

Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build
Change-Id: I2aced6cdb01d571ca361cc57e7c8715c9ca40552
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3419278
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Garrett Beaty f80edc2dbc Use actual ref for commit position footer in test data when provided.
* If the input revision starts with refs/ use it as the ref of the CP.
* If the input revision is of the form origin/X, use refs/heads/X as the
  ref of the CP.

Change-Id: I048883afcfe1593e877c004729f859921910c993
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3165297
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Garrett Beaty <gbeaty@google.com>
4 years ago
Gavin Mak d6d5c46cf4 Add PYTHON_VERSION_COMPATIBILITY to gitiles and bot_update
Setting PYTHON_VERSION_COMPATIBILITY = PY2+3 makes "recipe.py test" run
tests in both py2 and py3.

Bug: 1227140
Change-Id: I56a47f0491cbade172e1dc1239cbf6c2a0faa64f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3116850
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
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
Yiwei Zhang 2eba529771 recipe: import engine_types instead of types from recipe_engine
Motivation: https://crrev.com/c/3050650

Bug: 1227763
Change-Id: I2e7ce3a8a5652959bdc68f4b3cd3a783d0424c36
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3055154
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
4 years ago
Edward Lesmes 8c9a5b84cb bot_update: Add support for experiments.
Bug: 1199853
Change-Id: I0616f90a0cd7e4478f40ac7eaf5dbccca788d517
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2898001
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Garrett Beaty e856b6bba8 Enable set_output_commit to be used with RevisionFallbackChain.
When set_output_commit is True and the repo associated with the
got_revision property does not use commit positions, buiders whose
gclient config uses RevisionFallbackChain for that repo will raise an
exception when attempting set the output commit because a string is
expected for the revision value, not a RevisionFallbackChain object.
This changes the set_output_commit code to resolve the revision so that
the output commit can be set in those cases.

Bug: 1159749, 1141886
Change-Id: Iddf1d49871028d9500eefb0eed07e36ce7e6b0d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2612223
Auto-Submit: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
4 years ago
Takuto Ikuta 5c4c28f111 [recipes] remove is_luci specification
This is always True now.

Bug: 1128847
Change-Id: Ief951e9312ea8bd13c98b4bbc87c18d7307bb43a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2413667
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
5 years ago
Garrett Beaty 71198cd4a2 Handle failures in the bot_update script.
Currently, if the bot_update script fails, then recipe code that makes
assumptions about the returned output JSON cause exceptions to be
raised. This fixes a couple instances in the code so that the bot_update
failure should surface instead of an uncaught exception.

Change-Id: I031e613841b03e5eb4f6d9ca7adb5085088a3077
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2405708
Auto-Submit: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
5 years ago
Garrett Beaty 3e5d86a237 Generate revisions in json output for refs/ and origin/.
Right now the default test data for bot_update doesn't transform
revisions specifying refs for the revision except for refs starting with
refs/ on the first solution. This means that the output will just have
the ref name as the revision value, which isn't compatible with code
that requires an actual revision value.

Bug: 1047893
Change-Id: I016ad5e8db5a293dd5e6dacb5b8beba51e000949
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chrome_release
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2325761
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Auto-Submit: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Garrett Beaty 6081b23b29 Modify bot_update to support setting blamelist pins.
This adds a parameter to bot_update.ensure_checkout that will cause
blamelist pins to be set for all of the repos whose revision is not
determined by DEPS files: the repo for the gitiles input, the repo for
each solution in the gclient config and any repos with the revision set
by the revisions field of the gclient config.

Bug: 1047893
Change-Id: Ie3eee41dbf15be014185b6f255ee3d4cfd40b4e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2293514
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Garrett Beaty c8c88f9c55 Use fixed revisions in bot_update's test API output_json.
Currently the output_json method generates revisions for projects that
are in the revision_mapping and only those projects appear in the
manifest and source_manifest, using the generated revision. This method
is used to construct the default json output for bot_update in tests.
This has 2 problems:
1. If a project has a fixed revision, its manifest entries and the
property used the generated revision, meaning the gitiles input revision
will not be used in the json output.
2. If a project has a fixed revision and isn't present in
revision_mapping then manifest entries aren't generated for it.

This changes the method to use the revisions in the fixed_revisions dict
and to create manifest entries for the projects that appear in the
fixed_revisions dict which should make fewer situations where
bot_update's output_json needs to be explicitly set.

Change-Id: I99de52edc9248c28e9d3aa3a04cc77bf9fccbe37
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chrome_release
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2304644
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
5 years ago
Robert Iannucci d56d2c282f Remove source_manifest functionality from depot_tools.
This is essentially defunct; We will want to add something like this
back in, but it's so sparsely used right now that it's better to just
remove it and then add it back properly when we're ready to support
it across all of LUCI.

R=yiwzhang@google.com

Bug: 1093959
Change-Id: I72673515d860234daa3b01514ac38168ebb4825a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2250403
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
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
John Budorick e9aeaee522 bot_update: only add input commit refs for gclient solution roots.
Bug: 1031805
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: infra
Change-Id: I6edd221900eadd4d621d6190e08b61fdbc2f8621
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1958706
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
5 years ago
Haiyang Pan 7a77984331 Revert "Fetch the input commit ref when both ref and id are specified."
This reverts commit 512f92b731.

Reason for revert: bot_update is having infra failure on ci bots.
For example https://ci.chromium.org/p/chromium/builders/ci/Closure%20Compilation%20Linux/249684.

Original change's description:
> Fetch the input commit ref when both ref and id are specified.
>
> This causes --refs refs/head/master to be added to bot_update
> calls when the input build message contains a commit id and the
> refs/head/master ref. This is an effective no-op.
>
> Bug: 922150
> Change-Id: I119d9b3cede727713a0b66bff83b5ee4e1848790
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: infra
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1884457
> Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
> Auto-Submit: Garrett Beaty <gbeaty@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>

TBR=tandrii@google.com,gbeaty@chromium.org

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

Bug: 922150
Change-Id: Ie9275c21827688f59449f052c768452a8652e139
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1891000
Commit-Queue: Haiyang Pan <hypan@google.com>
Reviewed-by: Haiyang Pan <hypan@google.com>
6 years ago
Garrett Beaty 512f92b731 Fetch the input commit ref when both ref and id are specified.
This causes --refs refs/head/master to be added to bot_update
calls when the input build message contains a commit id and the
refs/head/master ref. This is an effective no-op.

Bug: 922150
Change-Id: I119d9b3cede727713a0b66bff83b5ee4e1848790
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1884457
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Auto-Submit: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
6 years ago
Tamer Tas c5656169e4 Add optional target selection for resolving fixed revisions
{_resolve_fixed_revisions} resolves every revision property. After a test
failure, we don't want to resolve every revision always.

This CL allows updating a subset of revisions for a new checkout.

R=machenbach@chromium.org
TBR=tandrii@chromium.org

Bug: 950731, 982711
Change-Id: I3cdc5cdb882009886b82557427fdf9b02e860b39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1720929
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Auto-Submit: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
6 years ago
Nodir Turakulov c7acd584e3 [bot_update] Use got_revision for output commit
got_revision and got_revision_cp point to the commit that
Build.output.gitiles_commit should point to.
Therefore, derive output commit from these properties.

Derive output ref from got_revision_cp if it available.
Otherwise, try to read it from input commit

Bug: 940214
Change-Id: I108d782ad93c70114581830d7427b95d3efd9d98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1588506
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
6 years ago
Nodir Turakulov fdd2581115 [bot_update] Set output commit of the build
Add set_output_commit param to bot_update.ensure_checkout, false by default.
If true, call api.buildbucket.set_output_gitiles_commit to set the output commit
of the build. This generally supersedes got_revision and got_revision_cp.

Bug: 940214
Change-Id: I5ffc790a6b12c8bf4a56469b3ecc567141c0d735
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1548256
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
6 years ago
Robert Iannucci cf661acb70 [bot_update] Downstream change for buildbucket proto update.
Downstream counterpart to https://chromium-review.googlesource.com/1481660

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

Bug: 930761, 927716
Change-Id: Ib6390b3d27bed79a01eefa966084233e71aa8235
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1496049
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
6 years ago
Edward Lemur 0c3bd49069 bot_update: Don't use apply_patch_on_gclient.
It has been True by default for a while, and there is no need to override it.

Bug: 891917
Change-Id: I2598a2230b0ea38a647a533757331c541b871971
Reviewed-on: https://chromium-review.googlesource.com/c/1260057
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Nodir Turakulov f837545214 [gclient] Remove patch_projects
It was superseded by repo_path_map.

Bug: 694348
Change-Id: If6b4790290bf2573f2a9367334decf064d382f52
Reviewed-on: https://chromium-review.googlesource.com/1232875
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Auto-Submit: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Nodir Turakulov 33f71ae4d0 [bot_update] Update examples to use buildbucket module
Update bot_update full.py example to use buildbucket module.
Also remove buidlbucket example.

Bug: 694348
Change-Id: Ib784583e0ded5ac95fabe99bc39a53f4646e80fc
Reviewed-on: https://chromium-review.googlesource.com/1231281
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
7 years ago
Nodir Turakulov ddda0b5b8a Fetch current Gerrit CL info in tryserver
Add tryserver.api.gerrit_change_info that returns detailed info about the
current Gerrit CL. It makes a Gerrit RPC in the background on the first read.
This step will be present in all tryjobs.

This mechanism can be used for extra details about the current CL.
This CL starts to use this in bot_update for gerrit_ref, and stops using
patch_ref property, and also update bot_update to use when the destination
branch is needed.

Also this CL removes no longer used properties in bot_update,
namely most of patch_* properties.

build.git manual roll: https://chromium-review.googlesource.com/c/chromium/tools/build/+/1217626

Recipe-Manual-Change: build
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: skiabuildbot
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: release_scripts
R=tandrii@chromium.org
Bug: 694348
Change-Id: I945d061b74278c3d1d227578abe16a64cdaca647
Reviewed-on: https://chromium-review.googlesource.com/1213557
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Nodir Turakulov d91f0adca2 Reland "[bot_update] Stop using repository properties"
This is a reland of 4d2b901804
verbatim. The problem was in the buildbucket recipe module, see
https://chromium-review.googlesource.com/c/infra/luci/recipes-py/+/1215002#message-2351f1089af71655dbaff576aa4d11f1dedc800b

Original change's description:
> [bot_update] Stop using repository properties
>
> Stop using repository and patch_repository_url properties.
> Use self.m.buildbucket.build.input.gerrit_changes[0].{host, project}
> instead.
>
> R=ehmaldonado@chromium.org, tandrii@chromium.org
>
> Recipe-Nontrivial-Roll: build
> Bug: 877161, 694348
> Change-Id: Ideb069c6c8f8b6e6cfb5217f8a04ea18f16d3056
> Reviewed-on: https://chromium-review.googlesource.com/1208368
> Commit-Queue: Nodir Turakulov <nodir@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: skia
Bug: 877161, 694348
Change-Id: I0a10ca7814a8f5bdfd30a491e36fb7261cdaf225
Reviewed-on: https://chromium-review.googlesource.com/1214705
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
7 years ago
Nodir Turakulov f022f91453 Revert "[bot_update] Stop using repository properties"
This reverts commit 4d2b901804.

Reason for revert: https://chromium-review.googlesource.com/c/chromium/tools/build/+/1214622

Original change's description:
> [bot_update] Stop using repository properties
> 
> Stop using repository and patch_repository_url properties.
> Use self.m.buildbucket.build.input.gerrit_changes[0].{host, project}
> instead.
> 
> R=​ehmaldonado@chromium.org, tandrii@chromium.org
> 
> Recipe-Nontrivial-Roll: build
> Bug: 877161, 694348
> Change-Id: Ideb069c6c8f8b6e6cfb5217f8a04ea18f16d3056
> Reviewed-on: https://chromium-review.googlesource.com/1208368
> Commit-Queue: Nodir Turakulov <nodir@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

TBR=nodir@chromium.org,tandrii@chromium.org,ehmaldonado@chromium.org

Change-Id: I825242124382e9f1789d4a3da0a3bdd2a5fcab37
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 877161, 694348
Reviewed-on: https://chromium-review.googlesource.com/1214703
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
7 years ago
Nodir Turakulov 4d2b901804 [bot_update] Stop using repository properties
Stop using repository and patch_repository_url properties.
Use self.m.buildbucket.build.input.gerrit_changes[0].{host, project}
instead.

R=ehmaldonado@chromium.org, tandrii@chromium.org

Recipe-Nontrivial-Roll: build
Bug: 877161, 694348
Change-Id: Ideb069c6c8f8b6e6cfb5217f8a04ea18f16d3056
Reviewed-on: https://chromium-review.googlesource.com/1208368
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Nodir Turakulov 4e3920bef0 [gclient] Start actively using repo_path_map
Use repo_path_map in all places where patch_projects is currently used.
Add gclient.get_repo_path function to resolve path to a repo given its URL.

infra.git requires a non-trivial roll because of incorrect expectations.

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Bug: 877161
Change-Id: Iaea0a3f14609bf0c18d4ecdf8564153b8052584d
Reviewed-on: https://chromium-review.googlesource.com/1208363
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Nodir Turakulov 9af7d107de Revert "bot_update: Specify the target branch for patch_refs."
This reverts commit 01f0c698fb.

Reason for revert: https://chromium-review.googlesource.com/c/chromium/tools/build/+/1211422

Original change's description:
> bot_update: Specify the target branch for patch_refs.
> 
> Bug: 870279
> Recipe-Manual-Change: build
> Recipe-Manual-Change: infra
> Recipe-Manual-Change: build_limited_scripts_slave
> Recipe-Manual-Change: skia
> Recipe-Manual-Change: release_scripts
> Change-Id: I58110ff8c5a6ca6906bbbf3eafa09dcbaf39f777
> Reviewed-on: https://chromium-review.googlesource.com/1174988
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

TBR=tandrii@chromium.org,ehmaldonado@chromium.org,jbudorick@chromium.org

Change-Id: Ic78a264ccf5e2ca15452659e17d41da264560eb8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 870279
Reviewed-on: https://chromium-review.googlesource.com/1211462
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
7 years ago
Edward Lemur 01f0c698fb bot_update: Specify the target branch for patch_refs.
Bug: 870279
Recipe-Manual-Change: build
Recipe-Manual-Change: infra
Recipe-Manual-Change: build_limited_scripts_slave
Recipe-Manual-Change: skia
Recipe-Manual-Change: release_scripts
Change-Id: I58110ff8c5a6ca6906bbbf3eafa09dcbaf39f777
Reviewed-on: https://chromium-review.googlesource.com/1174988
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
John Budorick 7de5f08c45 bot_update: remove --gerrit_repo and --gerrit_ref.
Bug: 865882
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: release_scripts
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: skiabuildbot
Change-Id: I4a04c4c28c7dc63ad282f54604c300bbfe654f11
Reviewed-on: https://chromium-review.googlesource.com/1157687
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
John Budorick 5300616351 bot_update: expose patch_refs as an option to ensure_checkout.
Bug: 865882
Change-Id: Icd143fcb6abe1e880dec46a6d26a84103ab4e6d2
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: release_scripts
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: skiabuildbot
Reviewed-on: https://chromium-review.googlesource.com/1157514
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Andrii Shyshkalov 43033409f4 bot_update: remove legacy Gerrit patch property support.
Change-Id: Ie95e10784725176c94a584fa6dadef2318142053
Reviewed-on: https://chromium-review.googlesource.com/1123650
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 77094f7fea Reland of "Wipe out shallow checkout support from bot_update."
Originally-Reviewed-on: https://chromium-review.googlesource.com/1111107
Led-test: https://ci.chromium.org/swarming/task/3e51ed0e31211710?server=chromium-swarm.appspot.com

TBR=hinoka, iannucci

Bug: 855137
Change-Id: I157ef6b9ee2a7ce45e4a474853ae769a82cc4c99
Reviewed-on: https://chromium-review.googlesource.com/1114234
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 565fa6a407 Revert "Wipe out shallow checkout support from bot_update."
This reverts commit 568b7a8998.

Reason for revert: temporary revert to revert previous CL.

Original change's description:
> Wipe out shallow checkout support from bot_update.
> 
> Bug: 855137
> Change-Id: I60b8d69f9ab353c12120d4216e3a12518f99732c
> Reviewed-on: https://chromium-review.googlesource.com/1111107
> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
> Reviewed-by: Ryan Tseng <hinoka@chromium.org>

TBR=iannucci@chromium.org,hinoka@chromium.org,tandrii@chromium.org

Change-Id: Iede67717be448be9bdd7c5dd4895fbab9fd65c66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 855137, 855700
Reviewed-on: https://chromium-review.googlesource.com/1111924
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 568b7a8998 Wipe out shallow checkout support from bot_update.
Bug: 855137
Change-Id: I60b8d69f9ab353c12120d4216e3a12518f99732c
Reviewed-on: https://chromium-review.googlesource.com/1111107
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
7 years ago
Andrii Shyshkalov 124365b8ea bot_update: default to non-shallow checkouts.
shallow mode is a special git mode that only checks out a shallow copy
of git so the full history is not downloaded. It is not well supported
by googlesource.com servers because git has to do a giant negotiation
with the server and transmit every single commit that the local checkout
has or doesn't have (instead of just the latest commit of each ref),
which ends up taking more than 10x longer than a non-shallow checkout.

R=ehmaldonado, hinoka, iannucci

Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Bug: 855137
Change-Id: I5f9e31f8b2730cf80b79bfd0e08201c33eb942f5
Reviewed-on: https://chromium-review.googlesource.com/1110450
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Edward Lesmes 3f0591d4f1 Reland "bot_update: Patch on gclient by default."
This is a reland of e38cf570fc

Sinc the last reland catapult, custom-tab-client and syzygy had their origins updated
to the source of truth:
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1043254
https://chromium-review.googlesource.com/c/chromium/tools/build/+/1043355

This fixes the last problem we had, where the origin in gclient was different from the
source of truth, and so the patch couldn't be applied.

Original change's description:
> bot_update: Patch on gclient by default.
>
> See [4] for the design doc for this change.
>
> We're moving the patching logic from bot_update to gclient.
> This way we can test patches of dependencies that modify their DEPS
> files as well, for example when ANGLE uploads a patch that modifies
> DEPS files to be tested by a Chromium trybot.
>
> Chromium Linux CQ and Angle trybots are already running this way
> (see [1] and [2]) and a PSA has already been sent [3]
>
> [1] https://chromium.googlesource.com/chromium/src/+/master/infra/config/global/cr-buildbucket.cfg#214
> [2] https://chromium.googlesource.com/angle/angle/+/infra/config/cr-buildbucket.cfg#105
> [3] https://groups.google.com/a/google.com/forum/#!topic/chrome-infra/FVHN2kdUX4I
> [4] https://docs.google.com/document/d/1GSTw4ysm5AYjNR6vMA7NJUxLK2VN9IpOEp_v0u-wyOE/edit?ts=5ad78165#
>
> Bug: 643346
> Change-Id: Ic9a9dcfae86aca730d35fbb26c26b21135e05bf3
> Recipe-Nontrivial-Roll: skia
> Recipe-Nontrivial-Roll: infra
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: skiabuildbot
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: release_scripts
> Reviewed-on: https://chromium-review.googlesource.com/1014356
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>

Bug: 643346

Change-Id: Ia0db591c6bf9695f56e6b71777c567595986a511
Reviewed-on: https://chromium-review.googlesource.com/1031206
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Edward Lemur 04065d39f7 Reland "bot_update: Fetch references to be synced."
This is a reland of 3806b7fbd0

Original change's description:
> bot_update: Fetch references to be synced.
>
> If a solution is to be synced to a reference, such as
> refs/branch-heads/#### fetch it so that it can later be
> checked out.
>
> I tried this change on a LUCI task that runs chromium_presubmit
> for crrev.com/c/1048868. The bot_update works as expected:
> https://ci.chromium.org/swarming/task/3d5b294cff467710?server=chromium-swarm.appspot.com
>
>
> Bug: 840445
>
> Change-Id: I6444c0feb679ca89b2f4065215de915494e5082a
> Recipe-Nontrivial-Roll: infra
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Reviewed-on: https://chromium-review.googlesource.com/1049007
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

Bug: 840445

Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Change-Id: I64a97aafe5fab9a26c478262e9ca104dc59e61f5
Reviewed-on: https://chromium-review.googlesource.com/1052387
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
7 years ago
agrieve afec759dca Revert "bot_update: Fetch references to be synced."
This reverts commit 3806b7fbd0.

Reason for revert: Broke downstream tot bots

Original change's description:
> bot_update: Fetch references to be synced.
> 
> If a solution is to be synced to a reference, such as
> refs/branch-heads/#### fetch it so that it can later be
> checked out.
> 
> I tried this change on a LUCI task that runs chromium_presubmit
> for crrev.com/c/1048868. The bot_update works as expected:
> https://ci.chromium.org/swarming/task/3d5b294cff467710?server=chromium-swarm.appspot.com
> 
> 
> Bug: 840445
> 
> Change-Id: I6444c0feb679ca89b2f4065215de915494e5082a
> Recipe-Nontrivial-Roll: infra
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Reviewed-on: https://chromium-review.googlesource.com/1049007
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

TBR=mmoss@chromium.org,machenbach@chromium.org,tandrii@chromium.org,ehmaldonado@chromium.org

Change-Id: If94df8684e634504d8a0c11b2aa5862a458ba19f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 840445, 841306
Reviewed-on: https://chromium-review.googlesource.com/1052187
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
7 years ago
Edward Lemur 3806b7fbd0 bot_update: Fetch references to be synced.
If a solution is to be synced to a reference, such as
refs/branch-heads/#### fetch it so that it can later be
checked out.

I tried this change on a LUCI task that runs chromium_presubmit
for crrev.com/c/1048868. The bot_update works as expected:
https://ci.chromium.org/swarming/task/3d5b294cff467710?server=chromium-swarm.appspot.com


Bug: 840445

Change-Id: I6444c0feb679ca89b2f4065215de915494e5082a
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Reviewed-on: https://chromium-review.googlesource.com/1049007
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Stephen Martinis ea50265aef Revert "Reland "bot_update: Patch on gclient by default.""
This reverts commit 8f20428bf4.

Reason for revert: Probably broke bot update on catapult bots: https://build.chromium.org/p/tryserver.client.catapult/builders/Catapult%20Linux%20Tryserver/builds/11225

Original change's description:
> Reland "bot_update: Patch on gclient by default."
> 
> This is a reland of e38cf570fc
> 
> The issue with win CQ bots was fixed in https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1036309
> It was due to misconfigured git user.{name,email}
> 
> Original change's description:
> > bot_update: Patch on gclient by default.
> >
> > See [4] for the design doc for this change.
> >
> > We're moving the patching logic from bot_update to gclient.
> > This way we can test patches of dependencies that modify their DEPS
> > files as well, for example when ANGLE uploads a patch that modifies
> > DEPS files to be tested by a Chromium trybot.
> >
> > Chromium Linux CQ and Angle trybots are already running this way
> > (see [1] and [2]) and a PSA has already been sent [3]
> >
> > [1] https://chromium.googlesource.com/chromium/src/+/master/infra/config/global/cr-buildbucket.cfg#214
> > [2] https://chromium.googlesource.com/angle/angle/+/infra/config/cr-buildbucket.cfg#105
> > [3] https://groups.google.com/a/google.com/forum/#!topic/chrome-infra/FVHN2kdUX4I
> > [4] https://docs.google.com/document/d/1GSTw4ysm5AYjNR6vMA7NJUxLK2VN9IpOEp_v0u-wyOE/edit?ts=5ad78165#
> >
> > Bug: 643346
> > Change-Id: Ic9a9dcfae86aca730d35fbb26c26b21135e05bf3
> > Recipe-Nontrivial-Roll: skia
> > Recipe-Nontrivial-Roll: infra
> > Recipe-Nontrivial-Roll: build_limited_scripts_slave
> > Recipe-Nontrivial-Roll: skiabuildbot
> > Recipe-Nontrivial-Roll: build
> > Recipe-Nontrivial-Roll: release_scripts
> > Reviewed-on: https://chromium-review.googlesource.com/1014356
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> > Reviewed-by: Aaron Gable <agable@chromium.org>
> 
> Bug: 643346
> Change-Id: I4f4edd8e815cb12a4cbc3ab690eaf588bc2accc1
> Reviewed-on: https://chromium-review.googlesource.com/1039966
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=agable@chromium.org,tandrii@chromium.org,ehmaldonado@chromium.org

Change-Id: Ia8a5779cde3c31812121cffdd806476d4536f35e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 643346
Reviewed-on: https://chromium-review.googlesource.com/1043167
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
7 years ago