Add support for arbitrary JSON in attachments#259
Merged
Conversation
saary
commented
May 23, 2019
Codecov Report
@@ Coverage Diff @@
## master #259 +/- ##
==========================================
- Coverage 81.89% 81.87% -0.03%
==========================================
Files 26 26
Lines 1530 1528 -2
==========================================
- Hits 1253 1251 -2
+ Misses 209 208 -1
- Partials 68 69 +1
Continue to review full report at Codecov.
|
8 tasks
zhouzhuojie
reviewed
May 24, 2019
ec1deba to
e979450
Compare
Contributor
Author
|
@zhouzhuojie Thanks for the feedback. |
zhouzhuojie
reviewed
May 29, 2019
| return e, fmt.Errorf("all key/value pairs should be string/string. invalid attachment format %s", spew.Sdump(a)) | ||
| } | ||
| e[k] = s | ||
| return e, fmt.Errorf("Make sure JSON is properly formatted. Invalid attachment format %s", spew.Sdump(a)) |
Collaborator
There was a problem hiding this comment.
one last nit, JSON format actually supports things like naked string, number, or null. here we may want to say:
"Make sure JSON is properly formatted into key/value pairs."
Contributor
Author
There was a problem hiding this comment.
No problem, pushing a fix now if you want to take a quick look
zhouzhuojie
approved these changes
May 30, 2019
kgeorgiou
added a commit
to kgeorgiou/flagr
that referenced
this pull request
Jul 27, 2019
Update Dynamic Configuration section to match the variant attachment format updates introduced in openflagr#259.
8 tasks
kgeorgiou
added a commit
to kgeorgiou/flagr
that referenced
this pull request
Aug 8, 2019
Update Dynamic Configuration section to match the variant attachment format updates introduced in openflagr#259.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow storing arbitrary JSON structures within variants' attachment field
Description
Update the Attachment field type from map[string]string to map[string]interface{}
Motivation and Context
Enable using flagr as a smart general configuration store and remove hacks that use strings in order to store structured data
How Has This Been Tested?
The existing tests were updated to accommodate for this change
Types of changes
Checklist: