Avoiding silent failure on pubsub notification.

1) Removing try..except around pubsub notification, which would silently fail on errors.
2) Adding infra_step=True, to designate responsibility.

Bug: 78810
Change-Id: I83a1233025bed35810384b68b2344f6d0155ba67
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/11520
Reviewed-by: Keyong Han <keyonghan@google.com>
Commit-Queue: Yusuf Mohsinally <mohsinally@google.com>
diff --git a/recipes/engine.expected/Linux Fuchsia skips on duplicate.json b/recipes/engine.expected/Linux Fuchsia skips on duplicate.json
index 8ef8ac9..35cf404 100644
--- a/recipes/engine.expected/Linux Fuchsia skips on duplicate.json
+++ b/recipes/engine.expected/Linux Fuchsia skips on duplicate.json
@@ -19972,6 +19972,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -20037,6 +20038,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/clobber.json b/recipes/engine.expected/clobber.json
index 0e5fa01..a18b130 100644
--- a/recipes/engine.expected/clobber.json
+++ b/recipes/engine.expected/clobber.json
@@ -15067,6 +15067,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15132,6 +15133,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Host Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/experimental.json b/recipes/engine.expected/experimental.json
index 38944b6..80d2ec3 100644
--- a/recipes/engine.expected/experimental.json
+++ b/recipes/engine.expected/experimental.json
@@ -15057,6 +15057,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15122,6 +15123,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/experimental_upload.json b/recipes/engine.expected/experimental_upload.json
index 7f2609a..96c7eda 100644
--- a/recipes/engine.expected/experimental_upload.json
+++ b/recipes/engine.expected/experimental_upload.json
@@ -19171,6 +19171,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -19236,6 +19237,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/first_bot_update_failed.json b/recipes/engine.expected/first_bot_update_failed.json
index 5e32a32..3388a7f 100644
--- a/recipes/engine.expected/first_bot_update_failed.json
+++ b/recipes/engine.expected/first_bot_update_failed.json
@@ -15230,6 +15230,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15295,6 +15296,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Host Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/gcloud_pubsub_failure.json b/recipes/engine.expected/gcloud_pubsub_failure.json
index b009e80..281320c 100644
--- a/recipes/engine.expected/gcloud_pubsub_failure.json
+++ b/recipes/engine.expected/gcloud_pubsub_failure.json
@@ -15067,6 +15067,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15132,82 +15133,16 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Host Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub",
     "~followup_annotations": [
-      "@@@STEP_FAILURE@@@"
+      "@@@STEP_EXCEPTION@@@"
     ]
   },
   {
-    "cmd": [],
-    "name": "Killing Processes"
-  },
-  {
-    "cmd": [
-      "pkill",
-      "chrome"
-    ],
-    "infra_step": true,
-    "name": "Killing Processes.kill chrome",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "pkill",
-      "dart"
-    ],
-    "infra_step": true,
-    "name": "Killing Processes.kill dart",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "pkill",
-      "flutter"
-    ],
-    "infra_step": true,
-    "name": "Killing Processes.kill flutter",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "pkill",
-      "java"
-    ],
-    "infra_step": true,
-    "name": "Killing Processes.kill java",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "pkill",
-      "adb"
-    ],
-    "infra_step": true,
-    "name": "Killing Processes.kill adb",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "top",
-      "-b",
-      "-n",
-      "3",
-      "-o",
-      "%MEM"
-    ],
-    "name": "OS info (2)"
-  },
-  {
+    "failure": {
+      "humanReason": "Infra Failure: Step('gcloud pubsub') (retcode: 1)"
+    },
     "name": "$result"
   }
 ]
\ No newline at end of file
diff --git a/recipes/engine.expected/linux.json b/recipes/engine.expected/linux.json
index c6cea4d..5be767a 100644
--- a/recipes/engine.expected/linux.json
+++ b/recipes/engine.expected/linux.json
@@ -15057,6 +15057,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15122,6 +15123,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_maven_or_bitcode.json b/recipes/engine.expected/linux_maven_or_bitcode.json
index c6cea4d..5be767a 100644
--- a/recipes/engine.expected/linux_maven_or_bitcode.json
+++ b/recipes/engine.expected/linux_maven_or_bitcode.json
@@ -15057,6 +15057,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15122,6 +15123,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_maven_or_bitcode_no_lto.json b/recipes/engine.expected/linux_maven_or_bitcode_no_lto.json
index 61ce598..7536344 100644
--- a/recipes/engine.expected/linux_maven_or_bitcode_no_lto.json
+++ b/recipes/engine.expected/linux_maven_or_bitcode_no_lto.json
@@ -15072,6 +15072,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15137,6 +15138,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_maven_or_bitcode_publish_cipd.json b/recipes/engine.expected/linux_maven_or_bitcode_publish_cipd.json
index c6cea4d..5be767a 100644
--- a/recipes/engine.expected/linux_maven_or_bitcode_publish_cipd.json
+++ b/recipes/engine.expected/linux_maven_or_bitcode_publish_cipd.json
@@ -15057,6 +15057,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15122,6 +15123,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_maven_or_bitcode_publish_cipd_no_lto.json b/recipes/engine.expected/linux_maven_or_bitcode_publish_cipd_no_lto.json
index 61ce598..7536344 100644
--- a/recipes/engine.expected/linux_maven_or_bitcode_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/linux_maven_or_bitcode_publish_cipd_no_lto.json
@@ -15072,6 +15072,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15137,6 +15138,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_no_lto.json b/recipes/engine.expected/linux_no_lto.json
index 61ce598..7536344 100644
--- a/recipes/engine.expected/linux_no_lto.json
+++ b/recipes/engine.expected/linux_no_lto.json
@@ -15072,6 +15072,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15137,6 +15138,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_publish_cipd.json b/recipes/engine.expected/linux_publish_cipd.json
index c6cea4d..5be767a 100644
--- a/recipes/engine.expected/linux_publish_cipd.json
+++ b/recipes/engine.expected/linux_publish_cipd.json
@@ -15057,6 +15057,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15122,6 +15123,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_publish_cipd_no_lto.json b/recipes/engine.expected/linux_publish_cipd_no_lto.json
index 61ce598..7536344 100644
--- a/recipes/engine.expected/linux_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/linux_publish_cipd_no_lto.json
@@ -15072,6 +15072,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15137,6 +15138,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_upload.json b/recipes/engine.expected/linux_upload.json
index 446df21..3b966b8 100644
--- a/recipes/engine.expected/linux_upload.json
+++ b/recipes/engine.expected/linux_upload.json
@@ -19319,6 +19319,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -19384,6 +19385,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_upload_maven_or_bitcode.json b/recipes/engine.expected/linux_upload_maven_or_bitcode.json
index 9504ca9..fe84684 100644
--- a/recipes/engine.expected/linux_upload_maven_or_bitcode.json
+++ b/recipes/engine.expected/linux_upload_maven_or_bitcode.json
@@ -18275,6 +18275,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -18340,6 +18341,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_upload_maven_or_bitcode_no_lto.json b/recipes/engine.expected/linux_upload_maven_or_bitcode_no_lto.json
index 998a814..0a26c91 100644
--- a/recipes/engine.expected/linux_upload_maven_or_bitcode_no_lto.json
+++ b/recipes/engine.expected/linux_upload_maven_or_bitcode_no_lto.json
@@ -18290,6 +18290,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -18355,6 +18356,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_upload_maven_or_bitcode_publish_cipd.json b/recipes/engine.expected/linux_upload_maven_or_bitcode_publish_cipd.json
index 3df5a70..fc24698 100644
--- a/recipes/engine.expected/linux_upload_maven_or_bitcode_publish_cipd.json
+++ b/recipes/engine.expected/linux_upload_maven_or_bitcode_publish_cipd.json
@@ -18913,6 +18913,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -18978,6 +18979,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_upload_maven_or_bitcode_publish_cipd_no_lto.json b/recipes/engine.expected/linux_upload_maven_or_bitcode_publish_cipd_no_lto.json
index fa5157d..06f1673 100644
--- a/recipes/engine.expected/linux_upload_maven_or_bitcode_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/linux_upload_maven_or_bitcode_publish_cipd_no_lto.json
@@ -18928,6 +18928,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -18993,6 +18994,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_upload_no_lto.json b/recipes/engine.expected/linux_upload_no_lto.json
index f43685a..c05f003 100644
--- a/recipes/engine.expected/linux_upload_no_lto.json
+++ b/recipes/engine.expected/linux_upload_no_lto.json
@@ -19334,6 +19334,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -19399,6 +19400,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_upload_publish_cipd.json b/recipes/engine.expected/linux_upload_publish_cipd.json
index 702dff6..f1a0130 100644
--- a/recipes/engine.expected/linux_upload_publish_cipd.json
+++ b/recipes/engine.expected/linux_upload_publish_cipd.json
@@ -19957,6 +19957,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -20022,6 +20023,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/linux_upload_publish_cipd_no_lto.json b/recipes/engine.expected/linux_upload_publish_cipd_no_lto.json
index 4eee987..4a44cae 100644
--- a/recipes/engine.expected/linux_upload_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/linux_upload_publish_cipd_no_lto.json
@@ -19972,6 +19972,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -20037,6 +20038,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac.json b/recipes/engine.expected/mac.json
index a64f392..142b8fc 100644
--- a/recipes/engine.expected/mac.json
+++ b/recipes/engine.expected/mac.json
@@ -9855,6 +9855,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -9920,6 +9921,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_maven_or_bitcode.json b/recipes/engine.expected/mac_maven_or_bitcode.json
index e76f227..b516257 100644
--- a/recipes/engine.expected/mac_maven_or_bitcode.json
+++ b/recipes/engine.expected/mac_maven_or_bitcode.json
@@ -11521,6 +11521,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -11586,6 +11587,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_maven_or_bitcode_no_lto.json b/recipes/engine.expected/mac_maven_or_bitcode_no_lto.json
index 6ec426f..3fc1d17 100644
--- a/recipes/engine.expected/mac_maven_or_bitcode_no_lto.json
+++ b/recipes/engine.expected/mac_maven_or_bitcode_no_lto.json
@@ -11535,6 +11535,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -11600,6 +11601,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_maven_or_bitcode_publish_cipd.json b/recipes/engine.expected/mac_maven_or_bitcode_publish_cipd.json
index e76f227..b516257 100644
--- a/recipes/engine.expected/mac_maven_or_bitcode_publish_cipd.json
+++ b/recipes/engine.expected/mac_maven_or_bitcode_publish_cipd.json
@@ -11521,6 +11521,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -11586,6 +11587,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_maven_or_bitcode_publish_cipd_no_lto.json b/recipes/engine.expected/mac_maven_or_bitcode_publish_cipd_no_lto.json
index 6ec426f..3fc1d17 100644
--- a/recipes/engine.expected/mac_maven_or_bitcode_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/mac_maven_or_bitcode_publish_cipd_no_lto.json
@@ -11535,6 +11535,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -11600,6 +11601,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_no_lto.json b/recipes/engine.expected/mac_no_lto.json
index ef34f12e..51a91eb 100644
--- a/recipes/engine.expected/mac_no_lto.json
+++ b/recipes/engine.expected/mac_no_lto.json
@@ -9869,6 +9869,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -9934,6 +9935,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_publish_cipd.json b/recipes/engine.expected/mac_publish_cipd.json
index a64f392..142b8fc 100644
--- a/recipes/engine.expected/mac_publish_cipd.json
+++ b/recipes/engine.expected/mac_publish_cipd.json
@@ -9855,6 +9855,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -9920,6 +9921,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_publish_cipd_no_lto.json b/recipes/engine.expected/mac_publish_cipd_no_lto.json
index ef34f12e..51a91eb 100644
--- a/recipes/engine.expected/mac_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/mac_publish_cipd_no_lto.json
@@ -9869,6 +9869,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -9934,6 +9935,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_upload.json b/recipes/engine.expected/mac_upload.json
index 47f8b9f..51de11f 100644
--- a/recipes/engine.expected/mac_upload.json
+++ b/recipes/engine.expected/mac_upload.json
@@ -11759,6 +11759,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -11824,6 +11825,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_upload_maven_or_bitcode.json b/recipes/engine.expected/mac_upload_maven_or_bitcode.json
index 47369bf..b3fd510 100644
--- a/recipes/engine.expected/mac_upload_maven_or_bitcode.json
+++ b/recipes/engine.expected/mac_upload_maven_or_bitcode.json
@@ -13273,6 +13273,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -13338,6 +13339,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_upload_maven_or_bitcode_no_lto.json b/recipes/engine.expected/mac_upload_maven_or_bitcode_no_lto.json
index 818d1b3..571bbbb 100644
--- a/recipes/engine.expected/mac_upload_maven_or_bitcode_no_lto.json
+++ b/recipes/engine.expected/mac_upload_maven_or_bitcode_no_lto.json
@@ -13287,6 +13287,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -13352,6 +13353,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_upload_maven_or_bitcode_publish_cipd.json b/recipes/engine.expected/mac_upload_maven_or_bitcode_publish_cipd.json
index 47369bf..b3fd510 100644
--- a/recipes/engine.expected/mac_upload_maven_or_bitcode_publish_cipd.json
+++ b/recipes/engine.expected/mac_upload_maven_or_bitcode_publish_cipd.json
@@ -13273,6 +13273,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -13338,6 +13339,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_upload_maven_or_bitcode_publish_cipd_no_lto.json b/recipes/engine.expected/mac_upload_maven_or_bitcode_publish_cipd_no_lto.json
index 818d1b3..571bbbb 100644
--- a/recipes/engine.expected/mac_upload_maven_or_bitcode_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/mac_upload_maven_or_bitcode_publish_cipd_no_lto.json
@@ -13287,6 +13287,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -13352,6 +13353,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_upload_no_lto.json b/recipes/engine.expected/mac_upload_no_lto.json
index 68ffff8..060c905 100644
--- a/recipes/engine.expected/mac_upload_no_lto.json
+++ b/recipes/engine.expected/mac_upload_no_lto.json
@@ -11773,6 +11773,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -11838,6 +11839,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_upload_publish_cipd.json b/recipes/engine.expected/mac_upload_publish_cipd.json
index 47f8b9f..51de11f 100644
--- a/recipes/engine.expected/mac_upload_publish_cipd.json
+++ b/recipes/engine.expected/mac_upload_publish_cipd.json
@@ -11759,6 +11759,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -11824,6 +11825,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/mac_upload_publish_cipd_no_lto.json b/recipes/engine.expected/mac_upload_publish_cipd_no_lto.json
index 68ffff8..060c905 100644
--- a/recipes/engine.expected/mac_upload_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/mac_upload_publish_cipd_no_lto.json
@@ -11773,6 +11773,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -11838,6 +11839,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Mac Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/pull_request.json b/recipes/engine.expected/pull_request.json
index 0e5fa01..a18b130 100644
--- a/recipes/engine.expected/pull_request.json
+++ b/recipes/engine.expected/pull_request.json
@@ -15067,6 +15067,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]/builder/src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -15132,6 +15133,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Linux Host Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win.json b/recipes/engine.expected/win.json
index dc80ca7..89ef531 100644
--- a/recipes/engine.expected/win.json
+++ b/recipes/engine.expected/win.json
@@ -5260,6 +5260,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -5325,6 +5326,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_maven_or_bitcode.json b/recipes/engine.expected/win_maven_or_bitcode.json
index dc80ca7..89ef531 100644
--- a/recipes/engine.expected/win_maven_or_bitcode.json
+++ b/recipes/engine.expected/win_maven_or_bitcode.json
@@ -5260,6 +5260,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -5325,6 +5326,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_maven_or_bitcode_no_lto.json b/recipes/engine.expected/win_maven_or_bitcode_no_lto.json
index 9821055..f40c43c 100644
--- a/recipes/engine.expected/win_maven_or_bitcode_no_lto.json
+++ b/recipes/engine.expected/win_maven_or_bitcode_no_lto.json
@@ -5267,6 +5267,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -5332,6 +5333,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_maven_or_bitcode_publish_cipd.json b/recipes/engine.expected/win_maven_or_bitcode_publish_cipd.json
index dc80ca7..89ef531 100644
--- a/recipes/engine.expected/win_maven_or_bitcode_publish_cipd.json
+++ b/recipes/engine.expected/win_maven_or_bitcode_publish_cipd.json
@@ -5260,6 +5260,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -5325,6 +5326,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_maven_or_bitcode_publish_cipd_no_lto.json b/recipes/engine.expected/win_maven_or_bitcode_publish_cipd_no_lto.json
index 9821055..f40c43c 100644
--- a/recipes/engine.expected/win_maven_or_bitcode_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/win_maven_or_bitcode_publish_cipd_no_lto.json
@@ -5267,6 +5267,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -5332,6 +5333,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_no_lto.json b/recipes/engine.expected/win_no_lto.json
index 9821055..f40c43c 100644
--- a/recipes/engine.expected/win_no_lto.json
+++ b/recipes/engine.expected/win_no_lto.json
@@ -5267,6 +5267,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -5332,6 +5333,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_publish_cipd.json b/recipes/engine.expected/win_publish_cipd.json
index dc80ca7..89ef531 100644
--- a/recipes/engine.expected/win_publish_cipd.json
+++ b/recipes/engine.expected/win_publish_cipd.json
@@ -5260,6 +5260,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -5325,6 +5326,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_publish_cipd_no_lto.json b/recipes/engine.expected/win_publish_cipd_no_lto.json
index 9821055..f40c43c 100644
--- a/recipes/engine.expected/win_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/win_publish_cipd_no_lto.json
@@ -5267,6 +5267,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -5332,6 +5333,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_upload.json b/recipes/engine.expected/win_upload.json
index 4473a1a..c8c4b87 100644
--- a/recipes/engine.expected/win_upload.json
+++ b/recipes/engine.expected/win_upload.json
@@ -6412,6 +6412,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -6477,6 +6478,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_upload_maven_or_bitcode.json b/recipes/engine.expected/win_upload_maven_or_bitcode.json
index 4473a1a..c8c4b87 100644
--- a/recipes/engine.expected/win_upload_maven_or_bitcode.json
+++ b/recipes/engine.expected/win_upload_maven_or_bitcode.json
@@ -6412,6 +6412,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -6477,6 +6478,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_upload_maven_or_bitcode_no_lto.json b/recipes/engine.expected/win_upload_maven_or_bitcode_no_lto.json
index b0117c1..5406f4e 100644
--- a/recipes/engine.expected/win_upload_maven_or_bitcode_no_lto.json
+++ b/recipes/engine.expected/win_upload_maven_or_bitcode_no_lto.json
@@ -6419,6 +6419,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -6484,6 +6485,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_upload_maven_or_bitcode_publish_cipd.json b/recipes/engine.expected/win_upload_maven_or_bitcode_publish_cipd.json
index 4473a1a..c8c4b87 100644
--- a/recipes/engine.expected/win_upload_maven_or_bitcode_publish_cipd.json
+++ b/recipes/engine.expected/win_upload_maven_or_bitcode_publish_cipd.json
@@ -6412,6 +6412,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -6477,6 +6478,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_upload_maven_or_bitcode_publish_cipd_no_lto.json b/recipes/engine.expected/win_upload_maven_or_bitcode_publish_cipd_no_lto.json
index b0117c1..5406f4e 100644
--- a/recipes/engine.expected/win_upload_maven_or_bitcode_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/win_upload_maven_or_bitcode_publish_cipd_no_lto.json
@@ -6419,6 +6419,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -6484,6 +6485,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_upload_no_lto.json b/recipes/engine.expected/win_upload_no_lto.json
index b0117c1..5406f4e 100644
--- a/recipes/engine.expected/win_upload_no_lto.json
+++ b/recipes/engine.expected/win_upload_no_lto.json
@@ -6419,6 +6419,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -6484,6 +6485,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_upload_publish_cipd.json b/recipes/engine.expected/win_upload_publish_cipd.json
index 4473a1a..c8c4b87 100644
--- a/recipes/engine.expected/win_upload_publish_cipd.json
+++ b/recipes/engine.expected/win_upload_publish_cipd.json
@@ -6412,6 +6412,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -6477,6 +6478,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.expected/win_upload_publish_cipd_no_lto.json b/recipes/engine.expected/win_upload_publish_cipd_no_lto.json
index b0117c1..5406f4e 100644
--- a/recipes/engine.expected/win_upload_publish_cipd_no_lto.json
+++ b/recipes/engine.expected/win_upload_publish_cipd_no_lto.json
@@ -6419,6 +6419,7 @@
       "HEAD"
     ],
     "cwd": "[CACHE]\\builder\\src",
+    "infra_step": true,
     "name": "Retrieve git hash"
   },
   {
@@ -6484,6 +6485,7 @@
       "projects/flutter-dashboard/topics/luci-builds-prod",
       "--message={\"buildername\" : \"Win Engine\", \"bucket\" : \"ci\", \"githash\" : \"\"}"
     ],
+    "infra_step": true,
     "name": "gcloud pubsub"
   },
   {
diff --git a/recipes/engine.py b/recipes/engine.py
index 90a478c..bb801d9 100644
--- a/recipes/engine.py
+++ b/recipes/engine.py
@@ -70,7 +70,7 @@
   with api.context(cwd=GetCheckoutPath(api)):
     return api.step(
         "Retrieve git hash", ["git", "rev-parse", "HEAD"],
-        stdout=api.raw_io.output()
+        stdout=api.raw_io.output(), infra_step=True,
     ).stdout.strip()
 
 
@@ -246,7 +246,7 @@
       '--message={"buildername" : "%s", "bucket" : "%s", "githash" : "%s"}' %
       (buildername, bucket, githash)
   ]
-  api.gcloud(*cmd)
+  api.gcloud(*cmd, infra_step=True)
 
 
 def UploadArtifacts(
@@ -1534,12 +1534,9 @@
 
   # Notifies of build completion
   # TODO(crbug.com/843720): replace this when user defined notifications is implemented.
-  try:
-    NotifyPubsub(
-        api, api.buildbucket.builder_name, api.buildbucket.build.builder.bucket
-    )
-  except (api.step.StepFailure) as e:
-    pass
+  NotifyPubsub(
+      api, api.buildbucket.builder_name, api.buildbucket.build.builder.bucket
+  )
 
   # This is to clean up leaked processes.
   api.os_utils.kill_processes()