cipd_roller: Add RawResult for no-op case
Change-Id: I2f6392b4c8336735ed28bfc2d5660d96b6d76e51
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/154751
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/recipes/cipd_roller.expected/missing_tag.json b/recipes/cipd_roller.expected/missing_tag.json
index 841b6e2..4b35002 100644
--- a/recipes/cipd_roller.expected/missing_tag.json
+++ b/recipes/cipd_roller.expected/missing_tag.json
@@ -1286,6 +1286,7 @@
]
},
{
- "name": "$result"
+ "name": "$result",
+ "summaryMarkdown": "nothing to roll"
}
]
\ No newline at end of file
diff --git a/recipes/cipd_roller.expected/multiple_common_tags.json b/recipes/cipd_roller.expected/multiple_common_tags.json
index 6bfb692..1dc65d0 100644
--- a/recipes/cipd_roller.expected/multiple_common_tags.json
+++ b/recipes/cipd_roller.expected/multiple_common_tags.json
@@ -1175,6 +1175,7 @@
]
},
{
- "name": "$result"
+ "name": "$result",
+ "summaryMarkdown": "nothing to roll"
}
]
\ No newline at end of file
diff --git a/recipes/cipd_roller.py b/recipes/cipd_roller.py
index 5e66a0f..51aa7ac 100644
--- a/recipes/cipd_roller.py
+++ b/recipes/cipd_roller.py
@@ -16,6 +16,8 @@
import collections
import re
+from PB.recipe_engine import result as result_pb2
+from PB.go.chromium.org.luci.buildbucket.proto import common as common_pb2
from PB.recipes.pigweed.cipd_roller import InputProperties
DEPS = [
@@ -217,7 +219,9 @@
presentation.step_summary_text = (
'current version {} in common tags'
).format(old_version)
- return
+ return result_pb2.RawResult(
+ summary_markdown='nothing to roll', status=common_pb2.SUCCESS,
+ )
api.file.write_text(
f'write {basename}',