-
Notifications
You must be signed in to change notification settings - Fork 261
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
Adding completion for remaining Eventing resources #1567
Adding completion for remaining Eventing resources #1567
Conversation
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.
@vyasgun: 4 warnings.
In response to this:
Description
Context specific autocompletion for eventing resources
Changes
- Added the ValidArgs function for the following resources
- triggers
- source:
- ping
- sinkbinding
- apiserver
- container
- channel
- subscription
Reference
Fixes #1373
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
) | ||
|
||
var ( | ||
testApiServerSource1 = sourcesv1.ApiServerSource{ |
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.
Golint naming: var testApiServerSource1 should be testAPIServerSource1. More info.
}, | ||
ObjectMeta: metav1.ObjectMeta{Name: "test-ApiServer-source-1", Namespace: testNs}, | ||
} | ||
testApiServerSource2 = sourcesv1.ApiServerSource{ |
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.
Golint naming: var testApiServerSource2 should be testAPIServerSource2. More info.
}, | ||
ObjectMeta: metav1.ObjectMeta{Name: "test-ApiServer-source-2", Namespace: testNs}, | ||
} | ||
testApiServerSource3 = sourcesv1.ApiServerSource{ |
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.
Golint naming: var testApiServerSource3 should be testAPIServerSource3. More info.
}, | ||
ObjectMeta: metav1.ObjectMeta{Name: "test-ApiServer-source-3", Namespace: testNs}, | ||
} | ||
testNsApiServerSources = []sourcesv1.ApiServerSource{testApiServerSource1, testApiServerSource2, testApiServerSource3} |
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.
Golint naming: var testNsApiServerSources should be testNsAPIServerSources. More info.
Codecov Report
@@ Coverage Diff @@
## main #1567 +/- ##
==========================================
+ Coverage 79.70% 79.79% +0.09%
==========================================
Files 163 163
Lines 8686 8820 +134
==========================================
+ Hits 6923 7038 +115
- Misses 1078 1089 +11
- Partials 685 693 +8
Continue to review full report at Codecov.
|
pkg/kn/commands/completion_helper.go
Outdated
} | ||
|
||
var pingSourcesClient clientv1beta2.KnPingSourcesClient | ||
if config.params.NewSourcesV1beta2Client == 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.
Is there any specific reason to initialize only SourcesV1beta2Client
, but other completion functions don't follow this pattern?
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.
Ehm, I see...it isn't properly done. Please fix that by adding it here:
https://github.com/knative/client/blob/main/pkg/kn/commands/types.go#L69
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.
Thanks, fixed.
/retest |
8e58af0
to
9d5fd7d
Compare
/retest |
1 similar comment
/retest |
The following is the coverage report on the affected files.
|
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.
Thanks!
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dsimansk, vyasgun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Context specific autocompletion for eventing resources
Changes
Reference
Fixes #1373