Commit Graph

22 Commits (a3be9a522b8adb8443d4f7a1a8884a787d8cce33)

Author SHA1 Message Date
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 60e7f52377 [bot_update] Stop using revision and parent_got_revision properties
Use self.m.buildbucket.build.input.gitiles_commit.id instead.
It encapsulates revision and parent_got_revision properties.

Also, honor host and project of the specified commit.
This enables overriding non-first gclient solution at the build-level
for arbitrary buildbucket builds.


Bug: 877161
Change-Id: I3f92f04ca84a1d30cbbb2670f62bea2bd9ee5932
Reviewed-on: https://chromium-review.googlesource.com/1200066
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 5484b866dc bot_update: use buildbucket's gitiles_commit as repo/revision input.
Today, whenever LUCI scheduler sets gitiles_commit, a revision property
is also always set, thus this CL will have no effect on today's production.

The goal of CL is to pave the way to avoid this duplication. For starters,
one could start real writing tests with

    + api.buildbucket.ci_build(..., revision='sha1')

without the need to duplicate the same revision as a property. All
recipes which WAI with such input are thus ready to work w/o 'revision'
property. After that, we'll be able to stop the duplication in LUCI scheduler.

R=hinoka

Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build
Change-Id: I1773b1c3d2a98a9dbd1cfdd9ac2b4fb99745ee99
Reviewed-on: https://chromium-review.googlesource.com/1123713
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@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
Edward Lesmes ee04b9a2f4 bot_update: Make gclient experiment a property instead of an argument.
Is easier to configure experimental bots this way.

Bug: 643346
Change-Id: Idb6d3a68b02949dce71dbcba38e8ef756c467830
Reviewed-on: https://chromium-review.googlesource.com/981515
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Robert Iannucci 456b0d648f [bot_update] Remove support for rietveld patches.
R=agable@chromium.org, tandrii@chromium.org

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: infra
Change-Id: I518335e7b8fdce316b5566caccd3c4c7c2ae741a
Reviewed-on: https://chromium-review.googlesource.com/960161
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Robert Iannucci f4c2703a6d [bot_update] Remove rietveld recipe_module.
R=agable@chromium.org, tandrii@chromium.org

Recipe-Nontrivial-Roll: build
Change-Id: Ic4c2dc7a50d389f18f3e0c1de332cb1a0ab376a9
Reviewed-on: https://chromium-review.googlesource.com/957834
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Robert Iannucci 069dd4fa6b [bot_update] Put depot_tools at the end of $PATH on LUCI.
This should prevent bot_update from overriding vpython by accident.

R=tandrii@chromium.org

Recipe-Nontrivial-Roll: build
Bug: 789808
Change-Id: Ia574204439588862f29f94a80e978b2ff4b57586
Reviewed-on: https://chromium-review.googlesource.com/828069
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov d7e241a22c bot_update: fix minor pylint issues.
Change-Id: I2f500bb8089039e689d5a989eb77f91374528164
Reviewed-on: https://chromium-review.googlesource.com/771381
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Ryan Tseng 70dea4270e Reland 2 "bot_update recipe: Upload source manifest"
This relands commit 47b67c426b.
    
Also:
* Fix bot_update.py output of manifest
    
Bug: 772529,776299
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: skiabuildbot
Recipe-Nontrivial-Roll: release_scripts
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: skiabuildbot
Recipe-Nontrivial-Roll: build

Change-Id: I31828ea5bfbc284623be8e553980f83d0889de92
Reviewed-on: https://chromium-review.googlesource.com/748308
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
8 years ago
Ryan Tseng 5d790d53ea Revert "Reland "bot_update recipe: Upload source manifest""
This reverts commit 47b67c426b.

Reason for revert: Bug in bot_update.py resource, breaks recipe roller.

Original change's description:
> Reland "bot_update recipe: Upload source manifest"
> 
> This reverts commit c3d1208d5c.
> 
> Also:
> * Instead of replacing "manifest", just add a new "source_manifest" 
> to the output JSON.  This allow transition without breakage.
> * Change the test api so test for recipe output changes.
> 
> The plan is to land this first, switch all downstream to "source_manifest",
> and then remove the original "manifest" key.
> 
> Bug: 772529,776299
> Change-Id: Iffb75f18046f8e4c058afe077872d4257b9dd754
> Recipe-Nontrivial-Roll: infra
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Recipe-Nontrivial-Roll: skiabuildbot
> Recipe-Nontrivial-Roll: release_scripts
> Recipe-Nontrivial-Roll: skia
> Recipe-Nontrivial-Roll: skiabuildbot
> Recipe-Nontrivial-Roll: build
> Reviewed-on: https://chromium-review.googlesource.com/731378
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Ryan Tseng <hinoka@chromium.org>

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

Change-Id: I7a4ee904075e8b75b8a47f9ef0cd8a633af85a9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 772529, 776299
Reviewed-on: https://chromium-review.googlesource.com/748312
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
8 years ago
Ryan Tseng 47b67c426b Reland "bot_update recipe: Upload source manifest"
This reverts commit c3d1208d5c.

Also:
* Instead of replacing "manifest", just add a new "source_manifest" 
to the output JSON.  This allow transition without breakage.
* Change the test api so test for recipe output changes.

The plan is to land this first, switch all downstream to "source_manifest",
and then remove the original "manifest" key.

Bug: 772529,776299
Change-Id: Iffb75f18046f8e4c058afe077872d4257b9dd754
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: skiabuildbot
Recipe-Nontrivial-Roll: release_scripts
Recipe-Nontrivial-Roll: skia
Recipe-Nontrivial-Roll: skiabuildbot
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/731378
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
8 years ago
Michael Achenbach c3d1208d5c Revert "bot_update recipe: Upload source manifest"
This reverts commit 037f9b80bb.

Reason for revert: The structural change to manifest breaks the recipe
tester:
https://cs.chromium.org/chromium/infra/recipes/recipes/recipe_roll_tryjob.py?q=recipe_roll_tryjob.py&sq=package:chromium&dr&l=149
https://crbug.com/776299

Original change's description:
> bot_update recipe: Upload source manifest
> 
> Bug: 772529
> Change-Id: I3f833740ddfbc71be42b140c99dcd4bbfeed54fe
> Reviewed-on: https://chromium-review.googlesource.com/706071
> Commit-Queue: Ryan Tseng <hinoka@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>

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

Change-Id: Iba9653d73b7f117ca2f94619ae5da900cd0c8c98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 772529,776299
Reviewed-on: https://chromium-review.googlesource.com/728059
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Ryan Tseng 037f9b80bb bot_update recipe: Upload source manifest
Bug: 772529
Change-Id: I3f833740ddfbc71be42b140c99dcd4bbfeed54fe
Reviewed-on: https://chromium-review.googlesource.com/706071
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Michael Achenbach 7dadf05dad Query Gerrit for destination branch in bot_update
This makes bot_update query Gerrit when syncing for Gerrit tryjobs.

The query will establish the actual destination branch of the CL,
which can be different from master (e.g. a feature branch).

Bot_update will ensure to use this destination branch for the repo
that corresponds to the CL's project. Both the main project or a
deps'ed project work.

Initially, this lives behind a flag that can be controlled in
downstream recipes. Eventually we'll set this to default after a
gradual roll-out.

Branches in branch-heads are not supported yet.

Bug: 740456
Change-Id: I4a0d50e2ca8fe90f8d29964a3ffab17291f7be60
Reviewed-on: https://chromium-review.googlesource.com/566824
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Dan Jacques dc598e8223 [bot_update] Prefix PATH, cleanup.
Prefix "depot_tools" to PATH instead of appending. This will ensure that
"depot_tools" pulls resources from the recipe checkout as a preference,
not as a last resort.

Use "env_prefixes" instead of "env" to prefix PATH.

Remove Git speed limit settings, which are taken care of by the Git
wrapper now.

BUG=chromium:738176
TEST=expectations
R=hinoka@chromium.org, iannucci@chromium.org

Change-Id: I2e509a331266e867be323bc70e3bc0f08f85246f
Reviewed-on: https://chromium-review.googlesource.com/556287
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Daniel Jacques <dnj@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
Robert Iannucci ff51bcd1f8 [bot_update] fix Property default to be actual JSON.
R=dnj@chromium.org

Bug:
Change-Id: I18eb355282f2efc067a6dc70e1136f9a49d3488a
Reviewed-on: https://chromium-review.googlesource.com/494306
Reviewed-by: Daniel Jacques <dnj@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