[dart] Send the got_revision from bot_update when publishing the results
This is needed so the try results can be analyzed, knowing the base commit
that the patch has been applied to.
This is a copy of the change in the chromium tree
https://chromium-review.googlesource.com/c/chromium/tools/build/+/2071868
Bug: https://github.com/dart-lang/dart_ci/issues/74
Change-Id: I65ed8bac167bd2322c2200cbc5ff0a72cb6cd253
Reviewed-on: https://dart-review.googlesource.com/c/recipes/+/137600
Reviewed-by: Alexander Thomas <athom@google.com>
diff --git a/README.recipes.md b/README.recipes.md
index ac01cb1..8115b60 100644
--- a/README.recipes.md
+++ b/README.recipes.md
@@ -49,11 +49,11 @@
Returns the path to the checked-in SDK dart executable.
-— **def [delete\_debug\_log](/recipe_modules/dart/api.py#556)(self):**
+— **def [delete\_debug\_log](/recipe_modules/dart/api.py#558)(self):**
Deletes the debug log file
-— **def [download\_browser](/recipe_modules/dart/api.py#827)(self, runtime, version):**
+— **def [download\_browser](/recipe_modules/dart/api.py#829)(self, runtime, version):**
— **def [download\_parent\_isolate](/recipe_modules/dart/api.py#155)(self):**
@@ -65,7 +65,7 @@
Kills leftover tasks from previous runs or steps.
-— **def [read\_debug\_log](/recipe_modules/dart/api.py#544)(self):**
+— **def [read\_debug\_log](/recipe_modules/dart/api.py#546)(self):**
Reads the debug log file
@@ -74,7 +74,7 @@
Runs test.py in the given isolate, sharded over several swarming tasks.
Returns the created tasks, which can be collected with collect_all().
-— **def [test](/recipe_modules/dart/api.py#562)(self, test_data):**
+— **def [test](/recipe_modules/dart/api.py#564)(self, test_data):**
Reads the test-matrix.json file in checkout and runs each step listed
in the file.
diff --git a/recipe_modules/dart/api.py b/recipe_modules/dart/api.py
index c0f261d..b693dc9 100644
--- a/recipe_modules/dart/api.py
+++ b/recipe_modules/dart/api.py
@@ -439,7 +439,9 @@
'tools', 'bots', 'post_results_to_pubsub.dart'), '--result_file',
self.m.raw_io.input_text(results_str), '--auth_token',
self.m.raw_io.input_text(access_token), '--id',
- self.m.buildbucket.build.id
+ self.m.buildbucket.build.id, '--base_revision',
+ self.m.bot_update.last_returned_properties.get(
+ 'got_revision', 'got_revision property not found')
])
diff --git a/recipe_modules/dart/examples/example.expected/analyzer-linux-release.json b/recipe_modules/dart/examples/example.expected/analyzer-linux-release.json
index 8eaa88f..dd1ce27 100644
--- a/recipe_modules/dart/examples/example.expected/analyzer-linux-release.json
+++ b/recipe_modules/dart/examples/example.expected/analyzer-linux-release.json
@@ -2363,7 +2363,9 @@
"--auth_token",
"extra.secret.token.should.not.be.logged",
"--id",
- "8945511751514863184"
+ "8945511751514863184",
+ "--base_revision",
+ "got_revision property not found"
],
"cwd": "[CACHE]/builder/sdk",
"infra_step": true,
diff --git a/recipe_modules/dart/examples/example.expected/basic.json b/recipe_modules/dart/examples/example.expected/basic.json
index b1acd66..06c8849 100644
--- a/recipe_modules/dart/examples/example.expected/basic.json
+++ b/recipe_modules/dart/examples/example.expected/basic.json
@@ -1845,7 +1845,9 @@
"--auth_token",
"extra.secret.token.should.not.be.logged",
"--id",
- "8945511751514863184"
+ "8945511751514863184",
+ "--base_revision",
+ "got_revision property not found"
],
"cwd": "[CACHE]/builder/sdk",
"infra_step": true,
diff --git a/recipe_modules/dart/examples/example.expected/failed-to-publish-is-infra-failure.json b/recipe_modules/dart/examples/example.expected/failed-to-publish-is-infra-failure.json
index c0e8401..90146d0 100644
--- a/recipe_modules/dart/examples/example.expected/failed-to-publish-is-infra-failure.json
+++ b/recipe_modules/dart/examples/example.expected/failed-to-publish-is-infra-failure.json
@@ -8,7 +8,9 @@
"--auth_token",
"extra.secret.token.should.not.be.logged",
"--id",
- "8945511751514863184"
+ "8945511751514863184",
+ "--base_revision",
+ "got_revision property not found"
],
"cwd": "[CACHE]/builder/sdk",
"infra_step": true,
diff --git a/recipe_modules/dart/examples/example.expected/vm-win.json b/recipe_modules/dart/examples/example.expected/vm-win.json
index 9a629c9..e4ada1f 100644
--- a/recipe_modules/dart/examples/example.expected/vm-win.json
+++ b/recipe_modules/dart/examples/example.expected/vm-win.json
@@ -2085,7 +2085,9 @@
"--auth_token",
"extra.secret.token.should.not.be.logged",
"--id",
- "8945511751514863184"
+ "8945511751514863184",
+ "--base_revision",
+ "got_revision property not found"
],
"cwd": "[CACHE]\\builder\\sdk",
"infra_step": true,
diff --git a/recipes/dart/neo.expected/builders_dart2js-win-debug-x64-firefox-try.json b/recipes/dart/neo.expected/builders_dart2js-win-debug-x64-firefox-try.json
index ca8c687..cfe7eb9 100644
--- a/recipes/dart/neo.expected/builders_dart2js-win-debug-x64-firefox-try.json
+++ b/recipes/dart/neo.expected/builders_dart2js-win-debug-x64-firefox-try.json
@@ -1163,7 +1163,9 @@
"--auth_token",
"extra.secret.token.should.not.be.logged",
"--id",
- "8945511751514863184"
+ "8945511751514863184",
+ "--base_revision",
+ "got_revision property not found"
],
"cwd": "[CACHE]/builder/sdk",
"env": {