[cbuild] Do not create 'google' builds for presubmit cbuild results
Change-Id: Id1ae70c43c6e00bc82a710c545162684a0e27b70
Reviewed-on: https://dart-review.googlesource.com/c/recipes/+/178540
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
diff --git a/recipes/dart/cbuild.expected/experimental-with-results.json b/recipes/dart/cbuild.expected/experimental-with-results.json
index 13460aa..deb5645 100644
--- a/recipes/dart/cbuild.expected/experimental-with-results.json
+++ b/recipes/dart/cbuild.expected/experimental-with-results.json
@@ -65,6 +65,29 @@
"RECIPE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
+ "gs://dart-cbuild-test-results/hash-of-presubmit",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "gsutil download cbuild result for hash-of-presubmit",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@json.output[result]@{@@@",
+ "@@@STEP_LOG_LINE@json.output[result]@ \"presubmit\": true, @@@",
+ "@@@STEP_LOG_LINE@json.output[result]@ \"regression\": false, @@@",
+ "@@@STEP_LOG_LINE@json.output[result]@ \"result\": false@@@",
+ "@@@STEP_LOG_LINE@json.output[result]@}@@@",
+ "@@@STEP_LOG_END@json.output[result]@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
+ "--",
+ "RECIPE_REPO[depot_tools]/gsutil.py",
+ "----",
+ "cp",
"gs://dart-cbuild-test-results/hash-of-failure",
"/path/to/tmp/json"
],
@@ -292,6 +315,42 @@
"--json-file",
"/path/to/tmp/json",
"--url",
+ "https://dart.googlesource.com/sdk/+/hash-of-presubmit",
+ "--format",
+ "json"
+ ],
+ "name": "download change-id for hash-of-presubmit",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"author\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"email\": \"testauthor@fake.chromium.org\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"name\": \"Test Author\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"commit\": \"593f1897a2b042e60b19865b1e90053cb7e6e4ab\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"committer\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"email\": \"testauthor@fake.chromium.org\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"name\": \"Test Author\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"message\": \"Subject\\n\\nChange-Id: Ihash-of-presubmit\\n\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"parents\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"86619208a86754151ab91ef3aae04ec3ecc48bfb\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ ], @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tree\": \"0319208908f6bd662c55cdb53eb307df1190ef29\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tree_diff\": []@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py",
+ "--json-file",
+ "/path/to/tmp/json",
+ "--url",
"https://dart.googlesource.com/sdk/+/hash-of-failure",
"--format",
"json"
diff --git a/recipes/dart/cbuild.expected/with-legacy-results.json b/recipes/dart/cbuild.expected/with-legacy-results.json
index 59288c1..47e2b1d 100644
--- a/recipes/dart/cbuild.expected/with-legacy-results.json
+++ b/recipes/dart/cbuild.expected/with-legacy-results.json
@@ -60,6 +60,25 @@
"RECIPE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
+ "gs://dart-cbuild-test-results/hash-of-presubmit",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "gsutil download cbuild result for hash-of-presubmit",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@json.output[result]@false@@@",
+ "@@@STEP_LOG_END@json.output[result]@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
+ "--",
+ "RECIPE_REPO[depot_tools]/gsutil.py",
+ "----",
+ "cp",
"gs://dart-cbuild-test-results/hash-of-failure",
"/path/to/tmp/json"
],
@@ -79,7 +98,7 @@
],
"infra_step": true,
"name": "buildbucket.schedule",
- "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"ci.sandbox\", \"builder\": \"google\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"dart.googlesource.com\", \"id\": \"hash-of-success\", \"project\": \"sdk\", \"ref\": \"refs/heads/master\"}, \"properties\": {\"result\": \"SUCCESS\", \"url\": \"https://goto.google.com/dart-cbuild/find/hash-of-success\"}, \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}, {\"scheduleBuild\": {\"builder\": {\"bucket\": \"ci.sandbox\", \"builder\": \"google\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"dart.googlesource.com\", \"id\": \"hash-of-regression\", \"project\": \"sdk\", \"ref\": \"refs/heads/master\"}, \"properties\": {\"result\": \"FAILURE\", \"url\": \"https://goto.google.com/dart-cbuild/find/hash-of-regression\"}, \"requestId\": \"0-00000000-0000-0000-0000-00000000133a\", \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}, {\"scheduleBuild\": {\"builder\": {\"bucket\": \"ci.sandbox\", \"builder\": \"google\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"dart.googlesource.com\", \"id\": \"hash-of-failure\", \"project\": \"sdk\", \"ref\": \"refs/heads/master\"}, \"properties\": {\"result\": \"FAILURE\", \"url\": \"https://goto.google.com/dart-cbuild/find/hash-of-failure\"}, \"requestId\": \"0-00000000-0000-0000-0000-00000000133d\", \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
+ "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"ci.sandbox\", \"builder\": \"google\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"dart.googlesource.com\", \"id\": \"hash-of-success\", \"project\": \"sdk\", \"ref\": \"refs/heads/master\"}, \"properties\": {\"result\": \"SUCCESS\", \"url\": \"https://goto.google.com/dart-cbuild/find/hash-of-success\"}, \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}, {\"scheduleBuild\": {\"builder\": {\"bucket\": \"ci.sandbox\", \"builder\": \"google\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"dart.googlesource.com\", \"id\": \"hash-of-regression\", \"project\": \"sdk\", \"ref\": \"refs/heads/master\"}, \"properties\": {\"result\": \"FAILURE\", \"url\": \"https://goto.google.com/dart-cbuild/find/hash-of-regression\"}, \"requestId\": \"0-00000000-0000-0000-0000-00000000133a\", \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}, {\"scheduleBuild\": {\"builder\": {\"bucket\": \"ci.sandbox\", \"builder\": \"google\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"dart.googlesource.com\", \"id\": \"hash-of-presubmit\", \"project\": \"sdk\", \"ref\": \"refs/heads/master\"}, \"properties\": {\"result\": \"FAILURE\", \"url\": \"https://goto.google.com/dart-cbuild/find/hash-of-presubmit\"}, \"requestId\": \"0-00000000-0000-0000-0000-00000000133d\", \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}, {\"scheduleBuild\": {\"builder\": {\"bucket\": \"ci.sandbox\", \"builder\": \"google\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"dart.googlesource.com\", \"id\": \"hash-of-failure\", \"project\": \"sdk\", \"ref\": \"refs/heads/master\"}, \"properties\": {\"result\": \"FAILURE\", \"url\": \"https://goto.google.com/dart-cbuild/find/hash-of-failure\"}, \"requestId\": \"0-00000000-0000-0000-0000-000000001340\", \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
"~followup_annotations": [
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"responses\": [@@@",
@@ -109,6 +128,15 @@
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"id\": \"8922054662172514002\"@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"scheduleBuild\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"builder\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"bucket\": \"ci.sandbox\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"builder\": \"google\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"id\": \"8922054662172514003\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ ]@@@",
"@@@STEP_LOG_LINE@json.output@}@@@",
@@ -179,6 +207,33 @@
"@@@STEP_LOG_LINE@request@ \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", @@@",
"@@@STEP_LOG_LINE@request@ \"gitilesCommit\": {@@@",
"@@@STEP_LOG_LINE@request@ \"host\": \"dart.googlesource.com\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"id\": \"hash-of-presubmit\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"project\": \"sdk\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"ref\": \"refs/heads/master\"@@@",
+ "@@@STEP_LOG_LINE@request@ }, @@@",
+ "@@@STEP_LOG_LINE@request@ \"properties\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"result\": \"FAILURE\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"url\": \"https://goto.google.com/dart-cbuild/find/hash-of-presubmit\"@@@",
+ "@@@STEP_LOG_LINE@request@ }, @@@",
+ "@@@STEP_LOG_LINE@request@ \"requestId\": \"0-00000000-0000-0000-0000-00000000133d\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"tags\": [@@@",
+ "@@@STEP_LOG_LINE@request@ {@@@",
+ "@@@STEP_LOG_LINE@request@ \"key\": \"user_agent\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"value\": \"recipe\"@@@",
+ "@@@STEP_LOG_LINE@request@ }@@@",
+ "@@@STEP_LOG_LINE@request@ ]@@@",
+ "@@@STEP_LOG_LINE@request@ }@@@",
+ "@@@STEP_LOG_LINE@request@ }, @@@",
+ "@@@STEP_LOG_LINE@request@ {@@@",
+ "@@@STEP_LOG_LINE@request@ \"scheduleBuild\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"builder\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"bucket\": \"ci.sandbox\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"builder\": \"google\"@@@",
+ "@@@STEP_LOG_LINE@request@ }, @@@",
+ "@@@STEP_LOG_LINE@request@ \"experimental\": \"NO\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"gitilesCommit\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"host\": \"dart.googlesource.com\", @@@",
"@@@STEP_LOG_LINE@request@ \"id\": \"hash-of-failure\", @@@",
"@@@STEP_LOG_LINE@request@ \"project\": \"sdk\", @@@",
"@@@STEP_LOG_LINE@request@ \"ref\": \"refs/heads/master\"@@@",
@@ -187,7 +242,7 @@
"@@@STEP_LOG_LINE@request@ \"result\": \"FAILURE\", @@@",
"@@@STEP_LOG_LINE@request@ \"url\": \"https://goto.google.com/dart-cbuild/find/hash-of-failure\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
- "@@@STEP_LOG_LINE@request@ \"requestId\": \"0-00000000-0000-0000-0000-00000000133d\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"requestId\": \"0-00000000-0000-0000-0000-000000001340\", @@@",
"@@@STEP_LOG_LINE@request@ \"tags\": [@@@",
"@@@STEP_LOG_LINE@request@ {@@@",
"@@@STEP_LOG_LINE@request@ \"key\": \"user_agent\", @@@",
@@ -201,7 +256,8 @@
"@@@STEP_LOG_END@request@@@",
"@@@STEP_LINK@8922054662172514000@https://cr-buildbucket.appspot.com/build/8922054662172514000@@@",
"@@@STEP_LINK@8922054662172514001@https://cr-buildbucket.appspot.com/build/8922054662172514001@@@",
- "@@@STEP_LINK@8922054662172514002@https://cr-buildbucket.appspot.com/build/8922054662172514002@@@"
+ "@@@STEP_LINK@8922054662172514002@https://cr-buildbucket.appspot.com/build/8922054662172514002@@@",
+ "@@@STEP_LINK@8922054662172514003@https://cr-buildbucket.appspot.com/build/8922054662172514003@@@"
]
},
{
@@ -418,6 +474,83 @@
"--json-file",
"/path/to/tmp/json",
"--url",
+ "https://dart.googlesource.com/sdk/+/hash-of-presubmit",
+ "--format",
+ "json"
+ ],
+ "name": "download change-id for hash-of-presubmit",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"author\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"email\": \"testauthor@fake.chromium.org\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"name\": \"Test Author\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"commit\": \"593f1897a2b042e60b19865b1e90053cb7e6e4ab\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"committer\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"email\": \"testauthor@fake.chromium.org\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"name\": \"Test Author\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"message\": \"Subject\\n\\nChange-Id: Ihash-of-presubmit\\n\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"parents\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"86619208a86754151ab91ef3aae04ec3ecc48bfb\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ ], @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tree\": \"0319208908f6bd662c55cdb53eb307df1190ef29\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tree_diff\": []@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/cipd/infra/tools/luci/gerrit/pinned-gerrit-version/gerrit",
+ "set-review",
+ "-host",
+ "https://dart-review.googlesource.com",
+ "-input",
+ "{\"change_id\": \"Ihash-of-presubmit\", \"input\": {\"message\": \"go/dart-cbuild result: FAILURE\\n\\nDetails: https://goto.google.com/dart-cbuild/find/hash-of-presubmit\\n\"}, \"revision_id\": \"current\"}",
+ "-output",
+ "/path/to/tmp/json"
+ ],
+ "name": "update gerrit for hash-of-presubmit",
+ "timeout": 600,
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@json.output (invalid)@@@",
+ "@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
+ "@@@STEP_LOG_END@json.output (exception)@@@",
+ "@@@STEP_LOG_LINE@json.input@{@@@",
+ "@@@STEP_LOG_LINE@json.input@ \"change_id\": \"Ihash-of-presubmit\", @@@",
+ "@@@STEP_LOG_LINE@json.input@ \"input\": {@@@",
+ "@@@STEP_LOG_LINE@json.input@ \"message\": \"go/dart-cbuild result: FAILURE\\n\\nDetails: https://goto.google.com/dart-cbuild/find/hash-of-presubmit\\n\"@@@",
+ "@@@STEP_LOG_LINE@json.input@ }, @@@",
+ "@@@STEP_LOG_LINE@json.input@ \"revision_id\": \"current\"@@@",
+ "@@@STEP_LOG_LINE@json.input@}@@@",
+ "@@@STEP_LOG_END@json.input@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
+ "--",
+ "RECIPE_REPO[depot_tools]/gsutil.py",
+ "----",
+ "rm",
+ "gs://dart-cbuild-test-results/hash-of-presubmit"
+ ],
+ "infra_step": true,
+ "name": "gsutil delete result for hash-of-presubmit"
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py",
+ "--json-file",
+ "/path/to/tmp/json",
+ "--url",
"https://dart.googlesource.com/sdk/+/hash-of-failure",
"--format",
"json"
diff --git a/recipes/dart/cbuild.expected/with-results.json b/recipes/dart/cbuild.expected/with-results.json
index b720798..2abe8f7 100644
--- a/recipes/dart/cbuild.expected/with-results.json
+++ b/recipes/dart/cbuild.expected/with-results.json
@@ -65,6 +65,29 @@
"RECIPE_REPO[depot_tools]/gsutil.py",
"----",
"cp",
+ "gs://dart-cbuild-test-results/hash-of-presubmit",
+ "/path/to/tmp/json"
+ ],
+ "infra_step": true,
+ "name": "gsutil download cbuild result for hash-of-presubmit",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@json.output[result]@{@@@",
+ "@@@STEP_LOG_LINE@json.output[result]@ \"presubmit\": true, @@@",
+ "@@@STEP_LOG_LINE@json.output[result]@ \"regression\": false, @@@",
+ "@@@STEP_LOG_LINE@json.output[result]@ \"result\": false@@@",
+ "@@@STEP_LOG_LINE@json.output[result]@}@@@",
+ "@@@STEP_LOG_END@json.output[result]@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
+ "--",
+ "RECIPE_REPO[depot_tools]/gsutil.py",
+ "----",
+ "cp",
"gs://dart-cbuild-test-results/hash-of-failure",
"/path/to/tmp/json"
],
@@ -426,6 +449,83 @@
"--json-file",
"/path/to/tmp/json",
"--url",
+ "https://dart.googlesource.com/sdk/+/hash-of-presubmit",
+ "--format",
+ "json"
+ ],
+ "name": "download change-id for hash-of-presubmit",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"author\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"email\": \"testauthor@fake.chromium.org\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"name\": \"Test Author\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"commit\": \"593f1897a2b042e60b19865b1e90053cb7e6e4ab\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"committer\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"email\": \"testauthor@fake.chromium.org\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"name\": \"Test Author\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"time\": \"Mon Jan 01 00:00:00 2015\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"message\": \"Subject\\n\\nChange-Id: Ihash-of-presubmit\\n\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"parents\": [@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"86619208a86754151ab91ef3aae04ec3ecc48bfb\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ ], @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tree\": \"0319208908f6bd662c55cdb53eb307df1190ef29\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"tree_diff\": []@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "[CACHE]/cipd/infra/tools/luci/gerrit/pinned-gerrit-version/gerrit",
+ "set-review",
+ "-host",
+ "https://dart-review.googlesource.com",
+ "-input",
+ "{\"change_id\": \"Ihash-of-presubmit\", \"input\": {\"message\": \"go/dart-cbuild result: FAILURE (NO REGRESSIONS DETECTED)\\n\\nDetails: https://goto.google.com/dart-cbuild/find/hash-of-presubmit\\n\"}, \"revision_id\": \"current\"}",
+ "-output",
+ "/path/to/tmp/json"
+ ],
+ "name": "update gerrit for hash-of-presubmit",
+ "timeout": 600,
+ "~followup_annotations": [
+ "@@@STEP_LOG_END@json.output (invalid)@@@",
+ "@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
+ "@@@STEP_LOG_END@json.output (exception)@@@",
+ "@@@STEP_LOG_LINE@json.input@{@@@",
+ "@@@STEP_LOG_LINE@json.input@ \"change_id\": \"Ihash-of-presubmit\", @@@",
+ "@@@STEP_LOG_LINE@json.input@ \"input\": {@@@",
+ "@@@STEP_LOG_LINE@json.input@ \"message\": \"go/dart-cbuild result: FAILURE (NO REGRESSIONS DETECTED)\\n\\nDetails: https://goto.google.com/dart-cbuild/find/hash-of-presubmit\\n\"@@@",
+ "@@@STEP_LOG_LINE@json.input@ }, @@@",
+ "@@@STEP_LOG_LINE@json.input@ \"revision_id\": \"current\"@@@",
+ "@@@STEP_LOG_LINE@json.input@}@@@",
+ "@@@STEP_LOG_END@json.input@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
+ "--",
+ "RECIPE_REPO[depot_tools]/gsutil.py",
+ "----",
+ "rm",
+ "gs://dart-cbuild-test-results/hash-of-presubmit"
+ ],
+ "infra_step": true,
+ "name": "gsutil delete result for hash-of-presubmit"
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py",
+ "--json-file",
+ "/path/to/tmp/json",
+ "--url",
"https://dart.googlesource.com/sdk/+/hash-of-failure",
"--format",
"json"
diff --git a/recipes/dart/cbuild.py b/recipes/dart/cbuild.py
index 1ef6d3b..df4d890 100644
--- a/recipes/dart/cbuild.py
+++ b/recipes/dart/cbuild.py
@@ -51,7 +51,8 @@
# Nothing to do
return
for result in results:
- requests.append(_create_schedule_build_request(api, result))
+ if not result['presubmit']:
+ requests.append(_create_schedule_build_request(api, result))
api.buildbucket.schedule(requests)
with api.step.defer_results():
for result in results:
@@ -91,12 +92,14 @@
cbuild_result_json = download.json.outputs['result']
cbuild_success = None
cbuild_regression = None
+ cbuild_presubmit = None
if cbuild_result_json in (True, False):
# TODO(athom): remove support for non-json legacy results.
cbuild_success = cbuild_result_json
else:
cbuild_success = cbuild_result_json['result']
cbuild_regression = cbuild_result_json.get('regression', False)
+ cbuild_presubmit = cbuild_result_json.get('presubmit', False)
assert not (cbuild_success and cbuild_regression)
@@ -113,6 +116,7 @@
'cbuild_result_text': cbuild_result_text,
'cbuild_regression': cbuild_regression,
'cbuild_url': CBUILD_RESULT_URL % commit_hash,
+ 'presubmit': cbuild_presubmit,
})
return results
@@ -168,6 +172,7 @@
CBUILD_RESULT_URLS = '''gs://dart-cbuild-test-results/hash-of-success
gs://dart-cbuild-test-results/ignore-this-directory/
gs://dart-cbuild-test-results/hash-of-regression
+gs://dart-cbuild-test-results/hash-of-presubmit
gs://dart-cbuild-test-results/hash-of-failure
'''
yield api.test(
@@ -180,6 +185,11 @@
'result': False,
'regression': True
}),
+ _cbuild_results('hash-of-presubmit', {
+ 'result': False,
+ 'regression': False,
+ 'presubmit': True
+ }),
_cbuild_results('hash-of-failure', {
'result': False,
'regression': False
@@ -189,12 +199,16 @@
api.post_process(post_process.MustRun,
'update gerrit for hash-of-regression'),
api.post_process(post_process.MustRun,
+ 'update gerrit for hash-of-presubmit'),
+ api.post_process(post_process.MustRun,
'update gerrit for hash-of-failure'),
api.post_process(post_process.MustRun,
'gsutil delete result for hash-of-success'),
api.post_process(post_process.MustRun,
'gsutil delete result for hash-of-regression'),
api.post_process(post_process.MustRun,
+ 'gsutil delete result for hash-of-presubmit'),
+ api.post_process(post_process.MustRun,
'gsutil delete result for hash-of-failure'),
api.post_process(post_process.StatusSuccess),
)
@@ -206,6 +220,7 @@
stdout=api.raw_io.output(CBUILD_RESULT_URLS)),
_cbuild_results('hash-of-success', True),
_cbuild_results('hash-of-regression', False),
+ _cbuild_results('hash-of-presubmit', False),
_cbuild_results('hash-of-failure', False),
api.post_process(post_process.MustRun,
'update gerrit for hash-of-success'),
@@ -233,6 +248,11 @@
'result': False,
'regression': True
}),
+ _cbuild_results('hash-of-presubmit', {
+ 'result': False,
+ 'regression': False,
+ 'presubmit': True
+ }),
_cbuild_results('hash-of-failure', {
'result': False,
'regression': False