[roll_comment] Disable dry run mode
Remove CL commenting code from the auto_roller recipe module and remove
the dry run codepath from the roll_comment recipe, so that all roll
comments are done by the roll-commenter builder instead of by the
rollers themselves.
Also, link to each CL from the "comment" step for easier debugging.
Bug: 43899
Change-Id: I49e4797bc6d4626f5f67bc42fceee4a40b995933
diff --git a/recipe_modules/auto_roller/api.py b/recipe_modules/auto_roller/api.py
index 89925ab..787d3c6 100644
--- a/recipe_modules/auto_roller/api.py
+++ b/recipe_modules/auto_roller/api.py
@@ -296,34 +296,12 @@
return CQResult.TIMEOUT
- # TODO(fxb/43899): Remove commenting capability from this recipe module.
- def _comment_successful_roll(self, change_ids):
- """Writes a message signifying a successful roll for the given change_ids."""
- message = 'Change has been successfully rolled.'
- with self.m.context(infra_steps=True):
- with self.m.step.nest('comment successful roll'):
- for change_id in change_ids:
- try:
- self.m.gerrit.set_review(
- 'update %s' % change_id,
- change_id,
- message=message,
- test_data=self.m.json.test_api.output({}),
- )
- except self.m.step.StepFailure:
- # Comment failures shouldn't fail the build or prevent the roller
- # from commenting on the rest of the changes.
- pass
-
def attempt_roll(self,
gerrit_project,
repo_dir,
commit_message,
commit_untracked=False,
dry_run=False,
- origin_host=None,
- commit_ids=None,
- send_comment=True,
upstream_ref=UPSTREAM_REF):
"""Attempts to submit local edits via the CQ.
@@ -357,12 +335,6 @@
multiline string (embedded newlines are allowed).
commit_untracked (bool): Whether to commit untracked files as well.
dry_run (bool): Whether to execute this method in dry_run mode.
- origin_host (str): The gerrit host from which the commits in this roll
- originated.
- commit_ids (list): A list of strings representing the change IDs of all
- the commits included in this roll.
- send_comment (bool): Whether to comment on the rolled commits once roll
- is complete.
upstream_ref (str): The git ref to roll changes onto.
Returns:
@@ -394,10 +366,6 @@
if dry_run:
# Only abandon the roll on success if it was a dry-run.
self.m.gerrit.abandon('abandon roll: dry run complete', change.full_id)
- elif send_comment and commit_ids:
- if origin_host:
- self.m.gerrit.host = origin_host
- self._comment_successful_roll(commit_ids)
return True
elif result == CQResult.FAILURE:
self._fail_roll(reason='CQ failed', change=change, abandon_cl=True)
diff --git a/recipe_modules/auto_roller/examples/full.expected/no-package-update.json b/recipe_modules/auto_roller/examples/full.expected/no-package-update.json
index e4659dc..6a13eb5 100644
--- a/recipe_modules/auto_roller/examples/full.expected/no-package-update.json
+++ b/recipe_modules/auto_roller/examples/full.expected/no-package-update.json
@@ -357,48 +357,6 @@
},
{
"cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"123456789\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 123456789",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"987654321\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 987654321",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
"name": "read_manifest_project_name"
},
{
diff --git a/recipe_modules/auto_roller/examples/full.expected/zircon-manifest-update.json b/recipe_modules/auto_roller/examples/full.expected/zircon-manifest-update.json
index 1e65379..fb85f89 100644
--- a/recipe_modules/auto_roller/examples/full.expected/zircon-manifest-update.json
+++ b/recipe_modules/auto_roller/examples/full.expected/zircon-manifest-update.json
@@ -357,48 +357,6 @@
},
{
"cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"123456789\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 123456789",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"987654321\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 987654321",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
"name": "read_manifest_project_name"
},
{
diff --git a/recipe_modules/auto_roller/examples/full.expected/zircon-no-manifest-update.json b/recipe_modules/auto_roller/examples/full.expected/zircon-no-manifest-update.json
index 4480425..4362b6a 100644
--- a/recipe_modules/auto_roller/examples/full.expected/zircon-no-manifest-update.json
+++ b/recipe_modules/auto_roller/examples/full.expected/zircon-no-manifest-update.json
@@ -357,48 +357,6 @@
},
{
"cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"123456789\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 123456789",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"987654321\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 987654321",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
"name": "read_manifest_project_name"
},
{
diff --git a/recipe_modules/auto_roller/examples/full.expected/zircon_default.json b/recipe_modules/auto_roller/examples/full.expected/zircon_default.json
index 1e65379..fb85f89 100644
--- a/recipe_modules/auto_roller/examples/full.expected/zircon_default.json
+++ b/recipe_modules/auto_roller/examples/full.expected/zircon_default.json
@@ -357,48 +357,6 @@
},
{
"cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"123456789\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 123456789",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"987654321\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 987654321",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
"name": "read_manifest_project_name"
},
{
diff --git a/recipe_modules/auto_roller/examples/full.expected/zircon_default_no_comment.json b/recipe_modules/auto_roller/examples/full.expected/zircon_default_no_comment.json
deleted file mode 100644
index fb85f89..0000000
--- a/recipe_modules/auto_roller/examples/full.expected/zircon_default_no_comment.json
+++ /dev/null
@@ -1,606 +0,0 @@
-[
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[START_DIR]/garnet"
- ],
- "infra_step": true,
- "name": "makedirs"
- },
- {
- "cmd": [
- "git",
- "init"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git init"
- },
- {
- "cmd": [
- "git",
- "remote",
- "add",
- "origin",
- "https://fuchsia.googlesource.com/garnet"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git remote"
- },
- {
- "cmd": [],
- "name": "cache"
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[CACHE]/git/fuchsia.googlesource.com-garnet"
- ],
- "cwd": "[START_DIR]/garnet",
- "infra_step": true,
- "name": "cache.makedirs",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "init",
- "--bare"
- ],
- "cwd": "[CACHE]/git/fuchsia.googlesource.com-garnet",
- "name": "cache.git init",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "config",
- "remote.origin.url",
- "https://fuchsia.googlesource.com/garnet"
- ],
- "cwd": "[CACHE]/git/fuchsia.googlesource.com-garnet",
- "name": "cache.remote set-url",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "config",
- "--replace-all",
- "remote.origin.fetch",
- "+refs/heads/*:refs/heads/*",
- "\\+refs/heads/\\*:.*"
- ],
- "cwd": "[CACHE]/git/fuchsia.googlesource.com-garnet",
- "name": "cache.git config",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "fetch",
- "--prune",
- "--tags",
- "origin"
- ],
- "cwd": "[CACHE]/git/fuchsia.googlesource.com-garnet",
- "name": "cache.git fetch",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[START_DIR]/garnet/.git/objects/info"
- ],
- "cwd": "[START_DIR]/garnet",
- "infra_step": true,
- "name": "cache.makedirs object/info",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "copy",
- "[CACHE]/git/fuchsia.googlesource.com-garnet/objects\n",
- "[START_DIR]/garnet/.git/objects/info/alternates"
- ],
- "cwd": "[START_DIR]/garnet",
- "infra_step": true,
- "name": "cache.alternates",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@alternates@[CACHE]/git/fuchsia.googlesource.com-garnet/objects@@@",
- "@@@STEP_LOG_END@alternates@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "fetch",
- "--tags",
- "origin",
- "master"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git fetch"
- },
- {
- "cmd": [
- "git",
- "checkout",
- "-f",
- "FETCH_HEAD"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git checkout"
- },
- {
- "cmd": [
- "git",
- "rev-parse",
- "HEAD"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git rev-parse"
- },
- {
- "cmd": [
- "git",
- "clean",
- "-f",
- "-d",
- "-x"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git clean"
- },
- {
- "cmd": [],
- "name": "submodule"
- },
- {
- "cmd": [
- "git",
- "submodule",
- "sync"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "submodule.git submodule sync",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "submodule",
- "update",
- "--init"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "submodule.git submodule update",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "ls-files",
- "--modified",
- "--deleted",
- "--exclude-standard"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "check for no-op commit",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@stdout@hello@@@",
- "@@@STEP_LOG_END@stdout@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "diff"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git diff"
- },
- {
- "cmd": [
- "git",
- "hash-object",
- "a diff"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git hash-object"
- },
- {
- "cmd": [
- "git",
- "commit",
- "-m",
- "hello world!\nChange-Id: Iabc123\n",
- "-a"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git commit"
- },
- {
- "cmd": [
- "git",
- "push",
- "origin",
- "HEAD:refs/for/master"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git push",
- "~followup_annotations": [
- "@@@STEP_LINK@gerrit link@https://fuchsia-review.googlesource.com/q/Iabc123@@@"
- ]
- },
- {
- "cmd": [],
- "name": "ensure gerrit"
- },
- {
- "cmd": [
- "cipd",
- "ensure",
- "-root",
- "[START_DIR]/cipd/gerrit",
- "-ensure-file",
- "infra/tools/luci/gerrit/${platform} latest",
- "-json-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "ensure gerrit.ensure_installed",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/gerrit/resolved-platform\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"garnet~master~Iabc123\", \"input\": {\"labels\": {\"Code-Review\": 2, \"Commit-Queue\": 2}}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "name": "submit to commit queue",
- "~followup_annotations": [
- "@@@STEP_LOG_END@json.output (invalid)@@@",
- "@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
- "@@@STEP_LOG_END@json.output (exception)@@@"
- ]
- },
- {
- "cmd": [],
- "name": "check for completion"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "change-detail",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"garnet~master~Iabc123\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "check for completion.check if done (0)",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"labels\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"Commit-Queue\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"approved\": {}@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"status\": \"MERGED\"@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
- "name": "read_manifest_project_name"
- },
- {
- "cmd": [],
- "name": "read_manifest_project_name.ensure jiri",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "cipd",
- "ensure",
- "-root",
- "[START_DIR]/cipd/jiri",
- "-ensure-file",
- "fuchsia/tools/jiri/${platform} git_revision:60436c301224231cb99be41ce937dfc223bee272",
- "-json-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "read_manifest_project_name.ensure jiri.ensure_installed",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-git_revision:604\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"package\": \"fuchsia/tools/jiri/resolved-platform\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/jiri/jiri",
- "manifest",
- "-vv",
- "-time",
- "-j=50",
- "-element",
- "project_name",
- "-template",
- "\n {\n \"gerrithost\": \"{{.GerritHost}}\",\n \"githooks\": \"{{.GitHooks}}\",\n \"historydepth\": \"{{.HistoryDepth}}\",\n \"name\": \"{{.Name}}\",\n \"path\": \"{{.Path}}\",\n \"remote\": \"{{.Remote}}\",\n \"remotebranch\": \"{{.RemoteBranch}}\",\n \"revision\": \"{{.Revision}}\"\n }\n ",
- "manifest"
- ],
- "name": "read_manifest_project_name.jiri manifest",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"remote\": \"https://fuchsia.googlesource.com/mock/remote\"@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/jiri/jiri",
- "edit",
- "-vv",
- "-time",
- "-j=50",
- "-json-output",
- "/path/to/tmp/json",
- "-project",
- "project_name=revision",
- "manifest"
- ],
- "name": "jiri edit project_name",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"projects\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_revision\": \"def456\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_revision\": \"abc123\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
- "name": "ensure gitiles"
- },
- {
- "cmd": [
- "cipd",
- "ensure",
- "-root",
- "[START_DIR]/cipd/gitiles",
- "-ensure-file",
- "infra/tools/luci/gitiles/${platform} latest",
- "-json-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "ensure gitiles.ensure_installed",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/gitiles/resolved-platform\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gitiles/gitiles",
- "log",
- "-json-output",
- "/path/to/tmp/json",
- "https://fuchsia.googlesource.com/mock/remote",
- "abc123..def456"
- ],
- "name": "log project_name",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@[@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"author\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_0.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"committer\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_0.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"id\": \"3e30158f2a7caccb7a9f6632a60011e7a44e1e5c\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"message\": \"fake A msg 0\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"parents\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ \"83a7614b3b60951511be50db1b9561daff4bb447\"@@@",
- "@@@STEP_LOG_LINE@json.output@ ], @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree\": \"1b6412b24ec3add84836c8fdd1af5ac8e35b61d9\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree_diff\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_id\": \"8bea05ad53680fce6937543f0d98cd48e295b8ff\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_mode\": 33188, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_path\": \"a.py\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_id\": \"0000000000000000000000000000000000000000\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_mode\": 0, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"type\": \"add\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"author\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_1.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"committer\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_1.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"id\": \"3380b83c11e029b7291c83c44e7b1ce09d465fd1\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"message\": \"fake A msg 1\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"parents\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ \"8675a52c73c701cb0b2c48f5ed4a9058c624e6cd\"@@@",
- "@@@STEP_LOG_LINE@json.output@ ], @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree\": \"a1b1e6aa501915989b45a95e1224ec2a88655eb3\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree_diff\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_id\": \"06bc4c79002f278528aaddae4e056a11f58c19ad\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_mode\": 33188, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_path\": \"b.py\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_id\": \"0000000000000000000000000000000000000000\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_mode\": 0, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"type\": \"add\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"author\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_2.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"committer\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_2.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"id\": \"363caa907186de786cb5292cd1ab7245da954815\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"message\": \"fake A msg 2\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"parents\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ \"255c6325c4c654e17e6b35142e3912c86f1718f2\"@@@",
- "@@@STEP_LOG_LINE@json.output@ ], @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree\": \"e84d4ad259e69da73d2b842e2b9709f08e8b22bd\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree_diff\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_id\": \"d7f478bf423219f2f47c1a6ed344fc597a8bf18f\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_mode\": 33188, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_path\": \"c.py\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_id\": \"0000000000000000000000000000000000000000\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_mode\": 0, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"type\": \"add\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@]@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/jiri/jiri",
- "edit",
- "-vv",
- "-time",
- "-j=50",
- "-json-output",
- "/path/to/tmp/json",
- "-package",
- "package_name=git_revision:revision",
- "manifest"
- ],
- "name": "jiri edit package_name",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"packages\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_version\": \"git_revision:def456\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_version\": \"git_revision:abc123\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "name": "$result"
- }
-]
\ No newline at end of file
diff --git a/recipe_modules/auto_roller/examples/full.expected/zircon_existing_roll.json b/recipe_modules/auto_roller/examples/full.expected/zircon_existing_roll.json
index 3548d1f..6c8242c 100644
--- a/recipe_modules/auto_roller/examples/full.expected/zircon_existing_roll.json
+++ b/recipe_modules/auto_roller/examples/full.expected/zircon_existing_roll.json
@@ -379,48 +379,6 @@
},
{
"cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"123456789\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 123456789",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"987654321\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 987654321",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
"name": "read_manifest_project_name"
},
{
diff --git a/recipe_modules/auto_roller/examples/full.expected/zircon_failed_comment.json b/recipe_modules/auto_roller/examples/full.expected/zircon_failed_comment.json
deleted file mode 100644
index e9e1d1c..0000000
--- a/recipe_modules/auto_roller/examples/full.expected/zircon_failed_comment.json
+++ /dev/null
@@ -1,652 +0,0 @@
-[
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[START_DIR]/garnet"
- ],
- "infra_step": true,
- "name": "makedirs"
- },
- {
- "cmd": [
- "git",
- "init"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git init"
- },
- {
- "cmd": [
- "git",
- "remote",
- "add",
- "origin",
- "https://fuchsia.googlesource.com/garnet"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git remote"
- },
- {
- "cmd": [],
- "name": "cache"
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[CACHE]/git/fuchsia.googlesource.com-garnet"
- ],
- "cwd": "[START_DIR]/garnet",
- "infra_step": true,
- "name": "cache.makedirs",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "init",
- "--bare"
- ],
- "cwd": "[CACHE]/git/fuchsia.googlesource.com-garnet",
- "name": "cache.git init",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "config",
- "remote.origin.url",
- "https://fuchsia.googlesource.com/garnet"
- ],
- "cwd": "[CACHE]/git/fuchsia.googlesource.com-garnet",
- "name": "cache.remote set-url",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "config",
- "--replace-all",
- "remote.origin.fetch",
- "+refs/heads/*:refs/heads/*",
- "\\+refs/heads/\\*:.*"
- ],
- "cwd": "[CACHE]/git/fuchsia.googlesource.com-garnet",
- "name": "cache.git config",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "fetch",
- "--prune",
- "--tags",
- "origin"
- ],
- "cwd": "[CACHE]/git/fuchsia.googlesource.com-garnet",
- "name": "cache.git fetch",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[START_DIR]/garnet/.git/objects/info"
- ],
- "cwd": "[START_DIR]/garnet",
- "infra_step": true,
- "name": "cache.makedirs object/info",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "copy",
- "[CACHE]/git/fuchsia.googlesource.com-garnet/objects\n",
- "[START_DIR]/garnet/.git/objects/info/alternates"
- ],
- "cwd": "[START_DIR]/garnet",
- "infra_step": true,
- "name": "cache.alternates",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@alternates@[CACHE]/git/fuchsia.googlesource.com-garnet/objects@@@",
- "@@@STEP_LOG_END@alternates@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "fetch",
- "--tags",
- "origin",
- "master"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git fetch"
- },
- {
- "cmd": [
- "git",
- "checkout",
- "-f",
- "FETCH_HEAD"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git checkout"
- },
- {
- "cmd": [
- "git",
- "rev-parse",
- "HEAD"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git rev-parse"
- },
- {
- "cmd": [
- "git",
- "clean",
- "-f",
- "-d",
- "-x"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git clean"
- },
- {
- "cmd": [],
- "name": "submodule"
- },
- {
- "cmd": [
- "git",
- "submodule",
- "sync"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "submodule.git submodule sync",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "submodule",
- "update",
- "--init"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "submodule.git submodule update",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "ls-files",
- "--modified",
- "--deleted",
- "--exclude-standard"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "check for no-op commit",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@stdout@hello@@@",
- "@@@STEP_LOG_END@stdout@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "diff"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git diff"
- },
- {
- "cmd": [
- "git",
- "hash-object",
- "a diff"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git hash-object"
- },
- {
- "cmd": [
- "git",
- "commit",
- "-m",
- "hello world!\nChange-Id: Iabc123\n",
- "-a"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git commit"
- },
- {
- "cmd": [
- "git",
- "push",
- "origin",
- "HEAD:refs/for/master"
- ],
- "cwd": "[START_DIR]/garnet",
- "name": "git push",
- "~followup_annotations": [
- "@@@STEP_LINK@gerrit link@https://fuchsia-review.googlesource.com/q/Iabc123@@@"
- ]
- },
- {
- "cmd": [],
- "name": "ensure gerrit"
- },
- {
- "cmd": [
- "cipd",
- "ensure",
- "-root",
- "[START_DIR]/cipd/gerrit",
- "-ensure-file",
- "infra/tools/luci/gerrit/${platform} latest",
- "-json-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "ensure gerrit.ensure_installed",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/gerrit/resolved-platform\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"garnet~master~Iabc123\", \"input\": {\"labels\": {\"Code-Review\": 2, \"Commit-Queue\": 2}}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "name": "submit to commit queue",
- "~followup_annotations": [
- "@@@STEP_LOG_END@json.output (invalid)@@@",
- "@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
- "@@@STEP_LOG_END@json.output (exception)@@@"
- ]
- },
- {
- "cmd": [],
- "name": "check for completion"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "change-detail",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"garnet~master~Iabc123\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "check for completion.check if done (0)",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"labels\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"Commit-Queue\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"approved\": {}@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"status\": \"MERGED\"@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
- "name": "comment successful roll",
- "~followup_annotations": [
- "@@@STEP_EXCEPTION@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"123456789\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 123456789",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@",
- "@@@STEP_EXCEPTION@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"987654321\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 987654321",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
- "name": "read_manifest_project_name"
- },
- {
- "cmd": [],
- "name": "read_manifest_project_name.ensure jiri",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "cipd",
- "ensure",
- "-root",
- "[START_DIR]/cipd/jiri",
- "-ensure-file",
- "fuchsia/tools/jiri/${platform} git_revision:60436c301224231cb99be41ce937dfc223bee272",
- "-json-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "read_manifest_project_name.ensure jiri.ensure_installed",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-git_revision:604\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"package\": \"fuchsia/tools/jiri/resolved-platform\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/jiri/jiri",
- "manifest",
- "-vv",
- "-time",
- "-j=50",
- "-element",
- "project_name",
- "-template",
- "\n {\n \"gerrithost\": \"{{.GerritHost}}\",\n \"githooks\": \"{{.GitHooks}}\",\n \"historydepth\": \"{{.HistoryDepth}}\",\n \"name\": \"{{.Name}}\",\n \"path\": \"{{.Path}}\",\n \"remote\": \"{{.Remote}}\",\n \"remotebranch\": \"{{.RemoteBranch}}\",\n \"revision\": \"{{.Revision}}\"\n }\n ",
- "manifest"
- ],
- "name": "read_manifest_project_name.jiri manifest",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"remote\": \"https://fuchsia.googlesource.com/mock/remote\"@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/jiri/jiri",
- "edit",
- "-vv",
- "-time",
- "-j=50",
- "-json-output",
- "/path/to/tmp/json",
- "-project",
- "project_name=revision",
- "manifest"
- ],
- "name": "jiri edit project_name",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"projects\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_revision\": \"def456\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_revision\": \"abc123\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
- "name": "ensure gitiles"
- },
- {
- "cmd": [
- "cipd",
- "ensure",
- "-root",
- "[START_DIR]/cipd/gitiles",
- "-ensure-file",
- "infra/tools/luci/gitiles/${platform} latest",
- "-json-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "ensure gitiles.ensure_installed",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/gitiles/resolved-platform\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gitiles/gitiles",
- "log",
- "-json-output",
- "/path/to/tmp/json",
- "https://fuchsia.googlesource.com/mock/remote",
- "abc123..def456"
- ],
- "name": "log project_name",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@[@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"author\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_0.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"committer\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_0.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"id\": \"3e30158f2a7caccb7a9f6632a60011e7a44e1e5c\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"message\": \"fake A msg 0\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"parents\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ \"83a7614b3b60951511be50db1b9561daff4bb447\"@@@",
- "@@@STEP_LOG_LINE@json.output@ ], @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree\": \"1b6412b24ec3add84836c8fdd1af5ac8e35b61d9\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree_diff\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_id\": \"8bea05ad53680fce6937543f0d98cd48e295b8ff\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_mode\": 33188, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_path\": \"a.py\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_id\": \"0000000000000000000000000000000000000000\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_mode\": 0, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"type\": \"add\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"author\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_1.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"committer\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_1.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"id\": \"3380b83c11e029b7291c83c44e7b1ce09d465fd1\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"message\": \"fake A msg 1\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"parents\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ \"8675a52c73c701cb0b2c48f5ed4a9058c624e6cd\"@@@",
- "@@@STEP_LOG_LINE@json.output@ ], @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree\": \"a1b1e6aa501915989b45a95e1224ec2a88655eb3\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree_diff\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_id\": \"06bc4c79002f278528aaddae4e056a11f58c19ad\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_mode\": 33188, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_path\": \"b.py\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_id\": \"0000000000000000000000000000000000000000\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_mode\": 0, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"type\": \"add\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"author\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_2.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"committer\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"fake_A@fake_2.email.com\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"name\": \"Fake A\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"id\": \"363caa907186de786cb5292cd1ab7245da954815\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"message\": \"fake A msg 2\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"parents\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ \"255c6325c4c654e17e6b35142e3912c86f1718f2\"@@@",
- "@@@STEP_LOG_LINE@json.output@ ], @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree\": \"e84d4ad259e69da73d2b842e2b9709f08e8b22bd\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tree_diff\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_id\": \"d7f478bf423219f2f47c1a6ed344fc597a8bf18f\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_mode\": 33188, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_path\": \"c.py\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_id\": \"0000000000000000000000000000000000000000\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_mode\": 0, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"type\": \"add\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@]@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/jiri/jiri",
- "edit",
- "-vv",
- "-time",
- "-j=50",
- "-json-output",
- "/path/to/tmp/json",
- "-package",
- "package_name=git_revision:revision",
- "manifest"
- ],
- "name": "jiri edit package_name",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"packages\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new_version\": \"git_revision:def456\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"old_version\": \"git_revision:abc123\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "name": "$result"
- }
-]
\ No newline at end of file
diff --git a/recipe_modules/auto_roller/examples/full.expected/zircon_integral_poll_secs.json b/recipe_modules/auto_roller/examples/full.expected/zircon_integral_poll_secs.json
index 1e65379..fb85f89 100644
--- a/recipe_modules/auto_roller/examples/full.expected/zircon_integral_poll_secs.json
+++ b/recipe_modules/auto_roller/examples/full.expected/zircon_integral_poll_secs.json
@@ -357,48 +357,6 @@
},
{
"cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"123456789\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 123456789",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"987654321\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 987654321",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
"name": "read_manifest_project_name"
},
{
diff --git a/recipe_modules/auto_roller/examples/full.expected/zircon_pass_last_second.json b/recipe_modules/auto_roller/examples/full.expected/zircon_pass_last_second.json
index cc123ce..0278c6e 100644
--- a/recipe_modules/auto_roller/examples/full.expected/zircon_pass_last_second.json
+++ b/recipe_modules/auto_roller/examples/full.expected/zircon_pass_last_second.json
@@ -383,48 +383,6 @@
},
{
"cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"123456789\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 123456789",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"987654321\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 987654321",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
"name": "read_manifest_project_name"
},
{
diff --git a/recipe_modules/auto_roller/examples/full.expected/zircon_untracked.json b/recipe_modules/auto_roller/examples/full.expected/zircon_untracked.json
index 77878a6..db882ba 100644
--- a/recipe_modules/auto_roller/examples/full.expected/zircon_untracked.json
+++ b/recipe_modules/auto_roller/examples/full.expected/zircon_untracked.json
@@ -368,48 +368,6 @@
},
{
"cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"123456789\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 123456789",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"987654321\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 987654321",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [],
"name": "read_manifest_project_name"
},
{
diff --git a/recipe_modules/auto_roller/examples/full.py b/recipe_modules/auto_roller/examples/full.py
index ba9438d..71da72f 100644
--- a/recipe_modules/auto_roller/examples/full.py
+++ b/recipe_modules/auto_roller/examples/full.py
@@ -31,16 +31,10 @@
default=False,
help='Whether to dry-run the auto-roller (CQ+1 and abandon the change)'
),
- 'send_comment':
- Property(
- kind=bool,
- default=True,
- help='Whether to comment on commits once roll is complete'),
}
-def RunSteps(api, project, remote, commit_untracked_files, dry_run,
- send_comment):
+def RunSteps(api, project, remote, commit_untracked_files, dry_run):
# Check out the repo.
api.git.checkout(remote)
@@ -54,9 +48,6 @@
commit_message='hello world!',
commit_untracked=commit_untracked_files,
dry_run=dry_run,
- origin_host='https://origin-host-review.googlesource.com',
- commit_ids=['123456789', '987654321'],
- send_comment=send_comment,
)
# Update project manifest
@@ -130,15 +121,6 @@
api.auto_roller.success_step_data() +
mock_manifest_data + mock_log_data)
- # Test a successful roll of zircon into garnet without sending a comment
- # at the end once the roll is complete.
- yield (api.test('zircon_default_no_comment') + api.properties(
- project='garnet',
- remote='https://fuchsia.googlesource.com/garnet',
- send_comment=False) +
- api.auto_roller.success_step_data() +
- mock_manifest_data + mock_log_data)
-
# Test a successful roll of zircon into garnet with the default poll
# configuration, and include untracked files.
yield (api.test('zircon_untracked') + api.properties(
@@ -230,18 +212,4 @@
api.auto_roller.success_step_data() +
mock_manifest_data +
mock_log_data)
-
- # Test a successful roll where the roller fails to comment on the first CL.
- # It should still comment on the second one.
- yield (
- api.test('zircon_failed_comment') +
- api.properties(
- project='garnet', remote='https://fuchsia.googlesource.com/garnet') +
- api.auto_roller.success_step_data() +
- api.step_data('comment successful roll.update 123456789', retcode=1) +
- api.post_process(
- post_process.MustRun, 'comment successful roll.update 987654321') +
- mock_manifest_data +
- mock_log_data +
- api.post_process(post_process.StatusSuccess))
# yapf: enable
diff --git a/recipes/fuchsia_roller.expected/cobalt_project.json b/recipes/fuchsia_roller.expected/cobalt_project.json
index b9b5f2d..d157e10 100644
--- a/recipes/fuchsia_roller.expected/cobalt_project.json
+++ b/recipes/fuchsia_roller.expected/cobalt_project.json
@@ -194,7 +194,6 @@
"-json-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "ensure gitiles.ensure_installed",
"~followup_annotations": [
@@ -221,7 +220,6 @@
"https://cobalt-analytics.googlesource.com/config",
"[OLD_REVISION]..fc4dc762688d2263b254208f444f5c0a4b91bc07"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "log",
"~followup_annotations": [
@@ -358,7 +356,7 @@
"git",
"commit",
"-m",
- "[roll] Roll cobalt [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nChange-Id: Iabc123\n",
+ "[roll] Roll cobalt [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://cobalt-analytics.googlesource.com/config\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
"-a"
],
"cwd": "[START_DIR]/garnet",
@@ -461,67 +459,6 @@
]
},
{
- "cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3e30158f2a7caccb7a9f6632a60011e7a44e1e5c\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3e30158f2a7caccb7a9f6632a60011e7a44e1e5c",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3380b83c11e029b7291c83c44e7b1ce09d465fd1\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3380b83c11e029b7291c83c44e7b1ce09d465fd1",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"363caa907186de786cb5292cd1ab7245da954815\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 363caa907186de786cb5292cd1ab7245da954815",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipes/fuchsia_roller.expected/garnet.json b/recipes/fuchsia_roller.expected/garnet.json
index 1b8a529..6d63e24 100644
--- a/recipes/fuchsia_roller.expected/garnet.json
+++ b/recipes/fuchsia_roller.expected/garnet.json
@@ -193,7 +193,6 @@
"-json-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/peridot",
"infra_step": true,
"name": "ensure gitiles.ensure_installed",
"~followup_annotations": [
@@ -220,7 +219,6 @@
"https://fuchsia.googlesource.com/garnet",
"[OLD_REVISION]..fc4dc762688d2263b254208f444f5c0a4b91bc07"
],
- "cwd": "[START_DIR]/peridot",
"infra_step": true,
"name": "log",
"~followup_annotations": [
@@ -357,7 +355,7 @@
"git",
"commit",
"-m",
- "[roll] Roll garnet [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nChange-Id: Iabc123\n",
+ "[roll] Roll garnet [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/garnet\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
"-a"
],
"cwd": "[START_DIR]/peridot",
@@ -460,67 +458,6 @@
]
},
{
- "cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3e30158f2a7caccb7a9f6632a60011e7a44e1e5c\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3e30158f2a7caccb7a9f6632a60011e7a44e1e5c",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3380b83c11e029b7291c83c44e7b1ce09d465fd1\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3380b83c11e029b7291c83c44e7b1ce09d465fd1",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"363caa907186de786cb5292cd1ab7245da954815\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 363caa907186de786cb5292cd1ab7245da954815",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipes/fuchsia_roller.expected/missing_revision.json b/recipes/fuchsia_roller.expected/missing_revision.json
index a7963c2..04a412f 100644
--- a/recipes/fuchsia_roller.expected/missing_revision.json
+++ b/recipes/fuchsia_roller.expected/missing_revision.json
@@ -246,7 +246,6 @@
"https://fuchsia.googlesource.com/zircon",
"[OLD_REVISION]..fc4dc762688d2263b254208f444f5c0a4b91bc07"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "log",
"~followup_annotations": [
@@ -383,7 +382,7 @@
"git",
"commit",
"-m",
- "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nChange-Id: Iabc123\n",
+ "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
"-a"
],
"cwd": "[START_DIR]/garnet",
@@ -486,67 +485,6 @@
]
},
{
- "cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3e30158f2a7caccb7a9f6632a60011e7a44e1e5c\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3e30158f2a7caccb7a9f6632a60011e7a44e1e5c",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3380b83c11e029b7291c83c44e7b1ce09d465fd1\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3380b83c11e029b7291c83c44e7b1ce09d465fd1",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"363caa907186de786cb5292cd1ab7245da954815\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 363caa907186de786cb5292cd1ab7245da954815",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipes/fuchsia_roller.expected/peridot.json b/recipes/fuchsia_roller.expected/peridot.json
index 8f7f7c9..d6cffe8 100644
--- a/recipes/fuchsia_roller.expected/peridot.json
+++ b/recipes/fuchsia_roller.expected/peridot.json
@@ -193,7 +193,6 @@
"-json-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/topaz",
"infra_step": true,
"name": "ensure gitiles.ensure_installed",
"~followup_annotations": [
@@ -220,7 +219,6 @@
"https://fuchsia.googlesource.com/peridot",
"[OLD_REVISION]..fc4dc762688d2263b254208f444f5c0a4b91bc07"
],
- "cwd": "[START_DIR]/topaz",
"infra_step": true,
"name": "log",
"~followup_annotations": [
@@ -357,7 +355,7 @@
"git",
"commit",
"-m",
- "[roll] Roll peridot [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nChange-Id: Iabc123\n",
+ "[roll] Roll peridot [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/peridot\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
"-a"
],
"cwd": "[START_DIR]/topaz",
@@ -460,67 +458,6 @@
]
},
{
- "cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3e30158f2a7caccb7a9f6632a60011e7a44e1e5c\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3e30158f2a7caccb7a9f6632a60011e7a44e1e5c",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3380b83c11e029b7291c83c44e7b1ce09d465fd1\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3380b83c11e029b7291c83c44e7b1ce09d465fd1",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"363caa907186de786cb5292cd1ab7245da954815\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 363caa907186de786cb5292cd1ab7245da954815",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipes/fuchsia_roller.expected/peridot_with_lockfile.json b/recipes/fuchsia_roller.expected/peridot_with_lockfile.json
index 3d6d93c..08a4b37 100644
--- a/recipes/fuchsia_roller.expected/peridot_with_lockfile.json
+++ b/recipes/fuchsia_roller.expected/peridot_with_lockfile.json
@@ -215,7 +215,6 @@
"-json-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/topaz",
"infra_step": true,
"name": "ensure gitiles.ensure_installed",
"~followup_annotations": [
@@ -242,7 +241,6 @@
"https://fuchsia.googlesource.com/peridot",
"[OLD_REVISION]..fc4dc762688d2263b254208f444f5c0a4b91bc07"
],
- "cwd": "[START_DIR]/topaz",
"infra_step": true,
"name": "log",
"~followup_annotations": [
@@ -379,7 +377,7 @@
"git",
"commit",
"-m",
- "[roll] Roll peridot [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nChange-Id: Iabc123\n",
+ "[roll] Roll peridot [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/peridot\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
"-a"
],
"cwd": "[START_DIR]/topaz",
@@ -482,67 +480,6 @@
]
},
{
- "cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3e30158f2a7caccb7a9f6632a60011e7a44e1e5c\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3e30158f2a7caccb7a9f6632a60011e7a44e1e5c",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3380b83c11e029b7291c83c44e7b1ce09d465fd1\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3380b83c11e029b7291c83c44e7b1ce09d465fd1",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"363caa907186de786cb5292cd1ab7245da954815\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 363caa907186de786cb5292cd1ab7245da954815",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipes/fuchsia_roller.expected/roll_from_non_https_remote.json b/recipes/fuchsia_roller.expected/roll_from_non_https_remote.json
index 8823903..6640eb6 100644
--- a/recipes/fuchsia_roller.expected/roll_from_non_https_remote.json
+++ b/recipes/fuchsia_roller.expected/roll_from_non_https_remote.json
@@ -193,7 +193,6 @@
"-json-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "ensure gitiles.ensure_installed",
"~followup_annotations": [
@@ -220,7 +219,6 @@
"https://host.googlesource.com/foo",
"[OLD_REVISION]..fc4dc762688d2263b254208f444f5c0a4b91bc07"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "log",
"~followup_annotations": [
@@ -357,7 +355,7 @@
"git",
"commit",
"-m",
- "[roll] Roll third_party/foo [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nChange-Id: Iabc123\n",
+ "[roll] Roll third_party/foo [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://host.googlesource.com/foo\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
"-a"
],
"cwd": "[START_DIR]/garnet",
@@ -460,67 +458,6 @@
]
},
{
- "cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3e30158f2a7caccb7a9f6632a60011e7a44e1e5c\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3e30158f2a7caccb7a9f6632a60011e7a44e1e5c",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3380b83c11e029b7291c83c44e7b1ce09d465fd1\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3380b83c11e029b7291c83c44e7b1ce09d465fd1",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"363caa907186de786cb5292cd1ab7245da954815\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 363caa907186de786cb5292cd1ab7245da954815",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipes/fuchsia_roller.expected/zircon.json b/recipes/fuchsia_roller.expected/zircon.json
index 3fb5b3c..82ad723 100644
--- a/recipes/fuchsia_roller.expected/zircon.json
+++ b/recipes/fuchsia_roller.expected/zircon.json
@@ -193,7 +193,6 @@
"-json-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "ensure gitiles.ensure_installed",
"~followup_annotations": [
@@ -220,7 +219,6 @@
"https://fuchsia.googlesource.com/zircon",
"[OLD_REVISION]..fc4dc762688d2263b254208f444f5c0a4b91bc07"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "log",
"~followup_annotations": [
@@ -357,7 +355,7 @@
"git",
"commit",
"-m",
- "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nChange-Id: Iabc123\n",
+ "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
"-a"
],
"cwd": "[START_DIR]/garnet",
@@ -460,67 +458,6 @@
]
},
{
- "cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3e30158f2a7caccb7a9f6632a60011e7a44e1e5c\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3e30158f2a7caccb7a9f6632a60011e7a44e1e5c",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3380b83c11e029b7291c83c44e7b1ce09d465fd1\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3380b83c11e029b7291c83c44e7b1ce09d465fd1",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://fuchsia-review.googlesource.com",
- "-input",
- "{\"change_id\": \"363caa907186de786cb5292cd1ab7245da954815\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 363caa907186de786cb5292cd1ab7245da954815",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipes/fuchsia_roller.expected/zircon_dry_run.json b/recipes/fuchsia_roller.expected/zircon_dry_run.json
index cd0b3ad..74a685c 100644
--- a/recipes/fuchsia_roller.expected/zircon_dry_run.json
+++ b/recipes/fuchsia_roller.expected/zircon_dry_run.json
@@ -193,7 +193,6 @@
"-json-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "ensure gitiles.ensure_installed",
"~followup_annotations": [
@@ -220,7 +219,6 @@
"https://fuchsia.googlesource.com/zircon",
"[OLD_REVISION]..fc4dc762688d2263b254208f444f5c0a4b91bc07"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "log",
"~followup_annotations": [
@@ -357,7 +355,7 @@
"git",
"commit",
"-m",
- "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nChange-Id: Iabc123\n",
+ "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
"-a"
],
"cwd": "[START_DIR]/garnet",
diff --git a/recipes/fuchsia_roller.expected/zircon_no_changeid.json b/recipes/fuchsia_roller.expected/zircon_no_changeid.json
index 43c096e..4ba4983 100644
--- a/recipes/fuchsia_roller.expected/zircon_no_changeid.json
+++ b/recipes/fuchsia_roller.expected/zircon_no_changeid.json
@@ -193,7 +193,6 @@
"-json-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "ensure gitiles.ensure_installed",
"~followup_annotations": [
@@ -220,7 +219,6 @@
"https://fuchsia.googlesource.com/zircon",
"[OLD_REVISION]..fc4dc762688d2263b254208f444f5c0a4b91bc07"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "log",
"~followup_annotations": [
@@ -357,7 +355,7 @@
"git",
"commit",
"-m",
- "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nChange-Id: Iabc123\n",
+ "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
"-a"
],
"cwd": "[START_DIR]/garnet",
diff --git a/recipes/fuchsia_roller.expected/zircon_no_comment.json b/recipes/fuchsia_roller.expected/zircon_no_comment.json
index 4369434..52ea69d 100644
--- a/recipes/fuchsia_roller.expected/zircon_no_comment.json
+++ b/recipes/fuchsia_roller.expected/zircon_no_comment.json
@@ -193,7 +193,6 @@
"-json-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "ensure gitiles.ensure_installed",
"~followup_annotations": [
@@ -220,7 +219,6 @@
"https://fuchsia.googlesource.com/zircon",
"[OLD_REVISION]..fc4dc762688d2263b254208f444f5c0a4b91bc07"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "log",
"~followup_annotations": [
diff --git a/recipes/fuchsia_roller.expected/zircon_with_commit_links.json b/recipes/fuchsia_roller.expected/zircon_with_commit_links.json
index 79b34b3..76ceeb3 100644
--- a/recipes/fuchsia_roller.expected/zircon_with_commit_links.json
+++ b/recipes/fuchsia_roller.expected/zircon_with_commit_links.json
@@ -194,7 +194,6 @@
"-json-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "ensure gitiles.ensure_installed",
"~followup_annotations": [
@@ -221,7 +220,6 @@
"https://fuchsia.googlesource.com/zircon",
"[OLD_REVISION]..fc4dc762688d2263b254208f444f5c0a4b91bc07"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "log",
"~followup_annotations": [
@@ -336,7 +334,6 @@
"-json-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "get gerrit change numbers.ensure gerrit.ensure_installed",
"~followup_annotations": [
@@ -365,7 +362,6 @@
"-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "get gerrit change numbers.change details for 3e30158",
"~followup_annotations": [
@@ -387,7 +383,6 @@
"-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "get gerrit change numbers.change details for 3380b83",
"~followup_annotations": [
@@ -409,7 +404,6 @@
"-output",
"/path/to/tmp/json"
],
- "cwd": "[START_DIR]/garnet",
"infra_step": true,
"name": "get gerrit change numbers.change details for 363caa9",
"~followup_annotations": [
@@ -460,7 +454,7 @@
"git",
"commit",
"-m",
- "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 0\n3380b83:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 1\n363caa9:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nChange-Id: Iabc123\n",
+ "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 0\n3380b83:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 1\n363caa9:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
"-a"
],
"cwd": "[START_DIR]/garnet",
@@ -531,67 +525,6 @@
]
},
{
- "cmd": [],
- "name": "comment successful roll"
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3e30158f2a7caccb7a9f6632a60011e7a44e1e5c\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3e30158f2a7caccb7a9f6632a60011e7a44e1e5c",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3380b83c11e029b7291c83c44e7b1ce09d465fd1\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 3380b83c11e029b7291c83c44e7b1ce09d465fd1",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd/gerrit/gerrit",
- "set-review",
- "-host",
- "https://origin-host-review.googlesource.com",
- "-input",
- "{\"change_id\": \"363caa907186de786cb5292cd1ab7245da954815\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "comment successful roll.update 363caa907186de786cb5292cd1ab7245da954815",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
- ]
- },
- {
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipes/fuchsia_roller.py b/recipes/fuchsia_roller.py
index 91bb8e1..0633985 100644
--- a/recipes/fuchsia_roller.py
+++ b/recipes/fuchsia_roller.py
@@ -82,10 +82,6 @@
'(example: "username@google.com").')),
}
-# TODO(fxb/43899): Restore Rolled-Repo and Rolled-Commits footers in the same
-# CL as dry run mode for the roll_comment recipe is disabled:
-# Rolled-Repo: {repo}
-# Rolled-Commits: {old}..{new}
COMMIT_MESSAGE = """[roll] Roll {project} {old}..{new} ({count} commits)
{commits}
@@ -94,6 +90,12 @@
Cq-Cl-Tag: roller-bid:{build_id}
CQ-Do-Not-Cancel-Tryjobs: true"""
+# These footers must be set for the roll_comment recipe to be able to comment
+# on the rolled CLs.
+COMMENT_FOOTERS = """
+Rolled-Repo: {repo}
+Rolled-Commits: {old}..{new}"""
+
def sso_to_https(remote):
"""Transform a url of SSO scheme to its associated https version """
@@ -180,74 +182,66 @@
api.jiri.update(run_hooks=False, local_manifest=True)
api.jiri.emit_source_manifest()
- # Get the commit history and generate a commit message.
- log = api.gitiles.log(
- roll_from_repo, '%s..%s' % (old_rev, new_rev), step_name='log')
- origin_host = origin_manifest_element.get('gerrithost')
- current_host = api.gerrit.host
- if origin_host:
- # change gerrit host to get change details from correct host
- api.gerrit.host = origin_host
+ # Get the commit history and generate a commit message.
+ log = api.gitiles.log(
+ roll_from_repo, '%s..%s' % (old_rev, new_rev), step_name='log')
+ origin_host = origin_manifest_element.get('gerrithost')
+ current_host = api.gerrit.host
+ if origin_host:
+ # change gerrit host to get change details from correct host
+ api.gerrit.host = origin_host
- commit_lines = []
+ commit_lines = []
- with api.step.nest('get gerrit change numbers'):
- for commit in log:
- commit_label = commit['id'][:7]
+ with api.step.nest('get gerrit change numbers'):
+ for commit in log:
+ commit_label = commit['id'][:7]
- if origin_host:
- change = api.gerrit.change_details(
- 'change details for %s' % commit_label,
- commit['id'],
- test_data=api.json.test_api.output({'_number': 12345}),
- ok_ret='any')
- if change:
- # url.path contains a leading '/'.
- project_repo = urlparse(roll_from_repo).path
- commit_label = '{label}:{gerrit_host}/c{project_repo}/+/{change_number}'.format(
- label=commit_label,
- gerrit_host=origin_host.rstrip('/'),
- project_repo=project_repo,
- change_number=str(change['_number']))
- commit_lines.append('{commit} {subject}'.format(
- commit=commit_label,
- subject=commit['message'].splitlines()[0],
- ))
+ if origin_host:
+ change = api.gerrit.change_details(
+ 'change details for %s' % commit_label,
+ commit['id'],
+ test_data=api.json.test_api.output({'_number': 12345}),
+ ok_ret='any')
+ if change:
+ # url.path contains a leading '/'.
+ project_repo = urlparse(roll_from_repo).path
+ commit_label = '{label}:{gerrit_host}/c{project_repo}/+/{change_number}'.format(
+ label=commit_label,
+ gerrit_host=origin_host.rstrip('/'),
+ project_repo=project_repo,
+ change_number=str(change['_number']))
+ commit_lines.append('{commit} {subject}'.format(
+ commit=commit_label,
+ subject=commit['message'].splitlines()[0],
+ ))
- # reset host
- api.gerrit.host = current_host
+ # reset host
+ api.gerrit.host = current_host
- message = COMMIT_MESSAGE.format(
- project=import_from,
+ message = COMMIT_MESSAGE.format(
+ project=import_from,
+ old=old_rev[:7],
+ new=new_rev[:7],
+ count=len(log),
+ commits='\n'.join(commit_lines),
+ builder=api.buildbucket.builder_name,
+ build_id=api.buildbucket_util.id,
+ )
+ if send_comment:
+ message += COMMENT_FOOTERS.format(
old=old_rev[:7],
new=new_rev[:7],
- count=len(log),
- commits='\n'.join(commit_lines),
- builder=api.buildbucket.builder_name,
- build_id=api.buildbucket_util.id,
+ repo=roll_from_repo,
)
- # Check for Change-Id in the commit message. If no Change-Id is in the
- # message ignore and continue; attempt_roll() will just skip commenting
- # on those revisions. Still passing revision hash into attempt_roll()
- # because Change-Ids are sometimes copied when cherry-picking and are
- # less reliable than a revision hash at uniquely identifying a CL.
- commit_ids = []
- for commit in log:
- match = re.search(r'^Change-Id:\s*(\w+)\s*$', commit['message'],
- re.MULTILINE)
- if match:
- commit_ids.append(commit['id'])
-
# Land the changes.
api.auto_roller.attempt_roll(
gerrit_project=project,
repo_dir=project_dir,
commit_message=message,
dry_run=dry_run,
- origin_host=origin_host,
- commit_ids=commit_ids,
- send_comment=send_comment)
+ )
# yapf: disable
diff --git a/recipes/roll_comment.expected/basic.json b/recipes/roll_comment.expected/basic.json
index de74704..cb38d9a 100644
--- a/recipes/roll_comment.expected/basic.json
+++ b/recipes/roll_comment.expected/basic.json
@@ -267,44 +267,151 @@
},
{
"cmd": [],
- "name": "comment successful roll.would comment on 1cdae70e35c82b8964d4f6b4390c2228f4d8eef6",
+ "name": "comment successful roll.ensure gerrit",
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@"
]
},
{
- "cmd": [],
- "name": "comment successful roll.would comment on 98bd73cda7f11163b29928fa01f4126fdb9dced2",
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[START_DIR]/cipd/gerrit",
+ "-ensure-file",
+ "infra/tools/luci/gerrit/${platform} latest",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "comment successful roll.ensure gerrit.ensure_installed",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_NEST_LEVEL@2@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/gerrit/resolved-platform\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ ]@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
]
},
{
- "cmd": [],
- "name": "comment successful roll.would comment on 181ceb4aa58459721811061ab7f245bbf1353d18",
+ "cmd": [
+ "[START_DIR]/cipd/gerrit/gerrit",
+ "set-review",
+ "-host",
+ "https://foo-review.googlesource.com",
+ "-input",
+ "{\"change_id\": \"1cdae70e35c82b8964d4f6b4390c2228f4d8eef6\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
+ "-output",
+ "/path/to/tmp/json"
+ ],
+ "name": "comment successful roll.comment on 1cdae70e35c82b8964d4f6b4390c2228f4d8eef6",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{}@@@",
+ "@@@STEP_LOG_END@json.output@@@",
+ "@@@STEP_LINK@gerrit link@https://foo-review.googlesource.com/q/1cdae70e35c82b8964d4f6b4390c2228f4d8eef6@@@"
]
},
{
- "cmd": [],
- "name": "comment successful roll.would comment on 0d9934e975eb29fe8202219215677ee627486cf1",
+ "cmd": [
+ "[START_DIR]/cipd/gerrit/gerrit",
+ "set-review",
+ "-host",
+ "https://foo-review.googlesource.com",
+ "-input",
+ "{\"change_id\": \"98bd73cda7f11163b29928fa01f4126fdb9dced2\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
+ "-output",
+ "/path/to/tmp/json"
+ ],
+ "name": "comment successful roll.comment on 98bd73cda7f11163b29928fa01f4126fdb9dced2",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{}@@@",
+ "@@@STEP_LOG_END@json.output@@@",
+ "@@@STEP_LINK@gerrit link@https://foo-review.googlesource.com/q/98bd73cda7f11163b29928fa01f4126fdb9dced2@@@"
]
},
{
- "cmd": [],
- "name": "comment successful roll.would comment on cee94c86beac7ce99beed23ed92a17a8db4099a7",
+ "cmd": [
+ "[START_DIR]/cipd/gerrit/gerrit",
+ "set-review",
+ "-host",
+ "https://foo-review.googlesource.com",
+ "-input",
+ "{\"change_id\": \"181ceb4aa58459721811061ab7f245bbf1353d18\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
+ "-output",
+ "/path/to/tmp/json"
+ ],
+ "name": "comment successful roll.comment on 181ceb4aa58459721811061ab7f245bbf1353d18",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{}@@@",
+ "@@@STEP_LOG_END@json.output@@@",
+ "@@@STEP_LINK@gerrit link@https://foo-review.googlesource.com/q/181ceb4aa58459721811061ab7f245bbf1353d18@@@"
]
},
{
- "cmd": [],
- "name": "comment successful roll.would comment on bcec1416eac3cceb53ceb6cbd1a7cdcf526ebe3b",
+ "cmd": [
+ "[START_DIR]/cipd/gerrit/gerrit",
+ "set-review",
+ "-host",
+ "https://foo-review.googlesource.com",
+ "-input",
+ "{\"change_id\": \"0d9934e975eb29fe8202219215677ee627486cf1\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
+ "-output",
+ "/path/to/tmp/json"
+ ],
+ "name": "comment successful roll.comment on 0d9934e975eb29fe8202219215677ee627486cf1",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{}@@@",
+ "@@@STEP_LOG_END@json.output@@@",
+ "@@@STEP_LINK@gerrit link@https://foo-review.googlesource.com/q/0d9934e975eb29fe8202219215677ee627486cf1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[START_DIR]/cipd/gerrit/gerrit",
+ "set-review",
+ "-host",
+ "https://foo-review.googlesource.com",
+ "-input",
+ "{\"change_id\": \"cee94c86beac7ce99beed23ed92a17a8db4099a7\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
+ "-output",
+ "/path/to/tmp/json"
+ ],
+ "name": "comment successful roll.comment on cee94c86beac7ce99beed23ed92a17a8db4099a7",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{}@@@",
+ "@@@STEP_LOG_END@json.output@@@",
+ "@@@STEP_LINK@gerrit link@https://foo-review.googlesource.com/q/cee94c86beac7ce99beed23ed92a17a8db4099a7@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[START_DIR]/cipd/gerrit/gerrit",
+ "set-review",
+ "-host",
+ "https://foo-review.googlesource.com",
+ "-input",
+ "{\"change_id\": \"bcec1416eac3cceb53ceb6cbd1a7cdcf526ebe3b\", \"input\": {\"message\": \"Change has been successfully rolled.\"}, \"revision_id\": \"current\"}",
+ "-output",
+ "/path/to/tmp/json"
+ ],
+ "name": "comment successful roll.comment on bcec1416eac3cceb53ceb6cbd1a7cdcf526ebe3b",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_LOG_LINE@json.output@{}@@@",
+ "@@@STEP_LOG_END@json.output@@@",
+ "@@@STEP_LINK@gerrit link@https://foo-review.googlesource.com/q/bcec1416eac3cceb53ceb6cbd1a7cdcf526ebe3b@@@"
]
},
{
diff --git a/recipes/roll_comment.expected/failed_comment.json b/recipes/roll_comment.expected/failed_comment.json
index d8614db..cc6d13d 100644
--- a/recipes/roll_comment.expected/failed_comment.json
+++ b/recipes/roll_comment.expected/failed_comment.json
@@ -159,6 +159,7 @@
"@@@STEP_NEST_LEVEL@1@@@",
"@@@STEP_LOG_LINE@json.output@{}@@@",
"@@@STEP_LOG_END@json.output@@@",
+ "@@@STEP_LINK@gerrit link@https://foo-review.googlesource.com/q/100000a@@@",
"@@@STEP_FAILURE@@@"
]
},
@@ -177,7 +178,8 @@
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@",
"@@@STEP_LOG_LINE@json.output@{}@@@",
- "@@@STEP_LOG_END@json.output@@@"
+ "@@@STEP_LOG_END@json.output@@@",
+ "@@@STEP_LINK@gerrit link@https://foo-review.googlesource.com/q/100000b@@@"
]
},
{
diff --git a/recipes/roll_comment.expected/no_footers.json b/recipes/roll_comment.expected/no_footers.json
index d6bb670..4018c3f 100644
--- a/recipes/roll_comment.expected/no_footers.json
+++ b/recipes/roll_comment.expected/no_footers.json
@@ -79,7 +79,7 @@
},
{
"cmd": [],
- "name": "no Rolled-Repo footer in commit message"
+ "name": "no \"Rolled-Repo\" footer in commit message"
},
{
"name": "$result"
diff --git a/recipes/roll_comment.py b/recipes/roll_comment.py
index 01b5f38..288a919 100644
--- a/recipes/roll_comment.py
+++ b/recipes/roll_comment.py
@@ -6,7 +6,6 @@
from urlparse import urlparse
from recipe_engine import post_process
-from recipe_engine.recipe_api import Property
DEPS = [
'fuchsia/gerrit',
@@ -21,21 +20,12 @@
# The value of this footer should be an https git repo URL.
ROLLED_REPO_FOOTER = 'Rolled-Repo'
-# This footer should have values of the form "<start_commit>..<end_commit>".
-# For example, "9c21da0..5051fd4".
+# This footer should have values of the form "<start_commit>..<end_commit>"
+# (where <start_commit> is the old pinned revision, rather than the first
+# rolled commit). For example, "9c21da0..5051fd4" includes all the commits
+# after 9c21da0, up to and including 5051fd4.
ROLLED_COMMITS_FOOTER = 'Rolled-Commits'
-PROPERTIES = {
- # TODO(olivernewman): Delete this property after the fuchsia_roller recipe
- # no longer comments on CLs, and have this recipe always comment on CLs.
- 'dry_run':
- Property(
- kind=bool,
- default=True,
- help='If true, just log the CLs that would be commented on',
- )
-}
-
def read_footer(commit_msg, footer_name):
footer_line_prefix = '%s: ' % footer_name
@@ -52,7 +42,7 @@
return 'https://%s' % gerrit_hostname
-def RunSteps(api, dry_run):
+def RunSteps(api):
commit = api.buildbucket.build.input.gitiles_commit
assert commit.host and commit.project and commit.id, (
'recipe must be triggered by a gitiles commit')
@@ -64,11 +54,11 @@
source_repo = read_footer(commit_msg, ROLLED_REPO_FOOTER)
if not source_repo:
- api.step('no %s footer in commit message' % ROLLED_REPO_FOOTER, None)
+ api.step('no "%s" footer in commit message' % ROLLED_REPO_FOOTER, None)
return
commit_range = read_footer(commit_msg, ROLLED_COMMITS_FOOTER)
- assert commit_range, 'found %s footer but no %s footer' % (
+ assert commit_range, 'found "%s" footer but no "%s" footer' % (
ROLLED_REPO_FOOTER, ROLLED_COMMITS_FOOTER)
source_log = api.gitiles.log(
@@ -88,9 +78,6 @@
continue
revision = commit['id']
- if dry_run:
- api.step('would comment on %s' % revision, None)
- continue
try:
api.gerrit.set_review(
'comment on %s' % revision,
@@ -103,6 +90,9 @@
# commenting on the rest of the changes.
pass
+ cl_link = '%s/q/%s' % (api.gerrit.host, revision)
+ api.step.active_result.presentation.links['gerrit link'] = cl_link
+
def GenTests(api):
# yapf: disable
@@ -145,7 +135,6 @@
yield (
api.status_check.test('failed_comment')
+ api.buildbucket.ci_build()
- + api.properties(dry_run=False)
+ api.gitiles.log(
'get commit message',
'A',