From 6df14e2c00ce11fd24bd3ba85c180791b436d32f Mon Sep 17 00:00:00 2001 From: Chris Burns <29541485+ChrisJBurns@users.noreply.github.com> Date: Tue, 21 Apr 2026 21:22:35 +0100 Subject: [PATCH] Enforce v1beta1 API stability Flip the advisory CRD Schema Compatibility check (added in #4980 and repaired in #4987) into an enforcing check, and document the contract. Three pieces: 1. Workflow: drop continue-on-error, add an if: guard on the job that skips the check when the api-break-allowed label is applied. A skipped required-check counts as passing for branch protection, so the label is the only path through for an intentional break. Update the header comment and step summary heading to drop the "Phase 1: advisory" framing. 2. CONTRIBUTING.md: add a new "API Stability" top-level section with the v1beta1 stability contract (no field removal, type change, new required fields, validation narrowing, finalizer rename, spec.scope flip, un-serving a served version). Separate subsection documents the api-break-allowed escape hatch and the maintainer-coordination expectations. 3. PR template: add an "API Compatibility" section after Test plan that prompts contributors to describe the break + migration path when the label is applied. Section is standing (GitHub templates don't support conditional rendering) but the wording makes the N/A-for-non-breaking-PRs case explicit via the checkbox. Post-merge maintainer actions (not code, can't be automated from a PR): create the api-break-allowed GitHub label, and add "CRD Schema Compatibility" to the required status checks in branch protection for main. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/pull_request_template.md | 19 ++++++++++++++++ .github/workflows/api-compat.yml | 18 +++++++++------ CONTRIBUTING.md | 38 ++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 7 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 8fe497db20..8a69e2dc01 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -42,6 +42,25 @@ describe exactly what you tested below the checkbox. - [ ] Linting (`task lint-fix`) - [ ] Manual testing (describe below) +## API Compatibility + + + +- [ ] This PR does not break the `v1beta1` API, OR the `api-break-allowed` label is applied and the migration guidance is described above. + ## Changes