Duplicate labels Keys in .woodpecker.yml — The Silent YAML Footgun
YAML has become the undisputed lingua franca of modern cloud infrastructure, powering Kubernetes manifests, GitHub Actions workflows, Docker Compose configurations, and Woodpecker CI pipelines. Its human-readable syntax and minimal punctuation make it appealing. However, YAML harbors subtle semantic traps that can cause severe production misconfigurations.
Among the most dangerous traps is duplicate dictionary keys. In many standard YAML parsers, defining the same mapping key twice within the same block does not produce a syntax error; instead, the parser silently overwrites the first key with the second. This silent behavior caused an agent affinity label to vanish in our CI pipeline, triggering unexpected out-of-memory crashes on our server.
Our self-hosted infrastructure spans two distinct Virtual Private Servers (VPS): a budget primary VPS (hosting Forgejo, Plane, and the portfolio origin) and a high-capacity secondary VPS (dedicated to resource-intensive Woodpecker Docker builds). In Woodpecker CI, step scheduling is controlled via agent labels: steps specify labels, and only runners matching those labels execute the work.