From 429c2d07a42592c25e54a611a00a0df530aca4dd Mon Sep 17 00:00:00 2001 From: Jeremy Bumsted Date: Fri, 23 Jun 2023 17:05:55 -0600 Subject: [PATCH 1/3] Update api parity docs and update graphQL cookbook --- pages/apis/api_differences.md | 1 + pages/apis/graphql/graphql_cookbook.md | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/pages/apis/api_differences.md b/pages/apis/api_differences.md index 5d1a9b8823..d4070dc79c 100644 --- a/pages/apis/api_differences.md +++ b/pages/apis/api_differences.md @@ -24,6 +24,7 @@ On this page, we've collected the known limitation where some API features are o * <%= pill "BUILDS", "builds" %> [Get all environment variables set on a build](/docs/apis/graphql/graphql-cookbook#builds-get-all-environment-variables-set-on-a-build). * <%= pill "BUILDS", "builds" %> [Increase the next build number](/docs/apis/graphql/graphql-cookbook#builds-increase-the-next-build-number). * <%= pill "BUILDS", "builds" %> [Get build info by ID] (/docs/apis/graphql/graphql-cookbook#builds-get-build-info-by-id). +* <%= pill "BUILDS", "builds" %> [Get detailed retry info for jobs in a build](/docs/apis/graphq/graphql-cookbook#builds-get-job-retry-info-for-a-build) * <%= pill "JOBS", "jobs" %> [Get all jobs in a given queue for a given timeframe](/docs/apis/graphql/graphql-cookbook#jobs-get-all-jobs-in-a-given-queue-for-a-given-timeframe). * <%= pill "JOBS", "jobs" %> [Get all jobs in a particular concurrency group](/docs/apis/graphql/graphql-cookbook#jobs-get-all-jobs-in-a-particular-concurrency-group). * <%= pill "JOBS", "jobs" %> list job events. diff --git a/pages/apis/graphql/graphql_cookbook.md b/pages/apis/graphql/graphql_cookbook.md index cbb4ad49b6..b55ed36dec 100644 --- a/pages/apis/graphql/graphql_cookbook.md +++ b/pages/apis/graphql/graphql_cookbook.md @@ -152,6 +152,29 @@ query GetBuilds { } ``` +### Get job retry info for a build + +Get the retry info for jobs in a given build, jobs retried [automatically](/docs/pipelines/command-step#retry-attributes) will return `nil` for `retriedBy`. + +```graphql +query GetJobRetryInfo { + build(slug:"organization-slug/pipeline-slug/build-number") { + jobs(first: 10, state:FINISHED) { + edges { + node { + ... on JobTypeCommand { + retriedBy{ + name + } + retryType + } + } + } + } + } +} +``` + ### Get all environment variables set on a build Retrieve all of a job's environment variables for a given build. This is the equivalent of what you see in the _Environment_ tab of each build. From 9a71d87822716c1e6d65a91c615d8c20f163eab2 Mon Sep 17 00:00:00 2001 From: Jeremy Bumsted Date: Fri, 30 Jun 2023 16:09:07 -0600 Subject: [PATCH 2/3] Update pages/apis/graphql/graphql_cookbook.md Co-authored-by: Michael Belton <119824349+mbelton-buildkite@users.noreply.github.com> --- pages/apis/graphql/graphql_cookbook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/apis/graphql/graphql_cookbook.md b/pages/apis/graphql/graphql_cookbook.md index b55ed36dec..5026baf173 100644 --- a/pages/apis/graphql/graphql_cookbook.md +++ b/pages/apis/graphql/graphql_cookbook.md @@ -154,7 +154,7 @@ query GetBuilds { ### Get job retry info for a build -Get the retry info for jobs in a given build, jobs retried [automatically](/docs/pipelines/command-step#retry-attributes) will return `nil` for `retriedBy`. +Get the retry info for jobs in a given build. Any jobs retried [automatically](/docs/pipelines/command-step#retry-attributes) will return `nil` for `retriedBy`. ```graphql query GetJobRetryInfo { From 88dd169f39efe9de9d4e5a8e0c4c7b357ec91cd8 Mon Sep 17 00:00:00 2001 From: Jeremy Bumsted Date: Fri, 30 Jun 2023 16:09:17 -0600 Subject: [PATCH 3/3] Update pages/apis/api_differences.md Co-authored-by: Michael Belton <119824349+mbelton-buildkite@users.noreply.github.com> --- pages/apis/api_differences.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/apis/api_differences.md b/pages/apis/api_differences.md index d4070dc79c..a91d098bac 100644 --- a/pages/apis/api_differences.md +++ b/pages/apis/api_differences.md @@ -24,7 +24,7 @@ On this page, we've collected the known limitation where some API features are o * <%= pill "BUILDS", "builds" %> [Get all environment variables set on a build](/docs/apis/graphql/graphql-cookbook#builds-get-all-environment-variables-set-on-a-build). * <%= pill "BUILDS", "builds" %> [Increase the next build number](/docs/apis/graphql/graphql-cookbook#builds-increase-the-next-build-number). * <%= pill "BUILDS", "builds" %> [Get build info by ID] (/docs/apis/graphql/graphql-cookbook#builds-get-build-info-by-id). -* <%= pill "BUILDS", "builds" %> [Get detailed retry info for jobs in a build](/docs/apis/graphq/graphql-cookbook#builds-get-job-retry-info-for-a-build) +* <%= pill "BUILDS", "builds" %> [Get detailed retry info for jobs in a build](/docs/apis/graphql/graphql-cookbook#builds-get-job-retry-info-for-a-build). * <%= pill "JOBS", "jobs" %> [Get all jobs in a given queue for a given timeframe](/docs/apis/graphql/graphql-cookbook#jobs-get-all-jobs-in-a-given-queue-for-a-given-timeframe). * <%= pill "JOBS", "jobs" %> [Get all jobs in a particular concurrency group](/docs/apis/graphql/graphql-cookbook#jobs-get-all-jobs-in-a-particular-concurrency-group). * <%= pill "JOBS", "jobs" %> list job events.