client
client copied to clipboard
`kn apply` ignores revision name
Bug report
Revision name is discarded -- note the revision name in the output below:
$ kn service apply --filename service.yaml --revision-name="foo-iamrevision"
Creating service 'foo' in namespace 'default':
...
Service 'foo' created to latest revision 'foo-00001' is available at URL:
http://foo.default.cluster.auth.dev
Expected behavior
Expected it to behave like create in this scenario (note the revision name).
kn service create --filename service.yaml --revision-name="foo-iamrevision"
Creating service 'foo' in namespace 'default':
...
Service 'foo' created to latest revision 'foo-iamrevision' is available at URL:
http://foo.default.cluster.auth.dev
Steps to reproduce the problem
Pretty much the steps above.
kn version
go installed from f128d045ba2139d1113b46427a09366e131c6b7c
Version:
Build Date:
Git Revision:
Supported APIs:
* Serving
- serving.knative.dev/v1 (knative-serving v0.19.0)
* Eventing
- sources.knative.dev/v1alpha2 (knative-eventing v0.19.0)
- eventing.knative.dev/v1beta1 (knative-eventing v0.19.0)
Knative (serving/eventing) version
0.19.x
Oh and the issue is pretty clearly here: https://github.com/knative/client/blob/release-0.19/pkg/kn/commands/service/apply.go#L69
The issue here is, that we don't support BYO revision name with kn service apply. The reason is that we can't make that idem-potent, e.g. calling kn service apply a second time with the same arguments has to be a no-op and don't provide an error. Also I remember other issues with BYO revision names.
@jwilner Actually, what is your use case with providing a revision name with kn service apply ? Always curious to learn the usefulness of --revision-name which I think make more trouble than it helps.
@rhuss I don't immediately remember what my need for revision-name was. I can dig into it some more and get back to you. In the meanwhile, you can see our current usage in the pasted bash snippet in https://github.com/knative/client/pull/1187#issuecomment-771729924
Checking your script, I think you don't have to set the revision name anymore explicitly as by default kn is using server-side generated revision names now since 0.21. If you update, could you try if your use case would work without setting an explicit --revision-name ?
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.
/remove-lifecycle stale
/assign
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.
/remove-lifecycle stale
We should decide what to do with this issue when we revisit https://github.com/knative/client/pull/1187 and how to progress there. @vyasgun if you don't mind I would assign this issue to myself.
/assign rhuss