CNTRLPLANE-4004: test(envtest): add CEL validation tests for AWS resource tag types - #9375
CNTRLPLANE-4004: test(envtest): add CEL validation tests for AWS resource tag types#9375michaelryanmcneill wants to merge 1 commit into
Conversation
Adds envtest coverage for the XValidation regex rules on tag key/value fields introduced by the per-tag overridePolicy feature. Tests cover HostedCluster (overridePolicy Allow/Deny/unset + invalid key/value), NodePool (valid tags + invalid key/value), and AWSEndpointService (invalid key/value). Signed-off-by: michaelryanmcneill <michael@michaelryanmcneill.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@michaelryanmcneill: This pull request references CNTRLPLANE-4004 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.1.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (3)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: michaelryanmcneill The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9375 +/- ##
==========================================
+ Coverage 45.97% 46.03% +0.06%
==========================================
Files 781 781
Lines 98056 98181 +125
==========================================
+ Hits 45079 45200 +121
- Misses 49905 49910 +5
+ Partials 3072 3071 -1 see 8 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/verified by envtest-ocp |
|
@michaelryanmcneill: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@michaelryanmcneill: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What this PR does / why we need it:
Adds CEL validation envtests for the AWS resource tag XValidation regex rules introduced in #9152. These tests run against Kubernetes 1.30–1.35 via the envtest framework to ensure the tag key/value regex constraints are enforced at the CRD level across supported versions.
10 new tests across 3 CRDs:
Which issue(s) this PR fixes:
Fixes CNTRLPLANE-4004
Special notes for your reviewer:
Follow-up to #9152 which split
AWSResourceTaginto per-API types (AWSClusterResourceTag,AWSNodePoolResourceTag,AWSEndpointServiceResourceTag) and added per-tagoverridePolicy. That PR added the XValidation rules but did not include envtest coverage — this PR fills that gap.Negative tests use
!(key) and#(value) as invalid characters to trigger the regex rejection:"key must only contain letters, digits, and the characters _ . : / = + - @".Checklist: