Skip to content
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

Align GVK format accepted by --channel flag #1871

Closed
dsimansk opened this issue Sep 25, 2023 · 13 comments · May be fixed by #1951
Closed

Align GVK format accepted by --channel flag #1871

dsimansk opened this issue Sep 25, 2023 · 13 comments · May be fixed by #1951
Labels
good first issue Denotes an issue ready for a new contributor. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Milestone

Comments

@dsimansk
Copy link
Contributor

Bug report

Create a subscription

Usage:
  kn subscription create NAME [options]

Examples:

  # Create a subscription 'sub0' from InMemoryChannel 'pipe0' to a subscriber ksvc 'receiver'
  kn subscription create sub0 --channel imcv1beta1:pipe0 --sink ksvc:receiver

  # Create a subscription 'sub1' from KafkaChannel 'k1' to ksvc 'mirror', reply to a broker 'nest' and DeadLetterSink to a ksvc 'bucket'
  kn subscription create sub1 --channel messaging.knative.dev:v1alpha1:KafkaChannel:k1 --sink mirror --sink-reply broker:nest --sink-dead-letter bucket


Options:
      --channel string            Specify the channel to subscribe to. For the default channel, just use the name (e.g. 'mychannel'). A mapped channel type like 'imc' can be used as a prefix (e.g. 'imc:mychannel'). Finally you can specify the full coordinates to the referenced
                                  channel with Group:Version:Kind:Name (e.g. 'messaging.knative.dev:v1alpha1:KafkaChannel:mychannel').
  -n, --namespace string          Specify the namespace to operate in.
  -s, --sink string               Addressable sink for events. You can specify a broker, channel, Knative service or URI. Examples: '--sink broker:nest' for a broker 'nest', '--sink channel:pipe' for a channel 'pipe', '--sink ksvc:mysvc:mynamespace' for a Knative service 'mysvc' in
                                  another namespace 'mynamespace', '--sink https://event.receiver.uri' for an HTTP URI, '--sink ksvc:receiver' or simply '--sink receiver' for a Knative service 'receiver' in the current namespace. '--sink special.eventing.dev/v1alpha1/channels:pipe'
                                  for GroupVersionResource of v1alpha1 'pipe'. If a prefix is not provided, it is considered as a Knative service in the current namespace.

We should consider refactoring --channel flag on kn subscription create to be aligned within the same GVK format as --sink. There's common implementation for parsing it already, but for some reason it isn't used in case of Subscriptions.

Expected behavior

The --channel flag accepts the same GVK format as --sink and other similar option flags.

/kind bug
/kind good-first-issue
/kind cleanup

@dsimansk dsimansk added the kind/bug Categorizes issue or PR as related to a bug. label Sep 25, 2023
@knative-prow knative-prow bot added good first issue Denotes an issue ready for a new contributor. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Sep 25, 2023
@dsimansk dsimansk added this to the Knative 1.12 milestone Sep 25, 2023
@xiangpingjiang
Copy link
Contributor

/assign

@xiangpingjiang
Copy link
Contributor

@dsimansk
hello David,
the expected format is like --channel channel:pipe and --channel special.eventing.dev/v1alpha1/channels:pipe ?

@dsimansk
Copy link
Contributor Author

dsimansk commented Oct 9, 2023

@dsimansk hello David, the expected format is like --channel channel:pipe and --channel special.eventing.dev/v1alpha1/channels:pipe ?

Yes, the same as for --sink flag.

@rhuss
Copy link
Contributor

rhuss commented Dec 12, 2023

@xiangpingjiang are you still working on the issue ? If not, no problem, but we would then assign it to somebody else who is also interested. Please let me know until tomorrow, otherwise, I would unassign you if this is ok

@xiangpingjiang
Copy link
Contributor

xiangpingjiang commented Dec 12, 2023

@rhuss
No problem. I unassigned myself

@xiangpingjiang xiangpingjiang removed their assignment Dec 12, 2023
@TheRealSibasishBehera
Copy link

/assign

@mabulgu
Copy link

mabulgu commented May 21, 2024

@rhuss is this sth still unassigned (and undone)? If so I want to take a look at this.

@rhuss
Copy link
Contributor

rhuss commented May 21, 2024

AFAIK it's still an open issue, hapyy to support you if you would like to give it a try!
@dsimansk can also help you here.

@mabulgu
Copy link

mabulgu commented May 21, 2024

/assign

@EraKin575
Copy link

Hi,@rhuss! I don't think @mabulgu is currently working on this issue.Mind if I take this up? :)

@dsimansk
Copy link
Contributor Author

@EraKin575 please go ahead.

@mabulgu
Copy link

mabulgu commented Jun 21, 2024

I don't think @mabulgu is currently working on this issue

@EraKin575 what made you think that I am not working on this issue? this was still on my list and looking at the cadence, 1 month seems normal.

Pls ping the assignee first (in this case me) as these kinda issues are already long waiting issues (opened on sept 2023). In my case, it was only 1 month so you were wrong about my not being active on this issue. I was on a PTO and recently saw your message here from 4 days ago.

Thanks for your collaboration. Next time hoping for a better communication;)

@mabulgu mabulgu removed their assignment Jun 21, 2024
Copy link

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.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 20, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants