fix: FeatureFlag update validation bad state#790
Conversation
Signed-off-by: Yosiah de Koeyer <dev@yosiahdekoeyer.dev>
Signed-off-by: Yosiah de Koeyer <dev@yosiahdekoeyer.dev>
Summary of ChangesHello @Y0sh1dk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical bug in the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Signed-off-by: Yosiah de Koeyer <dev@yosiahdekoeyer.dev>
There was a problem hiding this comment.
Code Review
This pull request correctly fixes a critical bug in the FeatureFlag update validation logic by ensuring the new object state is validated instead of the old one. The code changes are clean and the addition of end-to-end tests for the update scenario is a great improvement. My review focuses on refining the new test case to ensure it is accurate and maintainable.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #790 +/- ##
===========================================
- Coverage 86.51% 72.33% -14.19%
===========================================
Files 19 30 +11
Lines 1587 1923 +336
===========================================
+ Hits 1373 1391 +18
- Misses 173 484 +311
- Partials 41 48 +7
... and 25 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:
|
Signed-off-by: Yosiah de Koeyer <dev@yosiahdekoeyer.dev>
This PR
Fixes an issue where
FeatureFlagCR update validation is validating the old object, not the new object. This results inFeatureFlagCRs getting into a bad state that cannot be recovered from without disabling the validation and fixing the CR.Changes
newObjinstead ofoldObjforFeatureFlagupdatesHow to test
Before:
FeatureFlagCRoldObj)FeatureFlagCR is now in a bad state and cannot be updated againAfter:
FeatureFlagCR