Skip to content

Support loading template parameter values from file - #10952

Closed
mmilata wants to merge 1 commit into
openshift:masterfrom
mmilata:template-parameter-files
Closed

mmilata wants to merge 1 commit into
openshift:masterfrom
mmilata:template-parameter-files

Conversation

@mmilata

@mmilata mmilata commented Sep 16, 2016

Copy link
Copy Markdown
Contributor

Fixes #10687.


Normal way of setting template parameters by passing the value on the command line:

oc process template KEY=VAL
oc process template --value KEY=VAL
oc new-app template --param KEY=VAL

To load the parameter value from file.txt instead:

oc process template [email protected]
oc process template --value [email protected]
oc new-app template --param [email protected]

@mmilata

mmilata commented Sep 16, 2016

Copy link
Copy Markdown
Contributor Author

WIP - would like to add some tests.

@smarterclayton

Copy link
Copy Markdown
Contributor

Hrm - the @ syntax is unusual. How is it better than KEY=$( cat FILE )?

@liggitt

liggitt commented Sep 16, 2016

Copy link
Copy Markdown
Contributor

plumbing binary content or content with newlines through shell args is... not great

I imagine the @file came from curl:

-d, --data
If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want curl to read the data from stdin.

@smarterclayton

Copy link
Copy Markdown
Contributor

At first I was expecting this to be oc process --param-file FILE with the file in env var stable key-value format.

@mmilata
mmilata force-pushed the template-parameter-files branch from 8335fc4 to 8fb0c61 Compare September 16, 2016 13:46
@mmilata

mmilata commented Sep 16, 2016 •

Copy link
Copy Markdown
Contributor Author

@smarterclayton The pflag library seems to be unable to handle multiline arguments. Also we try to support passing multiple variables separated by commas: --param FOO=BAR,ABC=XYZ, which is a problem if shell expands $(cat FILE) to something that contains comma.

edit: colon -> comma

@mmilata
mmilata force-pushed the template-parameter-files branch from 8fb0c61 to 745de66 Compare September 16, 2016 14:35
@smarterclayton

Copy link
Copy Markdown
Contributor

We are removing support for --param A=B,C=D - it was never supposed to work that way. To specify multiple parameters you should be using --param A=B --param C=D

@mmilata
mmilata force-pushed the template-parameter-files branch from 745de66 to 440ee51 Compare September 19, 2016 10:38
Comment thread pkg/generate/app/cmd/template.go Outdated
err = errors.NewAggregate(errs)
return nil, fmt.Errorf("error processing template %s: %v", name, err)
if decode {
if errs := runtime.DecodeList(result.Objects, kapi.Codecs.UniversalDecoder()); len(errs) > 0 {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure what this does. However when I change oc process to do the decoding and then run it on this template the result is:

apiVersion: v1
items:
- FullName: ""
  Groups: null
  Identities: null
  creationTimestamp: null
  name: somename
kind: List
metadata: {}

Instead of:

apiVersion: v1
items:
- apiVersion: v1
  kind: User
  metadata:
    name: somename
kind: List
metadata: {}

What am I missing?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean by change oc process to do the decoding? this code here is just validating that the objects are valid and reporting errors if not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In current master, oc new-app calls runtime.DecodeList on the list of objects that is returned by the API endpoint /oapi/v1/namespaces/{namespace}/processedtemplates, oc process does not call this function.

When I modify oc process to call this function on the list of objects received from server and then run oc process -f test/testdata/template_required_params.yaml -v required_param=foo it gives me the first snippet which looks wrong.

I guess my question is what does this function do? It doesn't seem to only validate the objects since it overwrites the items in the slice passed to it as the first argument.

@bparees bparees Sep 20, 2016 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// DecodeList alters the list in place, attempting to decode any objects found in
// the list that have the Unknown type. Any errors that occur are returned
// after the entire list is processed. Decoders are tried in order.
func DecodeList(objects []Object, decoders ...Decoder) []error {

sounds like it is attempting to determine the actual api object type of each Object in the list, to convert it from a generic "unknown" to a specific type. Which might explain why the additional fields appear after you run something through it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, looks like runtime.DecodeList really is innocent here. Will update PR once I figure out what's wrong.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the invalid output is caused by the k8s printing machinery (kubectl.GetPrinter/kubectl.NewVersionedPrinter) which doesn't know about User objects as it is currently initialized.

It's probably better not to use DecodeList in oc process to keep the output format. For example it currently outputs

apiVersion: v1
items:
- apiVersion: v1
  kind: User
  metadata:
    name: somename
kind: List
metadata: {}

However if it used DecodeList (and changes were made to print User objects correctly) the output would look like this, with extra entries that weren't in the original template:

apiVersion: v1
items:
- apiVersion: v1
  groups: null
  identities: null
  kind: User
  metadata:
    creationTimestamp: null
    name: somename
kind: List
metadata: {}

@mmilata

mmilata commented Sep 19, 2016

Copy link
Copy Markdown
Contributor Author

Oh, that reduces the usefulness of this change quite a bit. Still it removes a bunch of duplicate code so at least that part could be merged?

@bparees or @mfojtik can you take a look? I've written comment inline regarding something I don't understand.

@mmilata mmilata changed the title [WIP] Support loading template parameter values from file Support loading template parameter values from file Sep 19, 2016
@bparees

bparees commented Sep 19, 2016

Copy link
Copy Markdown
Contributor

At first I was expecting this to be oc process --param-file FILE with the file in env var stable key-value format.

that's a different feature that's coming (on the trello backlog anyway)

@mmilata
mmilata force-pushed the template-parameter-files branch from 440ee51 to 9849fcb Compare September 20, 2016 15:41
@mmilata

mmilata commented Sep 20, 2016

Copy link
Copy Markdown
Contributor Author

Force-pushed new version, please review.

Comment thread pkg/cmd/cli/cmd/process.go Outdated
cmd.Flags().StringP("filename", "f", "", "Filename or URL to file to read a template")
cmd.MarkFlagFilename("filename", "yaml", "yml", "json")
cmd.Flags().StringSliceP("value", "v", nil, "Specify a list of key-value pairs (eg. -v FOO=BAR,BAR=FOO) to set/override parameter values")
cmd.Flags().StringSliceP("value", "v", nil, "Specify a list of key-value pairs (eg. -v FOO=BAR,BAR=FOO) to set/override parameter values. Use FOO@path/to/file to load value from file.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while we're in here, let's update this to "specify a key-value pair(eg -v FOO=BAR) to........." so we stop promoting the comma syntax.

Comment thread pkg/cmd/util/env.go Outdated
errs = append(errs, err)
continue
}
env[k] = string(value)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be checking for duplicate key names here too right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops ... right.

Comment thread pkg/cmd/util/env.go Outdated
return env, duplicates, errs
}

func ParseEnvironmentArgumentsFiles(s []string) (Environment, []string, []error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ParseEnvironmentArguments"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok i see why you used a new name... how about ParseEnvironmentArgumentsWithFileValues. or update the existing helper to take a boolean arg that indicates if it should tolerate the @file syntax or not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can update the existing helper, wasn't sure if such boolean arguments are acceptable style (haven't seen them much in the the codebase).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's ok with me.

if len(duplicates) > 0 {
return kcmdutil.UsageError(cmd, fmt.Sprintf("The following values were provided more than once: %s", strings.Join(duplicates, ", ")))
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this block up to just below where you processed the valueArgs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, I've also moved the block that checks for incompatible options to the very beginning so that the error behavior doesn't change too much.

@mmilata
mmilata force-pushed the template-parameter-files branch from 9849fcb to 4d3849b Compare September 21, 2016 10:36
@mmilata

mmilata commented Sep 21, 2016

Copy link
Copy Markdown
Contributor Author

Updated, PTAL.

@bparees bparees self-assigned this Sep 21, 2016
Comment thread pkg/cmd/cli/cmd/newapp.go Outdated
cmd.Flags().StringSliceVarP(&config.TemplateFiles, "file", "f", config.TemplateFiles, "Path to a template file to use for the app.")
cmd.MarkFlagFilename("file", "yaml", "yml", "json")
cmd.Flags().StringSliceVarP(&config.TemplateParameters, "param", "p", config.TemplateParameters, "Specify a list of key value pairs (e.g., -p FOO=BAR,BAR=FOO) to set/override parameter values in the template.")
cmd.Flags().StringSliceVarP(&config.TemplateParameters, "param", "p", config.TemplateParameters, "Specify a key value pair (e.g., -p FOO=BAR) to set/override parameter value in the template. Use FOO@path/to/file to load value from file.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to load the value from a file"

Comment thread pkg/cmd/cli/cmd/process.go Outdated
cmd.Flags().StringP("filename", "f", "", "Filename or URL to file to read a template")
cmd.MarkFlagFilename("filename", "yaml", "yml", "json")
cmd.Flags().StringSliceP("value", "v", nil, "Specify a list of key-value pairs (eg. -v FOO=BAR,BAR=FOO) to set/override parameter values")
cmd.Flags().StringSliceP("value", "v", nil, "Specify a key-value pair (eg. -v FOO=BAR) to set/override parameter value in the template. Use FOO@path/to/file to load value from file.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Comment thread test/cmd/process.sh Outdated
# values can be read from files
os::cmd::expect_success "oc process -f '${required_params}' required_param@${OS_ROOT}/test/testdata/template-value-file.txt"
# values can be read from files using --value
os::cmd::expect_success "oc process -f '${required_params}' --value=required_param@${OS_ROOT}/test/testdata/template-value-file.txt"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both of these tests should confirm that the value from the file is reflected in the output (demonstrating that the value was actually read and used)

@mmilata
mmilata force-pushed the template-parameter-files branch from 4d3849b to 5736d5c Compare September 21, 2016 11:56
@mmilata

mmilata commented Sep 21, 2016

Copy link
Copy Markdown
Contributor Author

Updated.

Comment thread pkg/cmd/cli/cmd/newapp.go Outdated
cmd.Flags().StringSliceVarP(&config.TemplateFiles, "file", "f", config.TemplateFiles, "Path to a template file to use for the app.")
cmd.MarkFlagFilename("file", "yaml", "yml", "json")
cmd.Flags().StringSliceVarP(&config.TemplateParameters, "param", "p", config.TemplateParameters, "Specify a list of key value pairs (e.g., -p FOO=BAR,BAR=FOO) to set/override parameter values in the template.")
cmd.Flags().StringSliceVarP(&config.TemplateParameters, "param", "p", config.TemplateParameters, "Specify a key value pair (e.g., -p FOO=BAR) to set/override parameter value in the template. Use FOO@path/to/file to load the value from file.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sigh, sorry i still missed an article. should be "to load the value from a file". my bad. (same below).

@bparees

bparees commented Sep 21, 2016

Copy link
Copy Markdown
Contributor

one final nit and we'll need @openshift/api-review to sign off.

@mmilata
mmilata force-pushed the template-parameter-files branch from 5736d5c to 9b423c6 Compare September 21, 2016 12:16
@mmilata

mmilata commented Sep 21, 2016

Copy link
Copy Markdown
Contributor Author

Updated. I'll read something about articles in English instead of eating dinner tonight as a punishment.

@mfojtik

mfojtik commented Sep 21, 2016

Copy link
Copy Markdown
Contributor

LGTM

@bparees why this need API review?

@bparees

bparees commented Sep 21, 2016 •

Copy link
Copy Markdown
Contributor

@mfojtik it's changing the CLI api (adding the @ syntax)

@smarterclayton

Copy link
Copy Markdown
Contributor

Inventing new CLI syntax, changing existing behavior, and introduction of new forms generally requires API review.

@smarterclayton

Copy link
Copy Markdown
Contributor

How often will a user use this? What are the use case examples that drive this in a day to day sense? Also, if we add this here, why wouldn't we use this in kubectl create secrets --from-file? I'd like more context on how this will be used before signing off.

@bparees

bparees commented Sep 26, 2016

Copy link
Copy Markdown
Contributor

@smarterclayton i think the primary use case would be supplying a cert file/value as a parameter value.

i'm don't think the syntax/use here applies in an obvious way to create secrets --from-file.

it might apply to things like set env.

@mfojtik

mfojtik commented Sep 26, 2016

Copy link
Copy Markdown
Contributor

@bparees i can have configMap in my template and I want to have a value there set to a config file that I will supply during the processing (might be one use-case).

@smarterclayton

Copy link
Copy Markdown
Contributor

The cert file value thing won't work - JSON is going to eat your cert file
unless you base 64 encode it first.

On Mon, Sep 26, 2016 at 12:24 PM, Michal Fojtik [email protected]
wrote:

@bparees https://github.com/bparees i can have configMap in my template
and I want to have a value there set to a config file that I will supply
during the processing (might be one use-case).

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#10952 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_p2I7ShobMW8aYLG2e7Syuhi-tWs1ks5qt_G5gaJpZM4J-8KS
.

@smarterclayton

Copy link
Copy Markdown
Contributor

Which is a case where you want "foo=$( cat file | base64encode )"

On Mon, Sep 26, 2016 at 2:41 PM, Clayton Coleman [email protected]
wrote:

The cert file value thing won't work - JSON is going to eat your cert file
unless you base 64 encode it first.

On Mon, Sep 26, 2016 at 12:24 PM, Michal Fojtik [email protected]
wrote:

@bparees https://github.com/bparees i can have configMap in my
template and I want to have a value there set to a config file that I will
supply during the processing (might be one use-case).

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#10952 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_p2I7ShobMW8aYLG2e7Syuhi-tWs1ks5qt_G5gaJpZM4J-8KS
.

@smarterclayton

Copy link
Copy Markdown
Contributor

(binary cert file, that is). Regular text cert files work with cat and
shell expansion.

On Mon, Sep 26, 2016 at 2:42 PM, Clayton Coleman [email protected]
wrote:

Which is a case where you want "foo=$( cat file | base64encode )"

On Mon, Sep 26, 2016 at 2:41 PM, Clayton Coleman [email protected]
wrote:

The cert file value thing won't work - JSON is going to eat your cert
file unless you base 64 encode it first.

On Mon, Sep 26, 2016 at 12:24 PM, Michal Fojtik <[email protected]

wrote:

@bparees https://github.com/bparees i can have configMap in my
template and I want to have a value there set to a config file that I will
supply during the processing (might be one use-case).

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#10952 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_p2I7ShobMW8aYLG2e7Syuhi-tWs1ks5qt_G5gaJpZM4J-8KS
.

@bparees

bparees commented Sep 28, 2016

Copy link
Copy Markdown
Contributor

@smarterclayton so are you rejecting this? I think @mfojtik and i have provided our use cases. you can also see the original issue/discussion: #10687

if we're not doing this, we need to investigate the "-v" bug reported in the issue (where it only takes the first line from the cat'd file as the value) and at least fix that (assuming it's within our power to fix it and not a cobra issue)

@smarterclayton

Copy link
Copy Markdown
Contributor

I'm looking for the additional arguments that prove this is required and
desirable above and beyond what can be accomplished in Bash. The bar for
new syntax and interactions is high, I'm looking to see that we've proved
that we absolutely need this to deliver the correct experience to end
users, and that the new construct is useful and discoverable for end users
(really, like any API justification). I am not rejecting it yet, I'm
asking for the discussion to be laid out here that demonstrates that
everyone involved understands and is willing to bear the cost of the new
thing we are creating.

On Wed, Sep 28, 2016 at 12:22 PM, Ben Parees [email protected]
wrote:

@smarterclayton https://github.com/smarterclayton so are you rejecting
this? I think @mfojtik https://github.com/mfojtik and i have provided
our use cases. you can also see the original issue/discussion: #10687
#10687

if we're not doing this, we need to investigate the "-v" bug reported in
the issue (where it only takes the first line from the cat'd file as the
value) and at least fix that (assuming it's within our power to fix it and
not a cobra issue)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#10952 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_p8Ij0s4OhuU84yAsZ6EfROWIyMALks5qupRcgaJpZM4J-8KS
.

@bparees

bparees commented Sep 28, 2016

Copy link
Copy Markdown
Contributor

The bar for new syntax and interactions is high, I'm looking to see that we've proved that we absolutely need this to deliver the correct experience to end users, and that the new construct is useful and discoverable for end users (really, like any API justification). I am not rejecting it yet, I'm asking for the discussion to be laid out here that demonstrates that everyone involved understands and is willing to bear the cost of the new thing we are creating.

i think the answer is "probably not". I think we should investigate the -v truncation issue reported in the original issue and if we can address that, maybe we just call this done (with $(cat foo.txt) being our recommendation).

However the $(cat file) approach is also broken for any value with a comma in it, until we remove our support for comma separated key/value pairs. Can we just go ahead and do that?

@mmilata

mmilata commented Sep 28, 2016 •

Copy link
Copy Markdown
Contributor Author

Only following is broken for multiline files:

oc process template --value KEY=`cat file`

Following form should work:

oc process template KEY=`cat file`

The behaviour is caused by pflag library used by cobra which discards everything after the first newline. It can be fixed/worked around, however there will still be the risk that file containing comma will cause different parsing than intended.

@bparees

bparees commented Sep 28, 2016

Copy link
Copy Markdown
Contributor

It can be fixed/worked around, however there will still be the risk that file containing comma will cause different parsing than intended.

so my vote is to fix/workaround it, and also to drop support for comma parsing/splitting. but I doubt I can get @smarterclayton on board for the latter.

if we can't do that, it seems there is a legitimate need for this feature (to handle values with commas)

@mmilata

mmilata commented Oct 11, 2016

Copy link
Copy Markdown
Contributor Author

I've been looking at fixing this upstream and I think doing that would be doing the upstream a disservice (provided they'd accept it). They are using encoding/csv to split the first line into individual values. I was originally thinking about extending this to parse all lines and then concatenate last value of every line with first value of the next one. However combined with the CSV syntax this would result in a set of accepted values that is difficult to describe and it would be very sad if anyone else besides us accidentally started using it.

So I'd also vote for dropping the comma splitting altogether, however as it's probably not possible due to backwards compatibility I'll look into working this around in our code.

What do you think about printing a warning whenever the comma syntax is used?

@bparees

bparees commented Oct 11, 2016

Copy link
Copy Markdown
Contributor

@mmilata in other cases I think we've dropped comma support but printed a warning when commas appeared in the value, basically warning the user "this didn't do what you might have expected it to do previously". @smarterclayton is that an acceptable way to break compatibility here?

@mmilata I didn't follow your point about upstream though, are you saying we can't get rid of the comma splitting w/o making an upstream change?

@mmilata

mmilata commented Oct 11, 2016

Copy link
Copy Markdown
Contributor Author

@bparees, sorry for being unclear, we don't need to touch upstream to get rid of comma splitting, though rebase to version that includes spf13/pflag#89 is likely needed.

I was trying to modify upstream to accept multi-line arguments (separated by commas) but no longer think it's a good idea.

@bparees

bparees commented Oct 11, 2016

Copy link
Copy Markdown
Contributor

bumping pflag shouldn't be a problem. we'll have to see what @smarterclayton says about dropping support for/warning on comma separated values.

@smarterclayton

Copy link
Copy Markdown
Contributor

I would say we should drop support and warn it changed if you try it. Also
public notification of API change, etc

On Oct 11, 2016, at 5:05 AM, Ben Parees [email protected] wrote:

bumping pflag shouldn't be a problem. we'll have to see what @smarterclayton
https://github.com/smarterclayton says about dropping support for/warning
on comma separated values.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#10952 (comment),
or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABG_pzMuK2cDEXkzrfh_SYF7d7REOtvtks5qy3t5gaJpZM4J-8KS
.

@bparees

bparees commented Oct 11, 2016

Copy link
Copy Markdown
Contributor

@smarterclayton what qualifies as public notification? mailing list and release note?
@mmilata sounds like a go to change the behavior.

@smarterclayton

Copy link
Copy Markdown
Contributor

Yes

On Oct 11, 2016, at 6:25 PM, Ben Parees [email protected] wrote:

@smarterclayton https://github.com/smarterclayton what qualifies as
public notification? mailing list and release note?
@mmilata https://github.com/mmilata sounds like a go to change the
behavior.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#10952 (comment),
or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABG_p7fjg8sjbANp8QCK5h3Yb_L8C7YAks5qzAzSgaJpZM4J-8KS
.

@openshift-bot

Copy link
Copy Markdown
Contributor

Origin Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 16, 2016
@mmilata

mmilata commented Oct 24, 2016

Copy link
Copy Markdown
Contributor Author

Created PR that drops support for comma-splitting: #11539.

Comment thread test/cmd/process.sh
os::cmd::expect_failure_and_text 'oc process template-name --value=key=value --value=key=value' 'provided more than once: key'
os::cmd::expect_failure_and_text 'oc process template-name key=value --value=key=value' 'provided more than once: key'
os::cmd::expect_failure_and_text 'oc process template-name key=value other=foo --value=key=value --value=other=baz' 'provided more than once: key, other'
os::cmd::expect_failure_and_text 'oc process template-name key=value other=foo --value=key=value --value=other=baz' 'provided more than once: key=value, other=foo'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure the change in the error message makes sense here -- the keys are provided more than once

@@ -0,0 +1 @@
fileval No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the purpose of this PR is to support multi-line argument values, shouldn't we test that?

@mmilata

mmilata commented Oct 25, 2016

Copy link
Copy Markdown
Contributor Author

Based on previous discussion it seems that this change is not desirable -> closing the PR, apologies for not doing it sooner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-approved needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants