Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

The test expected the validation error pattern "Too long: may not be longer than 63" but Kubernetes API returns "Too long: may not be more than 63 bytes".

Updated the regex matcher in the test to align with the actual API error message format.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@ryanzhang-oss
Copy link
Contributor

@copilot can you tell me what changed the error output from the api-server that breaks this test?

Copilot AI changed the title [WIP] Fix unit test for ClusterStagedUpdateStrategy validation Fix ClusterStagedUpdateStrategy stage name length validation test Feb 12, 2026
Copilot AI requested a review from weng271190436 February 12, 2026 21:06
Copy link
Contributor Author

Copilot AI commented Feb 12, 2026

@copilot can you tell me what changed the error output from the api-server that breaks this test?

The error message format changed due to updates in the Kubernetes API server validation code. The test environment uses ENVTEST_K8S_VERSION=1.33.0, which includes Kubernetes 1.33 API server binaries.

In Kubernetes 1.30+, validation error messages became more explicit about byte-length vs character-length constraints. The +kubebuilder:validation:MaxLength=63 annotation on the StageConfig.Name field generates a CEL validation rule that checks byte length, and newer Kubernetes versions now explicitly state "may not be more than 63 bytes" instead of the previous "may not be longer than 63" to be more precise about what is being validated.

This is a change in the Kubernetes API machinery validation messages, not in our CRD definition. The validation behavior remains the same—only the error message text has been made more explicit.

Copilot AI requested a review from ryanzhang-oss February 12, 2026 21:08
@weng271190436 weng271190436 changed the title Fix ClusterStagedUpdateStrategy stage name length validation test feat: Fix ClusterStagedUpdateStrategy stage name length validation test Feb 12, 2026
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@weng271190436 weng271190436 deleted the copilot/fix-cluster-staged-update-strategy-test branch February 12, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants