-
Notifications
You must be signed in to change notification settings - Fork 263
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
feat: Add support to combine service create --filename with other options #937
Changes from all commits
42c4076
ba133ed
2c7338d
857c046
1f8bf11
d76201c
3e0a752
062345d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -303,12 +303,11 @@ func constructServiceFromFile(cmd *cobra.Command, editFlags ConfigurationEditFla | |
// Set namespace in case it's specified as --namespace | ||
service.ObjectMeta.Namespace = namespace | ||
|
||
// We need to generate revision to have --force replace working | ||
revName, err := servinglib.GenerateRevisionName(editFlags.RevisionName, &service) | ||
// Apply options provided from cmdline | ||
err = editFlags.Apply(&service, nil, cmd) | ||
if err != nil { | ||
return nil, err | ||
} | ||
Comment on lines
308
to
310
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could comment these lines and all tests are still passing. So this tells me no test for errors when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But isn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I look at the overall test suite I see, that |
||
service.Spec.Template.Name = revName | ||
|
||
return &service, nil | ||
} |
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.
Why has this been removed ?
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.
It's superseded by combination of
markFlagMakesRevision
andeditFlags.Apply
, per my suggestion/proposal from previous PR.https://github.com/knative/client/pull/937/files#diff-74b189b0b506d256ede4322475d950f5R285
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 see, and I think it makes sense.