submodule_roller: Remove new_revision property
Remove the never-used new_revision property.
Removed a test that used this behavior and had to change a couple
properties of other tests to ensure coverage.
Change-Id: Ie4e64818c63dbaab9a557363bf7f4da64132d9b0
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/77501
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
diff --git a/recipes/submodule_roller.expected/relative-dotdot-dotdot.json b/recipes/submodule_roller.expected/relative-dotdot-dotdot-always-cc-reviewers.json
similarity index 94%
rename from recipes/submodule_roller.expected/relative-dotdot-dotdot.json
rename to recipes/submodule_roller.expected/relative-dotdot-dotdot-always-cc-reviewers.json
index 5ebef5f..a639111 100644
--- a/recipes/submodule_roller.expected/relative-dotdot-dotdot.json
+++ b/recipes/submodule_roller.expected/relative-dotdot-dotdot-always-cc-reviewers.json
@@ -1462,9 +1462,9 @@
},
{
"cmd": [],
- "name": "cc author@example.com",
+ "name": "cc nobody@google.com",
"~followup_annotations": [
- "@@@STEP_SUMMARY_TEXT@CCing@@@"
+ "@@@STEP_SUMMARY_TEXT@not CCing, no account in Gerrit@@@"
]
},
{
@@ -1474,7 +1474,7 @@
"-host",
"https://pigweed-review.googlesource.com",
"-input",
- "{\"params\": {\"q\": \"email:author@example.com\"}}",
+ "{\"params\": {\"q\": \"email:nobody@google.com\"}}",
"-output",
"/path/to/tmp/json"
],
@@ -1490,19 +1490,15 @@
"hostname": "rdbhost"
}
},
- "name": "cc author@example.com.author@example.com",
+ "name": "cc nobody@google.com.nobody@google.com",
"timeout": 600,
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@[@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"_account_id\": 123@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@]@@@",
+ "@@@STEP_LOG_LINE@json.output@[]@@@",
"@@@STEP_LOG_END@json.output@@@",
"@@@STEP_LOG_LINE@json.input@{@@@",
"@@@STEP_LOG_LINE@json.input@ \"params\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"q\": \"email:author@example.com\"@@@",
+ "@@@STEP_LOG_LINE@json.input@ \"q\": \"email:nobody@google.com\"@@@",
"@@@STEP_LOG_LINE@json.input@ }@@@",
"@@@STEP_LOG_LINE@json.input@}@@@",
"@@@STEP_LOG_END@json.input@@@"
@@ -1510,7 +1506,7 @@
},
{
"cmd": [],
- "name": "cc owner@example.com",
+ "name": "cc reviewer@example.com",
"~followup_annotations": [
"@@@STEP_SUMMARY_TEXT@CCing@@@"
]
@@ -1522,7 +1518,7 @@
"-host",
"https://pigweed-review.googlesource.com",
"-input",
- "{\"params\": {\"q\": \"email:owner@example.com\"}}",
+ "{\"params\": {\"q\": \"email:reviewer@example.com\"}}",
"-output",
"/path/to/tmp/json"
],
@@ -1538,7 +1534,7 @@
"hostname": "rdbhost"
}
},
- "name": "cc owner@example.com.owner@example.com",
+ "name": "cc reviewer@example.com.reviewer@example.com",
"timeout": 600,
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@",
@@ -1550,7 +1546,7 @@
"@@@STEP_LOG_END@json.output@@@",
"@@@STEP_LOG_LINE@json.input@{@@@",
"@@@STEP_LOG_LINE@json.input@ \"params\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"q\": \"email:owner@example.com\"@@@",
+ "@@@STEP_LOG_LINE@json.input@ \"q\": \"email:reviewer@example.com\"@@@",
"@@@STEP_LOG_LINE@json.input@ }@@@",
"@@@STEP_LOG_LINE@json.input@}@@@",
"@@@STEP_LOG_END@json.input@@@"
@@ -1558,6 +1554,13 @@
},
{
"cmd": [],
+ "name": "cc robot@gserviceaccount.com",
+ "~followup_annotations": [
+ "@@@STEP_SUMMARY_TEXT@not CCing, robot account@@@"
+ ]
+ },
+ {
+ "cmd": [],
"name": "roll message"
},
{
@@ -1803,7 +1806,7 @@
"--push-option",
"nokeycheck",
"origin",
- "HEAD:refs/for/main%l=Commit-Queue+1"
+ "HEAD:refs/for/main%l=Commit-Queue+1,cc=reviewer@example.com"
],
"cwd": "[START_DIR]/checkout",
"infra_step": true,
@@ -1895,55 +1898,6 @@
{
"cmd": [
"[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "set-review",
- "-host",
- "https://pigweed-review.googlesource.com",
- "-input",
- "{\"change_id\": \"pigweed/pigweed~main~I27ec3e6a65adbbeb0f5d0b74ef7036a069efcfe8\", \"input\": {\"reviewers\": [{\"reviewer\": \"author@example.com\", \"state\": \"CC\"}, {\"reviewer\": \"owner@example.com\", \"state\": \"CC\"}]}, \"revision_id\": \"current\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "luci_context": {
- "realm": {
- "name": "project:ci"
- },
- "resultdb": {
- "current_invocation": {
- "name": "invocations/build:8945511751514863184",
- "update_token": "token"
- },
- "hostname": "rdbhost"
- }
- },
- "name": "cc",
- "timeout": 600,
- "~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)@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"change_id\": \"pigweed/pigweed~main~I27ec3e6a65adbbeb0f5d0b74ef7036a069efcfe8\", @@@",
- "@@@STEP_LOG_LINE@json.input@ \"input\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"reviewers\": [@@@",
- "@@@STEP_LOG_LINE@json.input@ {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"reviewer\": \"author@example.com\", @@@",
- "@@@STEP_LOG_LINE@json.input@ \"state\": \"CC\"@@@",
- "@@@STEP_LOG_LINE@json.input@ }, @@@",
- "@@@STEP_LOG_LINE@json.input@ {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"reviewer\": \"owner@example.com\", @@@",
- "@@@STEP_LOG_LINE@json.input@ \"state\": \"CC\"@@@",
- "@@@STEP_LOG_LINE@json.input@ }@@@",
- "@@@STEP_LOG_LINE@json.input@ ]@@@",
- "@@@STEP_LOG_LINE@json.input@ }, @@@",
- "@@@STEP_LOG_LINE@json.input@ \"revision_id\": \"current\"@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@",
- "@@@STEP_LINK@gerrit link@https://pigweed-review.googlesource.com/q/pigweed/pigweed~main~I27ec3e6a65adbbeb0f5d0b74ef7036a069efcfe8@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
"change-abandon",
"-host",
"https://pigweed-review.googlesource.com",
diff --git a/recipes/submodule_roller.expected/with-newrev-prop-cc-reviewers.json b/recipes/submodule_roller.expected/with-newrev-prop-cc-reviewers.json
deleted file mode 100644
index 2243af6..0000000
--- a/recipes/submodule_roller.expected/with-newrev-prop-cc-reviewers.json
+++ /dev/null
@@ -1,1254 +0,0 @@
-[
- {
- "cmd": [],
- "name": "checkout pigweed"
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[START_DIR]/checkout"
- ],
- "infra_step": true,
- "name": "checkout pigweed.makedirs",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "init"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.git init",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "remote",
- "add",
- "origin",
- "https://pigweed.googlesource.com/pigweed/pigweed"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.git remote",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "config",
- "fetch.uriprotocols",
- "https"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.set fetch.uriprotocols",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [],
- "name": "checkout pigweed.cache",
- "~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/.GUARD_FILE"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.cache.write guard file",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[CACHE]/git/pigweed.googlesource.com-pigweed-pigweed"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.cache.makedirs",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "init",
- "--bare"
- ],
- "cwd": "[CACHE]/git/pigweed.googlesource.com-pigweed-pigweed",
- "infra_step": true,
- "name": "checkout pigweed.cache.git init",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "config",
- "remote.origin.url",
- "https://pigweed.googlesource.com/pigweed/pigweed"
- ],
- "cwd": "[CACHE]/git/pigweed.googlesource.com-pigweed-pigweed",
- "infra_step": true,
- "name": "checkout pigweed.cache.remote set-url",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "config",
- "fetch.uriprotocols",
- "https"
- ],
- "cwd": "[CACHE]/git/pigweed.googlesource.com-pigweed-pigweed",
- "infra_step": true,
- "name": "checkout pigweed.cache.set fetch.uriprotocols",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "config",
- "--replace-all",
- "remote.origin.fetch",
- "+refs/heads/*:refs/heads/*",
- "\\+refs/heads/\\*:.*"
- ],
- "cwd": "[CACHE]/git/pigweed.googlesource.com-pigweed-pigweed",
- "infra_step": true,
- "name": "checkout pigweed.cache.replace fetch configs",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "fetch",
- "--prune",
- "--tags",
- "origin"
- ],
- "cwd": "[CACHE]/git/pigweed.googlesource.com-pigweed-pigweed",
- "infra_step": true,
- "name": "checkout pigweed.cache.git fetch",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[START_DIR]/checkout/.git/objects/info"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.cache.makedirs object/info",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "copy",
- "[CACHE]/git/pigweed.googlesource.com-pigweed-pigweed/objects\n",
- "[START_DIR]/checkout/.git/objects/info/alternates"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.cache.alternates",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@alternates@[CACHE]/git/pigweed.googlesource.com-pigweed-pigweed/objects@@@",
- "@@@STEP_LOG_END@alternates@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "remove",
- "[CACHE]/git/.GUARD_FILE"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.cache.remove guard file",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "fetch",
- "--tags",
- "origin",
- "main",
- "--recurse-submodules"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.git fetch",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "checkout",
- "-f",
- "FETCH_HEAD"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.git checkout",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "rev-parse",
- "HEAD"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.git rev-parse",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "clean",
- "-f",
- "-d",
- "-x"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.git clean",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [],
- "name": "checkout pigweed.submodule",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "submodule",
- "sync"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.submodule.git submodule sync",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "submodule",
- "update",
- "--init",
- "--recursive",
- "--jobs",
- "4"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "checkout pigweed.submodule.git submodule update",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [],
- "name": "checkout pigweed.git log",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "log",
- "--oneline",
- "-n",
- "10"
- ],
- "cwd": "[START_DIR]/checkout",
- "name": "checkout pigweed.git log.[START_DIR]/checkout",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[START_DIR]/snapshot"
- ],
- "infra_step": true,
- "name": "checkout pigweed.mkdir",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "submodule",
- "status",
- "--recursive"
- ],
- "cwd": "[START_DIR]/checkout",
- "name": "checkout pigweed.submodule-status",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "copy",
- "submodule status filler text",
- "[START_DIR]/snapshot/submodules.log"
- ],
- "infra_step": true,
- "name": "checkout pigweed.write submodule snapshot",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@submodules.log@submodule status filler text@@@",
- "@@@STEP_LOG_END@submodules.log@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "log",
- "--oneline",
- "-n",
- "10"
- ],
- "cwd": "[START_DIR]/checkout",
- "name": "checkout pigweed.log",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "copy",
- "",
- "[START_DIR]/snapshot/git.log"
- ],
- "infra_step": true,
- "name": "checkout pigweed.write git log",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_END@git.log@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "copy",
- "[START_DIR]/checkout/.gitmodules",
- "/path/to/tmp/"
- ],
- "infra_step": true,
- "name": "read .gitmodules",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@.gitmodules@[submodule \"a1\"]@@@",
- "@@@STEP_LOG_LINE@.gitmodules@\tpath = a1@@@",
- "@@@STEP_LOG_LINE@.gitmodules@\turl = https://foo.googlesource.com/a1@@@",
- "@@@STEP_LOG_END@.gitmodules@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "submodule",
- "status"
- ],
- "cwd": "[START_DIR]/checkout",
- "name": "git submodule status"
- },
- {
- "cmd": [
- "git",
- "log",
- "--max-count=1",
- "--pretty=format:%H"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "name": "get old revision"
- },
- {
- "cmd": [
- "git",
- "fetch",
- "origin",
- "cccccccccccccccccccccccccccccccccccccccc"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "name": "git fetch"
- },
- {
- "cmd": [
- "git",
- "checkout",
- "FETCH_HEAD"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "name": "git checkout"
- },
- {
- "cmd": [],
- "name": "get roll direction",
- "~followup_annotations": [
- "@@@STEP_SUMMARY_TEXT@forward@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "merge-base",
- "--is-ancestor",
- "1111111111111111111111111111111111111111",
- "cccccccccccccccccccccccccccccccccccccccc"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "name": "get roll direction.is forward",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "merge-base",
- "--is-ancestor",
- "cccccccccccccccccccccccccccccccccccccccc",
- "1111111111111111111111111111111111111111"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "name": "get roll direction.is backward",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [],
- "name": "remote"
- },
- {
- "cmd": [
- "git",
- "remote"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "name": "remote.name",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "remote",
- "get-url",
- "origin"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "name": "remote.url",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [],
- "name": "a1"
- },
- {
- "cmd": [
- "git",
- "log",
- "--pretty=format:%H\n%ae\n%B",
- "-z",
- "1111111111111111111111111111111111111111..cccccccccccccccccccccccccccccccccccccccc"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "name": "a1.git log",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [],
- "name": "a1.ensure gerrit",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "copy",
- "RECIPE_MODULE[fuchsia::gerrit]/resources/tool_manifest.json",
- "/path/to/tmp/json"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "infra_step": true,
- "name": "a1.ensure gerrit.read manifest",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@tool_manifest.json@{@@@",
- "@@@STEP_LOG_LINE@tool_manifest.json@ \"path\": \"path/to/gerrit\",@@@",
- "@@@STEP_LOG_LINE@tool_manifest.json@ \"version\": \"version:pinned-version\"@@@",
- "@@@STEP_LOG_LINE@tool_manifest.json@}@@@",
- "@@@STEP_LOG_END@tool_manifest.json@@@"
- ]
- },
- {
- "cmd": [],
- "name": "a1.ensure gerrit.install path/to/gerrit",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@"
- ]
- },
- {
- "cmd": [
- "vpython",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "infra_step": true,
- "name": "a1.ensure gerrit.install path/to/gerrit.ensure package directory",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@3@@@"
- ]
- },
- {
- "cmd": [
- "cipd",
- "ensure",
- "-root",
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version",
- "-ensure-file",
- "path/to/gerrit version:pinned-version",
- "-max-threads",
- "0",
- "-json-output",
- "/path/to/tmp/json"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "infra_step": true,
- "name": "a1.ensure gerrit.install path/to/gerrit.ensure_installed",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@3@@@",
- "@@@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-version:pinned-v\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"package\": \"path/to/gerrit\"@@@",
- "@@@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_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "change-query",
- "-host",
- "https://pigweed-review.googlesource.com",
- "-input",
- "{\"params\": {\"q\": \"commit:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}}",
- "-output",
- "/path/to/tmp/json"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "name": "a1.get change-id",
- "timeout": 600,
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@[@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"_number\": 12345@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@]@@@",
- "@@@STEP_LOG_END@json.output@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"params\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"q\": \"commit:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"@@@",
- "@@@STEP_LOG_LINE@json.input@ }@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "change-detail",
- "-host",
- "https://pigweed-review.googlesource.com",
- "-input",
- "{\"change_id\": \"12345\"}",
- "-output",
- "/path/to/tmp/json"
- ],
- "cwd": "[START_DIR]/checkout/a1",
- "name": "a1.get 12345",
- "timeout": 600,
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"owner\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"owner@example.com\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"reviewers\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"REVIEWER\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"reviewer@example.com\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"nobody@google.com\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"email\": \"robot@gserviceaccount.com\"@@@",
- "@@@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@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"change_id\": \"12345\"@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@",
- "@@@STEP_LINK@gerrit link@https://pigweed-review.googlesource.com/q/12345@@@"
- ]
- },
- {
- "cmd": [],
- "name": "resolve CL deps"
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "change-query",
- "-host",
- "https://foo-review.googlesource.com",
- "-input",
- "{\"params\": {\"q\": \"commit:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "resolve CL deps.number aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "timeout": 30,
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@[@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"_number\": 3880@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@]@@@",
- "@@@STEP_LOG_END@json.output@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"params\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"q\": \"commit:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"@@@",
- "@@@STEP_LOG_LINE@json.input@ }@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "change-detail",
- "-host",
- "https://foo-review.googlesource.com",
- "-input",
- "{\"change_id\": \"3880\", \"params\": {\"o\": [\"CURRENT_COMMIT\", \"CURRENT_REVISION\"]}}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "resolve CL deps.details foo:3880",
- "timeout": 30,
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"current_revision\": \"HASH\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"project\": \"project\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"revisions\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"HASH\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"_number\": 1, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"commit\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"message\": \"\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"parents\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"commit\": \"PARENT\"@@@",
- "@@@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@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"status\": \"NEW\"@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"change_id\": \"3880\", @@@",
- "@@@STEP_LOG_LINE@json.input@ \"params\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"o\": [@@@",
- "@@@STEP_LOG_LINE@json.input@ \"CURRENT_COMMIT\", @@@",
- "@@@STEP_LOG_LINE@json.input@ \"CURRENT_REVISION\"@@@",
- "@@@STEP_LOG_LINE@json.input@ ]@@@",
- "@@@STEP_LOG_LINE@json.input@ }@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@",
- "@@@STEP_LINK@gerrit link@https://foo-review.googlesource.com/q/3880@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "change-query",
- "-host",
- "https://foo-review.googlesource.com",
- "-input",
- "{\"params\": {\"q\": \"commit:PARENT\"}}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "resolve CL deps.number PARENT",
- "timeout": 30,
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@[@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"_number\": 458@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@]@@@",
- "@@@STEP_LOG_END@json.output@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"params\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"q\": \"commit:PARENT\"@@@",
- "@@@STEP_LOG_LINE@json.input@ }@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "change-detail",
- "-host",
- "https://foo-review.googlesource.com",
- "-input",
- "{\"change_id\": \"458\", \"params\": {\"o\": [\"CURRENT_COMMIT\", \"CURRENT_REVISION\"]}}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "resolve CL deps.details foo:458",
- "timeout": 30,
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"current_revision\": \"HASH\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"project\": \"project\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"revisions\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"HASH\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"_number\": 1, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"commit\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"message\": \"\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"parents\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"commit\": \"PARENT\"@@@",
- "@@@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@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"status\": \"SUBMITTED\"@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"change_id\": \"458\", @@@",
- "@@@STEP_LOG_LINE@json.input@ \"params\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"o\": [@@@",
- "@@@STEP_LOG_LINE@json.input@ \"CURRENT_COMMIT\", @@@",
- "@@@STEP_LOG_LINE@json.input@ \"CURRENT_REVISION\"@@@",
- "@@@STEP_LOG_LINE@json.input@ ]@@@",
- "@@@STEP_LOG_LINE@json.input@ }@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@",
- "@@@STEP_LINK@gerrit link@https://foo-review.googlesource.com/q/458@@@"
- ]
- },
- {
- "cmd": [],
- "name": "resolve CL deps.parents foo:3880",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_SUMMARY_TEXT@all parents already submitted@@@"
- ]
- },
- {
- "cmd": [],
- "name": "resolve CL deps.resolve deps for foo:3880",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_SUMMARY_TEXT@no dependencies@@@"
- ]
- },
- {
- "cmd": [],
- "name": "resolve CL deps.pass",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [],
- "name": "deps",
- "~followup_annotations": [
- "@@@STEP_SUMMARY_TEXT@{}@@@"
- ]
- },
- {
- "cmd": [],
- "name": "cc nobody@google.com",
- "~followup_annotations": [
- "@@@STEP_SUMMARY_TEXT@not CCing, no account in Gerrit@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "account-query",
- "-host",
- "https://pigweed-review.googlesource.com",
- "-input",
- "{\"params\": {\"q\": \"email:nobody@google.com\"}}",
- "-output",
- "/path/to/tmp/json"
- ],
- "name": "cc nobody@google.com.nobody@google.com",
- "timeout": 600,
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@[]@@@",
- "@@@STEP_LOG_END@json.output@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"params\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"q\": \"email:nobody@google.com\"@@@",
- "@@@STEP_LOG_LINE@json.input@ }@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@"
- ]
- },
- {
- "cmd": [],
- "name": "cc reviewer@example.com",
- "~followup_annotations": [
- "@@@STEP_SUMMARY_TEXT@CCing@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "account-query",
- "-host",
- "https://pigweed-review.googlesource.com",
- "-input",
- "{\"params\": {\"q\": \"email:reviewer@example.com\"}}",
- "-output",
- "/path/to/tmp/json"
- ],
- "name": "cc reviewer@example.com.reviewer@example.com",
- "timeout": 600,
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@[@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"_account_id\": 123@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@]@@@",
- "@@@STEP_LOG_END@json.output@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"params\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"q\": \"email:reviewer@example.com\"@@@",
- "@@@STEP_LOG_LINE@json.input@ }@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@"
- ]
- },
- {
- "cmd": [],
- "name": "cc robot@gserviceaccount.com",
- "~followup_annotations": [
- "@@@STEP_SUMMARY_TEXT@not CCing, robot account@@@"
- ]
- },
- {
- "cmd": [],
- "name": "roll message"
- },
- {
- "cmd": [],
- "name": "roll message.message for a1",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@template@[roll {project_name}] {sanitized_message}@@@",
- "@@@STEP_LOG_LINE@template@@@@",
- "@@@STEP_LOG_LINE@template@{remote}@@@",
- "@@@STEP_LOG_LINE@template@{project_name} Rolled-Commits: {old_revision:.15}..{new_revision:.15}@@@",
- "@@@STEP_LOG_END@template@@@",
- "@@@STEP_LOG_LINE@kwargs@'new_revision': 'cccccccccccccccccccccccccccccccccccccccc'@@@",
- "@@@STEP_LOG_LINE@kwargs@'old_revision': '1111111111111111111111111111111111111111'@@@",
- "@@@STEP_LOG_LINE@kwargs@'original_message': 'foo\\nbar\\n\\nChange-Id: I1111'@@@",
- "@@@STEP_LOG_LINE@kwargs@'project_name': 'a1'@@@",
- "@@@STEP_LOG_LINE@kwargs@'remote': 'https://pigweed.googlesource.com/pigweed/pigweed'@@@",
- "@@@STEP_LOG_LINE@kwargs@'sanitized_message': 'foo\\nbar\\n'@@@",
- "@@@STEP_LOG_END@kwargs@@@",
- "@@@STEP_LOG_LINE@message@[roll a1] foo@@@",
- "@@@STEP_LOG_LINE@message@bar@@@",
- "@@@STEP_LOG_LINE@message@@@@",
- "@@@STEP_LOG_LINE@message@@@@",
- "@@@STEP_LOG_LINE@message@https://pigweed.googlesource.com/pigweed/pigweed@@@",
- "@@@STEP_LOG_LINE@message@a1 Rolled-Commits: 111111111111111..ccccccccccccccc@@@",
- "@@@STEP_LOG_END@message@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "ls-files",
- "--modified",
- "--deleted",
- "--exclude-standard"
- ],
- "cwd": "[START_DIR]/checkout",
- "name": "check for no-op commit",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@stdout@hello@@@",
- "@@@STEP_LOG_END@stdout@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "add",
- "--update"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "git add"
- },
- {
- "cmd": [
- "git",
- "rev-parse",
- "HEAD"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "git rev-parse"
- },
- {
- "cmd": [],
- "name": "calculate Change-Id",
- "~followup_annotations": [
- "@@@STEP_TEXT@Idcafe3609bd1c8c808cc0005865453850afdf06e@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "diff",
- "--unified=0",
- "--cached"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "calculate Change-Id.git diff",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@diff --git a/foo.txt b/foo.txt@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@--- a/foo.txt@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@+++ b/foo.txt@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@@@ -16 +16 @@@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@- foo = 5@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@+ foo = 6@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@diff --git a/bar.txt b/bar.txt@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@--- a/bar.txt@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@+++ b/bar.txt@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@@@ -5 +5 @@@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@- bar = 0@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@+ bar = 1@@@",
- "@@@STEP_LOG_LINE@diff (without hashes)@@@@",
- "@@@STEP_LOG_END@diff (without hashes)@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "hash-object",
- "diff --git a/foo.txt b/foo.txt\n--- a/foo.txt\n+++ b/foo.txt\n@@ -16 +16 @@\n- foo = 5\n+ foo = 6\ndiff --git a/bar.txt b/bar.txt\n--- a/bar.txt\n+++ b/bar.txt\n@@ -5 +5 @@\n- bar = 0\n+ bar = 1\n########dry-run####"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "calculate Change-Id.git hash-object",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "change-query",
- "-host",
- "https://pigweed-review.googlesource.com",
- "-input",
- "{\"params\": {\"o\": [\"CURRENT_COMMIT\", \"CURRENT_REVISION\", \"MESSAGES\"], \"q\": \"change:pigweed/pigweed~main~Idcafe3609bd1c8c808cc0005865453850afdf06e\"}}",
- "-output",
- "/path/to/tmp/json"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "check for identical roll",
- "timeout": 600,
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@json.output@null@@@",
- "@@@STEP_LOG_END@json.output@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"params\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"o\": [@@@",
- "@@@STEP_LOG_LINE@json.input@ \"CURRENT_COMMIT\", @@@",
- "@@@STEP_LOG_LINE@json.input@ \"CURRENT_REVISION\", @@@",
- "@@@STEP_LOG_LINE@json.input@ \"MESSAGES\"@@@",
- "@@@STEP_LOG_LINE@json.input@ ], @@@",
- "@@@STEP_LOG_LINE@json.input@ \"q\": \"change:pigweed/pigweed~main~Idcafe3609bd1c8c808cc0005865453850afdf06e\"@@@",
- "@@@STEP_LOG_LINE@json.input@ }@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@"
- ]
- },
- {
- "cmd": [
- "git",
- "commit",
- "-m",
- "[roll a1] foo\nbar\n\n\nhttps://pigweed.googlesource.com/pigweed/pigweed\na1 Rolled-Commits: 111111111111111..ccccccccccccccc\nRoller-URL: https://ci.chromium.org/b/0\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nChange-Id: Idcafe3609bd1c8c808cc0005865453850afdf06e",
- "-a"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "git commit"
- },
- {
- "cmd": [
- "git",
- "push",
- "--push-option",
- "nokeycheck",
- "origin",
- "HEAD:refs/for/main%l=Commit-Queue+1,cc=reviewer@example.com"
- ],
- "cwd": "[START_DIR]/checkout",
- "infra_step": true,
- "name": "git push",
- "timeout": 180.0,
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@stdout@@@@",
- "@@@STEP_LOG_END@stdout@@@",
- "@@@STEP_LINK@gerrit link@https://pigweed-review.googlesource.com/q/pigweed/pigweed~main~Idcafe3609bd1c8c808cc0005865453850afdf06e@@@"
- ]
- },
- {
- "cmd": [],
- "name": "check for completion"
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "change-detail",
- "-host",
- "https://pigweed-review.googlesource.com",
- "-input",
- "{\"change_id\": \"pigweed/pigweed~main~Idcafe3609bd1c8c808cc0005865453850afdf06e\", \"params\": {\"o\": [\"CURRENT_REVISION\"]}}",
- "-output",
- "/path/to/tmp/json"
- ],
- "infra_step": true,
- "name": "check for completion.check if done (0)",
- "timeout": 600,
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"current_revision\": \"abc123\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"labels\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"Commit-Queue\": {}@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"messages\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"message\": \"Dry run: CQ is trying the patch\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tag\": \"autogenerated:cv\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"message\": \"Dry run: This CL passed the CQ dry run.\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"tag\": \"autogenerated:cv\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ], @@@",
- "@@@STEP_LOG_LINE@json.output@ \"status\": \"NEW\"@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"change_id\": \"pigweed/pigweed~main~Idcafe3609bd1c8c808cc0005865453850afdf06e\", @@@",
- "@@@STEP_LOG_LINE@json.input@ \"params\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"o\": [@@@",
- "@@@STEP_LOG_LINE@json.input@ \"CURRENT_REVISION\"@@@",
- "@@@STEP_LOG_LINE@json.input@ ]@@@",
- "@@@STEP_LOG_LINE@json.input@ }@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@",
- "@@@STEP_LINK@gerrit link@https://pigweed-review.googlesource.com/q/pigweed/pigweed~main~Idcafe3609bd1c8c808cc0005865453850afdf06e@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/path/to/gerrit/version%3Apinned-version/gerrit",
- "change-abandon",
- "-host",
- "https://pigweed-review.googlesource.com",
- "-input",
- "{\"change_id\": \"pigweed/pigweed~main~Idcafe3609bd1c8c808cc0005865453850afdf06e\", \"input\": {\"message\": \"Dry run passed.\"}}",
- "-output",
- "/path/to/tmp/json"
- ],
- "name": "abandon roll",
- "timeout": 600,
- "~followup_annotations": [
- "@@@STEP_TEXT@dry run passed@@@",
- "@@@STEP_LOG_END@json.output (invalid)@@@",
- "@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
- "@@@STEP_LOG_END@json.output (exception)@@@",
- "@@@STEP_LOG_LINE@json.input@{@@@",
- "@@@STEP_LOG_LINE@json.input@ \"change_id\": \"pigweed/pigweed~main~Idcafe3609bd1c8c808cc0005865453850afdf06e\", @@@",
- "@@@STEP_LOG_LINE@json.input@ \"input\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"message\": \"Dry run passed.\"@@@",
- "@@@STEP_LOG_LINE@json.input@ }@@@",
- "@@@STEP_LOG_LINE@json.input@}@@@",
- "@@@STEP_LOG_END@json.input@@@",
- "@@@STEP_LINK@gerrit link@https://pigweed-review.googlesource.com/q/pigweed/pigweed~main~Idcafe3609bd1c8c808cc0005865453850afdf06e@@@"
- ]
- },
- {
- "name": "$result"
- }
-]
\ No newline at end of file
diff --git a/recipes/submodule_roller.py b/recipes/submodule_roller.py
index fa74819..0e9c5c1 100644
--- a/recipes/submodule_roller.py
+++ b/recipes/submodule_roller.py
@@ -180,7 +180,6 @@
def RunSteps(api, props): # pylint: disable=invalid-name
submodule_path = props.submodule_path
submodule_name = props.submodule_name or submodule_path
- new_revision = props.new_revision or None
submodule_branch = props.submodule_branch or None
dry_run = props.dry_run
cc_authors_on_rolls = props.cc_authors_on_rolls
@@ -193,18 +192,15 @@
# needs to be disabled.
api.checkout(use_trigger=False)
- if new_revision:
- new_revision = new_revision.lower()
+ new_revision = None
- # If new_revision wasn't supplied in a property try to get it from the
- # trigger.
+ # Try to get new_revision from the trigger.
bb_remote = None
- if new_revision is None:
- commit = api.buildbucket.build.input.gitiles_commit
- if commit and commit.project:
- new_revision = commit.id
- host = commit.host
- bb_remote = 'https://{}/{}'.format(host, commit.project)
+ commit = api.buildbucket.build.input.gitiles_commit
+ if commit and commit.project:
+ new_revision = commit.id
+ host = commit.host
+ bb_remote = 'https://{}/{}'.format(host, commit.project)
# Confirm the given path is actually a submodule.
gitmodules = api.file.read_text(
@@ -236,9 +232,9 @@
except configparser.NoOptionError:
submodule_branch = 'main'
- # If we still don't have a revision then it wasn't in the properties nor in
- # the trigger. (Perhaps this was manually triggered.) In this case we update
- # to the property-specified or inferred submodule branch HEAD.
+ # If we still don't have a revision then there wasn't a trigger. (Perhaps
+ # this was manually triggered.) In this case we update to the
+ # property-specified or inferred submodule branch HEAD.
if new_revision is None:
new_revision = submodule_branch
@@ -254,7 +250,6 @@
# If this was triggered by a gitiles poller, check that the triggering
# repository matches submodule_path.
-
if bb_remote:
if not api.checkout.remotes_equivalent(remote, bb_remote):
raise api.step.StepFailure(
@@ -418,8 +413,12 @@
)
yield (
- api.status_check.test('relative-dotdot-dotdot', status='failure')
- + properties(submodule_path='a1', cc_authors_on_rolls=True)
+ api.status_check.test(
+ 'relative-dotdot-dotdot-always-cc-reviewers', status='failure',
+ )
+ + properties(
+ submodule_path='a1', cc_reviewers_on_rolls=True, always_cc=True,
+ )
+ trigger('https://pigweed.googlesource.com/a1')
+ commit_data('a1', prefix='')
+ gitmodules(a1='../../a1')
@@ -462,20 +461,6 @@
)
yield (
- api.status_check.test('with-newrev-prop-cc-reviewers')
- + properties(
- submodule_path='a1',
- new_revision='c' * 40,
- cc_reviewers_on_rolls=True,
- always_cc=True,
- )
- + commit_data('a1', prefix='')
- + gitmodules(a1='a1')
- + api.roll_util.forward_roll()
- + api.auto_roller.dry_run_success()
- )
-
- yield (
api.status_check.test('with-branch-prop-filter-emails')
+ properties(
submodule_path='a1',