Reland "submodule_roll: Also update MODULE.bazel.lock"
This is a reland of commit 68d80b85b8b764f9be3a0e5179582a778fa42963
Original change's description:
> submodule_roll: Also update MODULE.bazel.lock
>
> Bug: b/393158553
> Change-Id: Ibc714e260615462f9d21b4e5d507a49ee96e8e7c
> Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/263592
> Reviewed-by: Austin Foxley <afoxley@google.com>
> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
> Commit-Queue: Rob Mohr <mohrr@google.com>
> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Bug: b/393158553
Change-Id: I82e66cd225d805b8f61b13b299f75a80410b3065
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/263635
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Reviewed-by: Austin Foxley <afoxley@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
diff --git a/recipe_modules/submodule_roll/__init__.py b/recipe_modules/submodule_roll/__init__.py
index 210757e..9cc34bd 100644
--- a/recipe_modules/submodule_roll/__init__.py
+++ b/recipe_modules/submodule_roll/__init__.py
@@ -19,6 +19,7 @@
DEPS = [
'fuchsia/git',
'fuchsia/git_roll_util',
+ 'pigweed/bazel_roll',
'pigweed/checkout',
'recipe_engine/context',
'recipe_engine/file',
diff --git a/recipe_modules/submodule_roll/api.py b/recipe_modules/submodule_roll/api.py
index 5755346..f545ff7 100644
--- a/recipe_modules/submodule_roll/api.py
+++ b/recipe_modules/submodule_roll/api.py
@@ -160,4 +160,6 @@
change.finalize()
+ self.m.bazel_roll.update_module_bazel_lock(checkout)
+
return [roll]
diff --git a/recipe_modules/submodule_roll/tests/full.expected/success.json b/recipe_modules/submodule_roll/tests/full.expected/success.json
index 0944b2c..cce3e9e 100644
--- a/recipe_modules/submodule_roll/tests/full.expected/success.json
+++ b/recipe_modules/submodule_roll/tests/full.expected/success.json
@@ -471,6 +471,68 @@
},
{
"cmd": [],
+ "name": "a1.update MODULE.bazel.lock",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "cipd",
+ "ensure",
+ "-root",
+ "[CLEANUP]/tmp_tmp_1",
+ "-ensure-file",
+ "fuchsia/third_party/bazelisk/${platform} latest",
+ "-max-threads",
+ "0",
+ "-json-output",
+ "/path/to/tmp/json"
+ ],
+ "cwd": "[START_DIR]/checkout",
+ "infra_step": true,
+ "name": "a1.update MODULE.bazel.lock.ensure bazelisk",
+ "~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-latest----------\",@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"package\": \"fuchsia/third_party/bazelisk/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": [
+ "[CLEANUP]/tmp_tmp_1/bazelisk",
+ "version"
+ ],
+ "cwd": "[START_DIR]/checkout",
+ "name": "a1.update MODULE.bazel.lock.bazel version",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CLEANUP]/tmp_tmp_1/bazelisk",
+ "mod",
+ "deps",
+ "--lockfile_mode=update"
+ ],
+ "cwd": "[START_DIR]/checkout",
+ "name": "a1.update MODULE.bazel.lock.bazelisk mod deps --lockfile_mode=update",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@2@@@"
+ ]
+ },
+ {
+ "cmd": [],
"name": "commit message",
"~followup_annotations": [
"@@@STEP_SUMMARY_TEXT@roll: a1 1111111..h3ll0 (3 commits)\n\n3e30158:https://foo-review.googlesource.com/c/a1/+/12345 fake A msg 0\n3380b83:https://foo-review.googlesource.com/c/a1/+/12345 fake A msg 1\n363caa9:https://foo-review.googlesource.com/c/a1/+/12345 fake A msg 2\n\nRolled-Repo: https://foo.googlesource.com/a1\nRolled-Commits: 11111111111111..h3ll0@@@"