From a6f76047fcbce48a1f2e73e404aab2e9cfed586b Mon Sep 17 00:00:00 2001 From: Chris Burns <29541485+ChrisJBurns@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:18:51 +0100 Subject: [PATCH] TEST: add required field to MCPGroupSpec (do not merge) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a deliberately-breaking change to MCPGroupSpec: a new required field TestBreakingChange. This is a test PR to validate that the api-compat.yml workflow from #4980 correctly flags new-required-field additions as breaking against the v0.23.0 baseline. Expected outcome: - crd-schema-check step reports "Incompatible or Unknown" with a NoNewRequiredFields error on mcpgroups.toolhive.stacklok.dev. - Phase 1 continue-on-error means the job's failure does NOT block the PR — the finding lives in the step summary only. DO NOT MERGE. Close once the check has been demonstrated. Co-Authored-By: Claude Opus 4.7 (1M context) --- cmd/thv-operator/api/v1beta1/mcpgroup_types.go | 6 ++++++ .../crds/toolhive.stacklok.dev_mcpgroups.yaml | 16 ++++++++++++++++ .../toolhive.stacklok.dev_mcpgroups.yaml | 16 ++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/cmd/thv-operator/api/v1beta1/mcpgroup_types.go b/cmd/thv-operator/api/v1beta1/mcpgroup_types.go index a151448943..c44b31f78c 100644 --- a/cmd/thv-operator/api/v1beta1/mcpgroup_types.go +++ b/cmd/thv-operator/api/v1beta1/mcpgroup_types.go @@ -12,6 +12,12 @@ type MCPGroupSpec struct { // Description provides human-readable context // +optional Description string `json:"description,omitempty"` + + // TestBreakingChange is deliberately added as a required field to validate + // that api-compat.yml flags new-required-field additions as breaking. + // Do NOT merge this PR — see PR description. + // +kubebuilder:validation:Required + TestBreakingChange string `json:"testBreakingChange"` } // MCPGroupStatus defines observed state diff --git a/deploy/charts/operator-crds/files/crds/toolhive.stacklok.dev_mcpgroups.yaml b/deploy/charts/operator-crds/files/crds/toolhive.stacklok.dev_mcpgroups.yaml index 4270eb0334..78e2c29dd1 100644 --- a/deploy/charts/operator-crds/files/crds/toolhive.stacklok.dev_mcpgroups.yaml +++ b/deploy/charts/operator-crds/files/crds/toolhive.stacklok.dev_mcpgroups.yaml @@ -62,6 +62,14 @@ spec: description: description: Description provides human-readable context type: string + testBreakingChange: + description: |- + TestBreakingChange is deliberately added as a required field to validate + that api-compat.yml flags new-required-field additions as breaking. + Do NOT merge this PR — see PR description. + type: string + required: + - testBreakingChange type: object status: description: MCPGroupStatus defines observed state @@ -216,6 +224,14 @@ spec: description: description: Description provides human-readable context type: string + testBreakingChange: + description: |- + TestBreakingChange is deliberately added as a required field to validate + that api-compat.yml flags new-required-field additions as breaking. + Do NOT merge this PR — see PR description. + type: string + required: + - testBreakingChange type: object status: description: MCPGroupStatus defines observed state diff --git a/deploy/charts/operator-crds/templates/toolhive.stacklok.dev_mcpgroups.yaml b/deploy/charts/operator-crds/templates/toolhive.stacklok.dev_mcpgroups.yaml index 5a072011b2..4c9170a41b 100644 --- a/deploy/charts/operator-crds/templates/toolhive.stacklok.dev_mcpgroups.yaml +++ b/deploy/charts/operator-crds/templates/toolhive.stacklok.dev_mcpgroups.yaml @@ -65,6 +65,14 @@ spec: description: description: Description provides human-readable context type: string + testBreakingChange: + description: |- + TestBreakingChange is deliberately added as a required field to validate + that api-compat.yml flags new-required-field additions as breaking. + Do NOT merge this PR — see PR description. + type: string + required: + - testBreakingChange type: object status: description: MCPGroupStatus defines observed state @@ -219,6 +227,14 @@ spec: description: description: Description provides human-readable context type: string + testBreakingChange: + description: |- + TestBreakingChange is deliberately added as a required field to validate + that api-compat.yml flags new-required-field additions as breaking. + Do NOT merge this PR — see PR description. + type: string + required: + - testBreakingChange type: object status: description: MCPGroupStatus defines observed state