roll_commenter: Assume existence of rollers
Bug: b/369718402
Change-Id: I7d8ae3b47f39d5ae8e7f3bc96097d1b0318ae0e9
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/258872
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
diff --git a/recipes/roll_commenter.expected/initial_run.json b/recipes/roll_commenter.expected/initial_run.json
index 3ee0824..958fe77 100644
--- a/recipes/roll_commenter.expected/initial_run.json
+++ b/recipes/roll_commenter.expected/initial_run.json
@@ -65,44 +65,6 @@
"name": "project/roll/foo-roller"
},
{
- "cmd": [],
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "prpc",
- "call",
- "-format=json",
- "config.luci.app",
- "config.service.v2.Configs.GetConfig"
- ],
- "infra_step": true,
- "luci_context": {
- "realm": {
- "name": "project:ci"
- },
- "resultdb": {
- "current_invocation": {
- "name": "invocations/build:8945511751514863184",
- "update_token": "token"
- },
- "hostname": "rdbhost"
- }
- },
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg.get",
- "stdin": "{\n \"config_set\": \"projects/project\",\n \"path\": \"cr-buildbucket.cfg\"\n}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@proto.output@{@@@",
- "@@@STEP_LOG_LINE@proto.output@ \"raw_content\": \"\"@@@",
- "@@@STEP_LOG_LINE@proto.output@}@@@",
- "@@@STEP_LOG_END@proto.output@@@"
- ]
- },
- {
"cmd": [
"bb",
"batch",
diff --git a/recipes/roll_commenter.expected/new_roller.json b/recipes/roll_commenter.expected/new_roller.json
index 8a08a51..23bd8f5 100644
--- a/recipes/roll_commenter.expected/new_roller.json
+++ b/recipes/roll_commenter.expected/new_roller.json
@@ -126,44 +126,6 @@
"name": "project/roll/foo-roller"
},
{
- "cmd": [],
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "prpc",
- "call",
- "-format=json",
- "config.luci.app",
- "config.service.v2.Configs.GetConfig"
- ],
- "infra_step": true,
- "luci_context": {
- "realm": {
- "name": "project:ci"
- },
- "resultdb": {
- "current_invocation": {
- "name": "invocations/build:8945511751514863184",
- "update_token": "token"
- },
- "hostname": "rdbhost"
- }
- },
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg.get",
- "stdin": "{\n \"config_set\": \"projects/project\",\n \"path\": \"cr-buildbucket.cfg\"\n}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@proto.output@{@@@",
- "@@@STEP_LOG_LINE@proto.output@ \"raw_content\": \"\"@@@",
- "@@@STEP_LOG_LINE@proto.output@}@@@",
- "@@@STEP_LOG_END@proto.output@@@"
- ]
- },
- {
"cmd": [
"bb",
"batch",
diff --git a/recipes/roll_commenter.expected/no_forward_progress.json b/recipes/roll_commenter.expected/no_forward_progress.json
index 7823e5f..c83fece 100644
--- a/recipes/roll_commenter.expected/no_forward_progress.json
+++ b/recipes/roll_commenter.expected/no_forward_progress.json
@@ -126,44 +126,6 @@
"name": "project/roll/foo-roller"
},
{
- "cmd": [],
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "prpc",
- "call",
- "-format=json",
- "config.luci.app",
- "config.service.v2.Configs.GetConfig"
- ],
- "infra_step": true,
- "luci_context": {
- "realm": {
- "name": "project:ci"
- },
- "resultdb": {
- "current_invocation": {
- "name": "invocations/build:8945511751514863184",
- "update_token": "token"
- },
- "hostname": "rdbhost"
- }
- },
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg.get",
- "stdin": "{\n \"config_set\": \"projects/project\",\n \"path\": \"cr-buildbucket.cfg\"\n}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@proto.output@{@@@",
- "@@@STEP_LOG_LINE@proto.output@ \"raw_content\": \"\"@@@",
- "@@@STEP_LOG_LINE@proto.output@}@@@",
- "@@@STEP_LOG_END@proto.output@@@"
- ]
- },
- {
"cmd": [
"bb",
"batch",
diff --git a/recipes/roll_commenter.expected/no_forward_progress_but_passing_suppress.json b/recipes/roll_commenter.expected/no_forward_progress_but_passing_suppress.json
index f0b54a9..2dbd04e 100644
--- a/recipes/roll_commenter.expected/no_forward_progress_but_passing_suppress.json
+++ b/recipes/roll_commenter.expected/no_forward_progress_but_passing_suppress.json
@@ -126,44 +126,6 @@
"name": "project/roll/foo-roller"
},
{
- "cmd": [],
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "prpc",
- "call",
- "-format=json",
- "config.luci.app",
- "config.service.v2.Configs.GetConfig"
- ],
- "infra_step": true,
- "luci_context": {
- "realm": {
- "name": "project:ci"
- },
- "resultdb": {
- "current_invocation": {
- "name": "invocations/build:8945511751514863184",
- "update_token": "token"
- },
- "hostname": "rdbhost"
- }
- },
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg.get",
- "stdin": "{\n \"config_set\": \"projects/project\",\n \"path\": \"cr-buildbucket.cfg\"\n}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@proto.output@{@@@",
- "@@@STEP_LOG_LINE@proto.output@ \"raw_content\": \"\"@@@",
- "@@@STEP_LOG_LINE@proto.output@}@@@",
- "@@@STEP_LOG_END@proto.output@@@"
- ]
- },
- {
"cmd": [
"bb",
"batch",
diff --git a/recipes/roll_commenter.expected/no_forward_progress_dry_run_already_warned_suppress.json b/recipes/roll_commenter.expected/no_forward_progress_dry_run_already_warned_suppress.json
index 4d8a8ac..418042b 100644
--- a/recipes/roll_commenter.expected/no_forward_progress_dry_run_already_warned_suppress.json
+++ b/recipes/roll_commenter.expected/no_forward_progress_dry_run_already_warned_suppress.json
@@ -126,44 +126,6 @@
"name": "project/roll/foo-roller"
},
{
- "cmd": [],
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "prpc",
- "call",
- "-format=json",
- "config.luci.app",
- "config.service.v2.Configs.GetConfig"
- ],
- "infra_step": true,
- "luci_context": {
- "realm": {
- "name": "project:ci"
- },
- "resultdb": {
- "current_invocation": {
- "name": "invocations/build:8945511751514863184",
- "update_token": "token"
- },
- "hostname": "rdbhost"
- }
- },
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg.get",
- "stdin": "{\n \"config_set\": \"projects/project\",\n \"path\": \"cr-buildbucket.cfg\"\n}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@proto.output@{@@@",
- "@@@STEP_LOG_LINE@proto.output@ \"raw_content\": \"\"@@@",
- "@@@STEP_LOG_LINE@proto.output@}@@@",
- "@@@STEP_LOG_END@proto.output@@@"
- ]
- },
- {
"cmd": [
"bb",
"batch",
diff --git a/recipes/roll_commenter.expected/nothing_to_roll.json b/recipes/roll_commenter.expected/nothing_to_roll.json
index 0251ad6..d252468 100644
--- a/recipes/roll_commenter.expected/nothing_to_roll.json
+++ b/recipes/roll_commenter.expected/nothing_to_roll.json
@@ -126,44 +126,6 @@
"name": "project/roll/foo-roller"
},
{
- "cmd": [],
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "prpc",
- "call",
- "-format=json",
- "config.luci.app",
- "config.service.v2.Configs.GetConfig"
- ],
- "infra_step": true,
- "luci_context": {
- "realm": {
- "name": "project:ci"
- },
- "resultdb": {
- "current_invocation": {
- "name": "invocations/build:8945511751514863184",
- "update_token": "token"
- },
- "hostname": "rdbhost"
- }
- },
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg.get",
- "stdin": "{\n \"config_set\": \"projects/project\",\n \"path\": \"cr-buildbucket.cfg\"\n}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@proto.output@{@@@",
- "@@@STEP_LOG_LINE@proto.output@ \"raw_content\": \"\"@@@",
- "@@@STEP_LOG_LINE@proto.output@}@@@",
- "@@@STEP_LOG_END@proto.output@@@"
- ]
- },
- {
"cmd": [
"bb",
"batch",
diff --git a/recipes/roll_commenter.expected/one_successful_comment.json b/recipes/roll_commenter.expected/one_successful_comment.json
index 3689165..87fefe3 100644
--- a/recipes/roll_commenter.expected/one_successful_comment.json
+++ b/recipes/roll_commenter.expected/one_successful_comment.json
@@ -126,44 +126,6 @@
"name": "project/roll/foo-roller"
},
{
- "cmd": [],
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "prpc",
- "call",
- "-format=json",
- "config.luci.app",
- "config.service.v2.Configs.GetConfig"
- ],
- "infra_step": true,
- "luci_context": {
- "realm": {
- "name": "project:ci"
- },
- "resultdb": {
- "current_invocation": {
- "name": "invocations/build:8945511751514863184",
- "update_token": "token"
- },
- "hostname": "rdbhost"
- }
- },
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg.get",
- "stdin": "{\n \"config_set\": \"projects/project\",\n \"path\": \"cr-buildbucket.cfg\"\n}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@proto.output@{@@@",
- "@@@STEP_LOG_LINE@proto.output@ \"raw_content\": \"\"@@@",
- "@@@STEP_LOG_LINE@proto.output@}@@@",
- "@@@STEP_LOG_END@proto.output@@@"
- ]
- },
- {
"cmd": [
"bb",
"batch",
diff --git a/recipes/roll_commenter.expected/one_successful_comment_dry_run_suppress.json b/recipes/roll_commenter.expected/one_successful_comment_dry_run_suppress.json
index 2abb622..d5f5dc4 100644
--- a/recipes/roll_commenter.expected/one_successful_comment_dry_run_suppress.json
+++ b/recipes/roll_commenter.expected/one_successful_comment_dry_run_suppress.json
@@ -126,44 +126,6 @@
"name": "project/roll/foo-roller"
},
{
- "cmd": [],
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "prpc",
- "call",
- "-format=json",
- "config.luci.app",
- "config.service.v2.Configs.GetConfig"
- ],
- "infra_step": true,
- "luci_context": {
- "realm": {
- "name": "project:ci"
- },
- "resultdb": {
- "current_invocation": {
- "name": "invocations/build:8945511751514863184",
- "update_token": "token"
- },
- "hostname": "rdbhost"
- }
- },
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg.get",
- "stdin": "{\n \"config_set\": \"projects/project\",\n \"path\": \"cr-buildbucket.cfg\"\n}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@proto.output@{@@@",
- "@@@STEP_LOG_LINE@proto.output@ \"raw_content\": \"\"@@@",
- "@@@STEP_LOG_LINE@proto.output@}@@@",
- "@@@STEP_LOG_END@proto.output@@@"
- ]
- },
- {
"cmd": [
"bb",
"batch",
diff --git a/recipes/roll_commenter.expected/two_successful_comments.json b/recipes/roll_commenter.expected/two_successful_comments.json
index 861ca89..4da3435 100644
--- a/recipes/roll_commenter.expected/two_successful_comments.json
+++ b/recipes/roll_commenter.expected/two_successful_comments.json
@@ -126,44 +126,6 @@
"name": "project/roll/foo-roller"
},
{
- "cmd": [],
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "prpc",
- "call",
- "-format=json",
- "config.luci.app",
- "config.service.v2.Configs.GetConfig"
- ],
- "infra_step": true,
- "luci_context": {
- "realm": {
- "name": "project:ci"
- },
- "resultdb": {
- "current_invocation": {
- "name": "invocations/build:8945511751514863184",
- "update_token": "token"
- },
- "hostname": "rdbhost"
- }
- },
- "name": "project/roll/foo-roller.fetch project cr-buildbucket.cfg.get",
- "stdin": "{\n \"config_set\": \"projects/project\",\n \"path\": \"cr-buildbucket.cfg\"\n}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@2@@@",
- "@@@STEP_LOG_LINE@proto.output@{@@@",
- "@@@STEP_LOG_LINE@proto.output@ \"raw_content\": \"\"@@@",
- "@@@STEP_LOG_LINE@proto.output@}@@@",
- "@@@STEP_LOG_END@proto.output@@@"
- ]
- },
- {
"cmd": [
"bb",
"batch",
@@ -483,34 +445,7 @@
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"responses\": [@@@",
"@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"searchBuilds\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"builds\": [@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"id\": \"88007\",@@@",
- "@@@STEP_LOG_LINE@json.output@ \"output\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"pigweed\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new\": \"c000004000004000004000004000004000004000\",@@@",
- "@@@STEP_LOG_LINE@json.output@ \"remote\": \"https://pigweed.googlesource.com/pigweed/pigweed\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ },@@@",
- "@@@STEP_LOG_LINE@json.output@ \"status\": \"FAILURE\"@@@",
- "@@@STEP_LOG_LINE@json.output@ },@@@",
- "@@@STEP_LOG_LINE@json.output@ {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"id\": \"88008\",@@@",
- "@@@STEP_LOG_LINE@json.output@ \"output\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"pigweed\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"new\": \"c000007000007000007000007000007000007000\",@@@",
- "@@@STEP_LOG_LINE@json.output@ \"remote\": \"https://pigweed.googlesource.com/pigweed/pigweed\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ },@@@",
- "@@@STEP_LOG_LINE@json.output@ \"status\": \"FAILURE\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ ]@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"searchBuilds\": {}@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ ]@@@",
"@@@STEP_LOG_LINE@json.output@}@@@",
@@ -538,9 +473,7 @@
"@@@STEP_LOG_LINE@request@ }@@@",
"@@@STEP_LOG_LINE@request@ ]@@@",
"@@@STEP_LOG_LINE@request@}@@@",
- "@@@STEP_LOG_END@request@@@",
- "@@@STEP_LINK@88007@https://cr-buildbucket.appspot.com/build/88007@@@",
- "@@@STEP_LINK@88008@https://cr-buildbucket.appspot.com/build/88008@@@"
+ "@@@STEP_LOG_END@request@@@"
]
},
{
diff --git a/recipes/roll_commenter.py b/recipes/roll_commenter.py
index b8f17f2..783c196 100644
--- a/recipes/roll_commenter.py
+++ b/recipes/roll_commenter.py
@@ -168,6 +168,7 @@
include_incomplete=False,
max_age=datetime.timedelta(days=10),
n=30,
+ assume_existence=True,
)
new_revision = _get_current_revision(
@@ -796,7 +797,7 @@
results('foo-roller', failed(id=88001, n=8), passed(id=88002, n=10)),
results('bar-roller', failed(id=88003, n=3), passed(id=88004, n=5)),
results('baz-roller', failed(id=88005, n=4), passed(id=88006, n=7)),
- results('fail-roller', failed(id=88007, n=4), failed(id=88008, n=7)),
+ results('fail-roller'),
skipping('fail-roller'),
not_commented(9),
commented(10),