-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flag variant attachment #685
Flag variant attachment #685
Conversation
* Extend flipt.proto to support attachment in variant * Extend DB with the new column * Extend UI to support the new field Co-authored-by: Kevin Ip <kevin.ip@paradigm.co>
85e878b
to
c04ceb4
Compare
* add json format and limit valiation for attachment * update DB migration scripts * add attachment column to variant table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far!
However, I think it's missing the attachment
field in the EvaluationResponse
to be useful.
I think you'll need to add the attachment
column in this SQL statement and also add VariantAttachment and set the value to the attachment of the variant that matches during evaluation
See these screenshots where there is no attachment
that comes back for the variant when there should be:
Co-authored-by: Mark Phelps <markphelps@github.com>
Looks awesome @kevin-ip ! Thanks for this. I'll check it out more thoroughly tonight and likely merge it and cut a release this week |
this test failure also brings up a good question, should we strip whitespace from the JSON on the server side? or UI side or both? |
I like it on the server side as we don't have to do it twice (server + UI). WDYT? |
@markphelps Just took a look and it seems the DB perform some beautification on the json. Think we couple options:
I like option 1 for the app will have consist result across different DBs. |
@kevin-ip yeah I agree that option 1 is the cleanest approach |
If we're comfortable saying the attachment must always be JSON, then it might be nice to have the attachment imported from / exported as YAML. It would make for more human readable/editable exports. |
@jalaziz good idea. I'll add this as a follow up PR before creating a release, I don't want to block the merging of this PR any longer than necessary |
@allcontributors please add @kevin-ip for code |
I've put up a pull request to add @kevin-ip! 🎉 |
@allcontributors please add @amayvs for code |
@amayvs already contributed before to code |
Extending variant to support attachment
closes #188