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>
This commit is contained in:
Nodir Turakulov
2018-09-11 19:38:59 +00:00
committed by Commit Bot
parent 56e273293a
commit ddda0b5b8a
19 changed files with 519 additions and 189 deletions

View File

@@ -77,7 +77,7 @@ class GerritApi(recipe_api.RecipeApi):
Result is cached.
Args:
host: Gerrit host to query.
host: URL of Gerrit host to query.
change: The change number.
Returns:
@@ -108,7 +108,7 @@ class GerritApi(recipe_api.RecipeApi):
Get the description for a given CL and patchset.
Args:
host: Gerrit host to query.
host: URL of Gerrit host to query.
change: The change number.
patchset: The patchset number.
@@ -154,7 +154,7 @@ class GerritApi(recipe_api.RecipeApi):
Query changes for the given host.
Args:
host: Gerrit host to query.
host: URL of Gerrit host to query.
query_params: Query parameters as list of (key, value) tuples to form a
query as documented here:
https://gerrit-review.googlesource.com/Documentation/user-search.html#search-operators