knative / client

Knative developer experience, docs, reference Knative CLI implementation
Apache License 2.0
354 stars 261 forks source link

modified channel flag to align with sink flag parsing #1951

Open EraKin575 opened 5 months ago

EraKin575 commented 5 months ago

Description

Refactor the ChannelRef structure's Parse method to utilize the common implementation for parsing GVK formats.

Changes

modified channel flag parsing to align with sink flag *

Reference

Fixes #1871

Release Note

knative-prow[bot] commented 5 months ago

Welcome @EraKin575! It looks like this is your first PR to knative/client 🎉

knative-prow[bot] commented 5 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: EraKin575 Once this PR has been reviewed and has the lgtm label, please assign vyasgun for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/knative/client/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
knative-prow[bot] commented 5 months ago

Hi @EraKin575. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
dsimansk commented 5 months ago

/ok-to-test

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.81%. Comparing base (543b2b8) to head (5e1ce9f). Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
pkg/kn/flags/channel_types.go 50.00% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1951 +/- ## ========================================== - Coverage 76.82% 76.81% -0.02% ========================================== Files 207 207 Lines 12892 12895 +3 ========================================== + Hits 9904 9905 +1 - Misses 2187 2188 +1 - Partials 801 802 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dsimansk commented 5 months ago

@EraKin575 thanks for the contribution and looking into the issue.

My idea from #1871 to align --channel flag with the existing parsing logic from sink. Please feel free to evaluate the code and let me know if it's possible or not. Priority is to make UX feel the same, for --sink or --channel.

https://github.com/knative/client/blob/main/pkg/kn/commands/flags/sink.go

EraKin575 commented 5 months ago

@EraKin575 thanks for the contribution and looking into the issue.

My idea from #1871 to align --channel flag with the existing parsing logic from sink. Please feel free to evaluate the code and let me know if it's possible or not. Priority is to make UX feel the same, for --sink or --channel.

https://github.com/knative/client/blob/main/pkg/kn/commands/flags/sink.go

make it a common function for both sink and channel flags, right?

dsimansk commented 5 months ago

@EraKin575 thanks for the contribution and looking into the issue. My idea from #1871 to align --channel flag with the existing parsing logic from sink. Please feel free to evaluate the code and let me know if it's possible or not. Priority is to make UX feel the same, for --sink or --channel. https://github.com/knative/client/blob/main/pkg/kn/commands/flags/sink.go

make it a common function for both sink and channel flags, right?

Yes, exactly that.

knative-prow-robot commented 2 months ago

PR needs rebase.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.