From d28d4bb735ebacbee9792a42a9bc0e083156edbc Mon Sep 17 00:00:00 2001 From: Samuel Cochran Date: Wed, 15 Nov 2023 14:01:48 -0800 Subject: [PATCH 1/3] Document run `state` and `result` --- pages/apis/rest_api/analytics/runs.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/apis/rest_api/analytics/runs.md b/pages/apis/rest_api/analytics/runs.md index 57013816b2..606d13f5b3 100644 --- a/pages/apis/rest_api/analytics/runs.md +++ b/pages/apis/rest_api/analytics/runs.md @@ -14,6 +14,8 @@ curl "https://api.buildkite.com/v2/analytics/organizations/{org.slug}/suites/{su "id": "64374307-12ab-4b13-a3f3-6a408f644ea2", "branch": "main", "commit_sha": "1c3214fcceb2c14579a2c3c50cd78f1442fd8936", + "state": "finished", + "result": "passed", "url": "https://api.buildkite.com/v2/analytics/organizations/my_great_org/suites/my_suite_slug/runs/64374307-12ab-4b13-a3f3-6a408f644ea2", "web_url": "https://buildkite.com/organizations/my_great_org/analytics/suites/my_suite_slug/runs/64374307-12ab-4b13-a3f3-6a408f644ea2", "created_at": "2023-06-25T05:32:53.228Z" @@ -36,6 +38,8 @@ curl "https://api.buildkite.com/v2/analytics/organizations/{org.slug}/suites/{su "id": "64374307-12ab-4b13-a3f3-6a408f644ea2", "branch": "main", "commit_sha": "1c3214fcceb2c14579a2c3c50cd78f1442fd8936", + "state": "finished", + "result": "passed", "url": "https://api.buildkite.com/v2/analytics/organizations/my_great_org/suites/my_suite_slug/runs/64374307-12ab-4b13-a3f3-6a408f644ea2", "web_url": "https://buildkite.com/organizations/my_great_org/analytics/suites/my_suite_slug/runs/64374307-12ab-4b13-a3f3-6a408f644ea2", "created_at": "2023-06-25T05:32:53.228Z" @@ -45,3 +49,7 @@ curl "https://api.buildkite.com/v2/analytics/organizations/{org.slug}/suites/{su Required scope: `read_suites` Success response: `200 OK` + +Runs are created with a `state` of `running` and proceed to `finished` when all uploads have been processed. The run may return to `running` if additional results are uploaded. + +`result` starts as `pending` and may proceed to `passed` or `failed` once finished. If a run does not complete within a reasonable time period it may also proceed to `stale`. `result` may change back to `pending` or change between `passed` and `failed` if additional results are uploaded. From 9909bb84c1004be8b3fdd6402fa67a733849176f Mon Sep 17 00:00:00 2001 From: Samuel Cochran Date: Wed, 15 Nov 2023 16:24:09 -0800 Subject: [PATCH 2/3] Better words describing run results Co-authored-by: niceking --- pages/apis/rest_api/analytics/runs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/apis/rest_api/analytics/runs.md b/pages/apis/rest_api/analytics/runs.md index 606d13f5b3..1207205168 100644 --- a/pages/apis/rest_api/analytics/runs.md +++ b/pages/apis/rest_api/analytics/runs.md @@ -52,4 +52,4 @@ Success response: `200 OK` Runs are created with a `state` of `running` and proceed to `finished` when all uploads have been processed. The run may return to `running` if additional results are uploaded. -`result` starts as `pending` and may proceed to `passed` or `failed` once finished. If a run does not complete within a reasonable time period it may also proceed to `stale`. `result` may change back to `pending` or change between `passed` and `failed` if additional results are uploaded. +Run `result` starts as `pending` and will proceed to `passed` or `failed` when at least one test result has been processed. The presence of a `passed` or `failed` result does not indicate that the run has finished processing. `result` may change from `passed` to `failed` if additional results are uploaded. The `result` is `failed` when there is at least one failing test in the run, and it is not possible for `result` to change from `failed`. From 4959148789ed29e907ea12a9a91a03756a650a74 Mon Sep 17 00:00:00 2001 From: Samuel Cochran Date: Wed, 15 Nov 2023 16:28:13 -0800 Subject: [PATCH 3/3] Re-add stale as a potential result --- pages/apis/rest_api/analytics/runs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/apis/rest_api/analytics/runs.md b/pages/apis/rest_api/analytics/runs.md index 1207205168..f2828cb046 100644 --- a/pages/apis/rest_api/analytics/runs.md +++ b/pages/apis/rest_api/analytics/runs.md @@ -52,4 +52,4 @@ Success response: `200 OK` Runs are created with a `state` of `running` and proceed to `finished` when all uploads have been processed. The run may return to `running` if additional results are uploaded. -Run `result` starts as `pending` and will proceed to `passed` or `failed` when at least one test result has been processed. The presence of a `passed` or `failed` result does not indicate that the run has finished processing. `result` may change from `passed` to `failed` if additional results are uploaded. The `result` is `failed` when there is at least one failing test in the run, and it is not possible for `result` to change from `failed`. +Run `result` starts as `pending` and will proceed to `passed` or `failed` when at least one test result has been processed. The presence of a `passed` or `failed` result does not indicate that the run has finished processing. `result` may change from `passed` to `failed` if additional results are uploaded. The `result` is `failed` when there is at least one failing test in the run, and it is not possible for `result` to change from `failed`. If a run receives no results within a reasonable time period its `result` will proceed to `stale`.