buildkite / feedback

Got feedback? Please let us know!
https://buildkite.com
25 stars 24 forks source link

REST API does not allow setting of pipeline step parallelism #399

Closed haines closed 6 years ago

haines commented 6 years ago

The parallelism field on pipeline steps is exposed to GET and returned if set via the UI. However, it is always set to null after POST or PATCHing a pipeline.

curl \
  -fsS \
  -X PATCH \
  -H "Authorization: Bearer $BUILDKITE_API_ACCESS_TOKEN" \
  https://api.buildkite.com/v2/organizations/haines/pipelines/test \
  -d @- \
  <<JSON \
  | jq '.steps[]'
{
  "steps": [
    {
      "type": "script",
      "command": "echo 'Hello, world!",
      "parallelism": 42
    }
  ]
}
JSON
{
  "type": "script",
  "name": null,
  "command": "echo 'Hello, world!",
  "artifact_paths": null,
  "branch_configuration": null,
  "env": {},
  "timeout_in_minutes": null,
  "agent_query_rules": [],
  "concurrency": null,
  "parallelism": null
}
sj26 commented 6 years ago

Oops, sorry, this property used to be called parallel_jobs and the REST API currently only accepts it via that name, despite outputting it as parallelism. I'll see if we can also make parallelism work as well.

haines commented 6 years ago

Awesome, thanks! I will use parallel_jobs in the meantime 😄

toolmantim commented 6 years ago

This is now live! 🎉

haines commented 6 years ago

All working as expected now, thanks!