[Bug]: export fails on variant flag with no rules
Bug Description
If you create a variant flag that does not have rules yet, the export will error out with
wrong format for rule segments
Version Info
1.48.1
Search
- [X] I searched for other open and closed issues before opening this
Steps to Reproduce
- create a variant flag
- export
Expected Behavior
The export should work even if there are no rules attached
Additional Context
No response
Hi @danilobuerger. Thank you for your bug report
I can't repo the problem with your steps. This issue could happen when some rule has the reference to the deleted segment. This most-likely is related to #2403.
I am having the same error, but somehow I am unable to find a rule that references a deleted segment (probably because no segment was ever deleted). So what to do in such a case?
@PlkMarudny Thank you for the report. Could you please provide an example file which reproduces the issue you have? We really want to find and fix this issue.
Sure, will flipt.db do the trick?
Yep, it will do the trick. Could you please tell us the version of Flipt you are using as well?
1.47.1
Sorry @erka . I forgot to answer. My issue was indeed caused by https://github.com/flipt-io/flipt/issues/2403
@PlkMarudny thank you for sharing this with us.
Just a heads up. There are two flags agency(one rule 8fa497aa-74c9-41fd-bb34-6e288626669b) and content_type(two rules 228724f7-dce9-4e53-9dc5-0dadce2abb0e and 8a698eb0-016e-453d-88ab-d646f4c7fcea) which are broken. Both have rules without segments. The weird thing is that UI doesn't display those rules and it looks like everything is correct. The only insight that something is out of order that content_type flag is missing rule number 5.
@danilobuerger What database do you use for Flipt?
@danilobuerger @PlkMarudny I have addressed the root cause of this issue with #3552. Additionally, I enhanced the error message for the export command and improved the user interface to better display the problem, facilitating easier identification and resolution. Unfortunately, I am unable to resolve the database inconsistency. I apologize for any inconvenience this may have caused.
No problem, I understand. Thanks for that.
On Tue, Oct 22, 2024, 00:13 Roman Dmytrenko @.***> wrote:
@danilobuerger https://github.com/danilobuerger @PlkMarudny https://github.com/PlkMarudny I have addressed the root cause of this issue with ticket #3552 https://github.com/flipt-io/flipt/pull/3552. Additionally, I enhanced the error message for the export command and improved the user interface to better display the problem, facilitating easier identification and resolution. Unfortunately, I am unable to resolve the database inconsistency. I apologize for any inconvenience this may have caused.
— Reply to this email directly, view it on GitHub https://github.com/flipt-io/flipt/issues/3417#issuecomment-2427627784, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBI255TIMEWNURMW4U7YMLZ4VN47AVCNFSM6AAAAABNMPDL2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRXGYZDONZYGQ . You are receiving this because you were mentioned.Message ID: @.***>
Thats awesome, thanks for fixing it!