Fix CUE validation for boolean rollouts and null descriptions#5385
Fix CUE validation for boolean rollouts and null descriptions#5385markphelps wants to merge 3 commits intov2from
Conversation
|
👋 Hi @markphelps! Thanks for your contribution to this project. It looks like one or more of your commits are missing a DCO (Developer Certificate of Origin) sign-off. The DCO is a simple way for you to certify that you have the right to submit this code under the project's license. How to fix this: # For future commits, use the -s flag
git commit -s -m "Your commit message"
# To sign off on existing commits in this PR
git rebase HEAD~$(git rev-list --count origin/v2..HEAD) --signoff
git push --force-with-leaseThe 📋 View the failing DCO check for more details For more information about the DCO, visit: https://developercertificate.org/ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2 #5385 +/- ##
==========================================
+ Coverage 60.59% 60.63% +0.04%
==========================================
Files 138 138
Lines 13672 13672
==========================================
+ Hits 8284 8290 +6
+ Misses 4685 4680 -5
+ Partials 703 702 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@markphelps could we learn more about |
Added comprehensive tests to catch the bugs fixed in the CUE schema validation:
1. TestValidate_NullDescriptions: Verifies that null values are accepted
for description fields in namespaces, flags, variants, segments,
constraints, and rollouts. This would have caught the bug where the
schema was incorrectly rejecting null descriptions.
2. TestValidate_VariantFlagWithoutRollouts: Validates that variant flags
do not require the rollouts field. This would have caught the bug where
the unconditional #FlagBoolean | *{} pattern was incorrectly requiring
rollouts on all flag types.
Also updated existing test fixtures to explicitly declare type: BOOLEAN_FLAG_TYPE
for boolean flags, as the schema now properly enforces that only boolean flags
can have rollouts.
Signed-off-by: Mark Phelps <[email protected]>
Fixes: #5384