fn CLI update doesn't support annotation values that aren't JSON blobs
Closed this issue · 1 comments
gviedma-zz commented
According to https://github.com/fnproject/docs/blob/master/fn/develop/annotations.md it should be possible to specify an annotation value which is just a plain string. Currently, the CLI does not allow this, instead requiring that the value must be a parseable JSON string.
For example:
fn update function myapp myfn --annotation someannotation="foo"
fails with Unable to parse annotation value 'foo'. Annotations values must be valid JSON strings.
Performing the same operation using curl against the fn REST API succeeds however.
gviedma-zz commented
Turns out this is not an issue with the CLI but rather with the shell stripping out the quotes. Adapting the above example to:
fn update function myapp myfn --annotation someannotation='"foo"'
provides the right behavior.