-
Notifications
You must be signed in to change notification settings - Fork 10
feat: openfeature pull
command
#79
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
base: main
Are you sure you want to change the base?
feat: openfeature pull
command
#79
Conversation
7583c17
to
7bd1a4f
Compare
7bd1a4f
to
d113d0f
Compare
I think it would be good to add some tests - there is an in memory filesystem in generate_test.go so it could be used and probably faking network should not be that hard. |
4492e4a
to
18e5f24
Compare
@dominikhaska added a couple of tests for the |
18e5f24
to
c713693
Compare
this is looking great, thanks! I was also ideating on a pull command too, and had wondered what kind of sources we might pull from. |
I was thinking about that too. Perhaps we could do something similar to flagd where we accept a |
internal/flagset/flagset.go
Outdated
} | ||
|
||
var sourceFlags []SourceFlag |
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.
I think the flag source object should look like this:
{
"flags": [
{
"key" "test",
"type": "boolean",
"defaultValue": false
}
]
}
This will allow us to add additional top-level properties without requiring a breaking change.
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.
Do you mean the source should return with a top level flags
property or when we unmarshal the data to pass around a data object that has the flags
property?
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.
The source is what I had in mind.
c713693
to
7ba5c1c
Compare
d55ec78
to
82da5e3
Compare
82da5e3
to
d048ffa
Compare
…pull command Signed-off-by: Jason Salaber <jcsalaber@hotmail.com>
Signed-off-by: Jason Salaber <jcsalaber@hotmail.com>
Signed-off-by: Jason Salaber <jcsalaber@hotmail.com>
Signed-off-by: Jason Salaber <jcsalaber@hotmail.com>
Signed-off-by: Jason Salaber <jcsalaber@hotmail.com>
d048ffa
to
e4adc07
Compare
Summary
init
command creates a.openfeature.yaml
to storeflagSourceUrl
using the--flag-source-url
pull
command that fetches a flag configuration from aflagSourceUrl
configured in theinit
commandpull
command prompts the user for default values if the source configuration doesn't define default valuesfile://
orhttps://
Related Issues
#3
Notes
Load
function from flagset due to circular dependency when trying to useflagset
type in the manifest packageLoadFromSourceFlags
takes the type from a source configuration and compares it to different types that could match, e.g.Boolean
,bool
,boolean
Todo
pull command