Skip to content

kn service update should print an error message when invalid or no option is passed #286

@toVersus

Description

@toVersus

In what area(s)?

/kind good-first-issue
/kind feature

Describe the feature:

When users run kn service update command with invalid options, nothing is changed. But in current implementation, kn prints the following output:

$ ./kn service update hello --max-scale -100
Waiting for service 'hello' to become ready ... OK
Service 'hello' updated in namespace 'default'.

IMO, this is a little confusing behavior. Kn should print unchanged when it changed nothing as kubectl does. I think we can implement this feature by comparing the generation before and after updating the service resource and returning changed/unchanged state (boolean).

$ ./kn service update hello --max-scale -100
Service 'hello' unchanged in namespace 'default'.

Can I take this, if you can accept this proposal?

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor.kind/featureNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions