Closed geuis closed 5 years ago
@sj26 got back to me on Slack. Re-posting his reply as the answer here:
Sorry for that, to maintain backwards compatibility we didn't want to add retried jobs into the responses unless opted in. You can add `include_retried_jobs=true` in the params to include them.
Accessing a build via the api returns the list of jobs in that build:
BK will attempt to run a job up to 3x automatically when the job fails.
However, in the list of jobs that is returned none of the jobs that failed are listed. Only the job id of the last successful retry is included. The
retries_count
value is incremented however.If you view the build via the web url, the jobs and their retries are grouped together and all of the logs for both failed and successful retries are accessible.
If the job id of one of the failed jobs is used in the api call for an individual job's log, that data is available in the api.
Also, none of the
state
query string filters listed for/builds
seems to work for individual/builds/{buildId}
end points. https://buildkite.com/docs/apis/rest-api/builds#list-builds-for-a-pipeline. If all job indices would be included andstate
filtering worked, it would allow easy filtering of jobs based on need.What's needed: The job id's of all retries should be available in the api call.