buildkite / pipeline-schema

A JSON schema for Buildkite’s pipeline file format
MIT License
31 stars 35 forks source link

Duplicate step keys pass validation but fail upload #60

Open lucylura opened 1 year ago

lucylura commented 1 year ago

Consider the following example pipeline with duplicate step keys:

---
steps:
- key: my_duplicate_step_key
  label: ":bash: Hello World One"
  agents:
    queue: my-queue
  command: echo "hello world"
- key: my_duplicate_step_key
  label: ":bash: Hello World Two"
  agents:
    queue: my-queue
  command: echo "hello world again"

Validating this pipeline against the schema does not raise any issues.

However, when attempting to upload the pipeline to Buildkite, an error will be presented:

Failed to upload and process pipeline: Pipeline upload rejected: 
The key "my_duplicate_step_key" has already been used by another step in this build