Skip to content

Fix CUE validation for boolean rollouts and null descriptions#5385

Open
markphelps wants to merge 3 commits intov2from
fix/issue-5384-validate-schema
Open

Fix CUE validation for boolean rollouts and null descriptions#5385
markphelps wants to merge 3 commits intov2from
fix/issue-5384-validate-schema

Conversation

@markphelps
Copy link
Collaborator

Fixes: #5384

@markphelps markphelps requested a review from a team as a code owner February 12, 2026 15:40
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 12, 2026
@github-actions
Copy link
Contributor

👋 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-lease

The -s flag adds this line to your commit message:
Signed-off-by: Your Name <[email protected]>

📋 View the failing DCO check for more details

For more information about the DCO, visit: https://developercertificate.org/

@dosubot
Copy link

dosubot bot commented Feb 12, 2026

Related Documentation

Checked 4 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.63%. Comparing base (13d1ead) to head (36f42ee).
⚠️ Report is 2 commits behind head on v2.

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     
Flag Coverage Δ
integrationtests 34.40% <ø> (+0.06%) ⬆️
unittests 52.06% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erka
Copy link
Contributor

erka commented Feb 12, 2026

@markphelps could we learn more about description: null before merging this please?

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]>
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Feb 12, 2026
@erka erka added the v2 Flipt v2 label Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. v2 Flipt v2

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

# [Bug]: flipt validate rejects valid BOOLEAN_FLAG_TYPE flags with rollouts and null descriptions

2 participants