-
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
Add support for internal plugins #902
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.
Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)
goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party | grep -v wire_gen.go)
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.
Any chance to update the description or link to an issue?
This is listed as chore. Missing the context I guess.
Ah, sorry. It's kind of an habit to use the conventional commit spec for doing my commit message, and while creating the PR with Going to adapt the title, but there is no issue yet. Do you want me to create one or could we discuss the change on this PR ? |
/hold Do not merge until we have discussed the topic on an issue (which I will create tomorrow). |
853461c
to
6ce417a
Compare
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 this ready for review now that #929 is submitted?
6ce417a
to
21322ab
Compare
21322ab
to
b28cf16
Compare
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.
Generally, the changes look good to me. Just a small suggestion to improve the test cases. Also I think we need to add a section to docs/plugins/README.md
to describe this feature.
/test pull-knative-client-integration-tests |
@rhuss I am not able to checkout your PR. I get the following: ➜ client git:(master) gh pr checkout 902
From https://github.com/knative/client
! [rejected] refs/pull/902/head -> pr/internal-plugins (non-fast-forward)
exit status 1 Could it be a need to rebase? OR maybe I need to do something on my side... not sure. Let me digg some more |
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.
Not able to checkout...
@maximilien looks strange. Ok, let me try (but I'm typically not using |
Hmm, I tried it with standard git commands, no issue. Maybe its a problem of
|
b28cf16
to
157968f
Compare
/retest |
2 similar comments
/retest |
/retest |
The integration test error is not a flake but because of a change in eventing 0.17. We need to fix this before releasing kn 0.17 regardless of whether we get this PR in or not. |
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.
Getting consistent error trying to run tests locally. Some of the output below. Also reviewed the changes.
➜ client git:(master) ✗ ./hack/build.sh
🚒 Update
⚖️ License
📖 Docs
🚧 Compile
🧪 Test
🔥 Failure
# knative.dev/pkg/test/logging
/Users/maximilien/go/pkg/mod/knative.dev/[email protected]/test/logging/tlogger.go:186:5: o.t.Cleanup undefined (type *testing.T has no field or method Cleanup)
note: module requires Go 1.14
FAIL knative.dev/client/cmd/kn [build failed]
? knative.dev/client/pkg/apis/client [no test files]
? knative.dev/client/pkg/apis/client/v1alpha1 [no test files]
...
FAIL knative.dev/client/pkg/kn/commands [build failed]
...
FAIL knative.dev/client/pkg/kn/commands/completion [build failed]
...
FAIL knative.dev/client/pkg/templates [build failed]
...
@maximilien knative now depends on go 1.14, so you need to upgrade your go installation |
The following is the coverage report on the affected files.
|
@dsimansk @navidshaikh @maximilien I think we are good to merge. I adressed all PR comments, and added some extra testing. Also the CI is fixed (will also fix CI issues of other PRs). Can I have a lgtm please ? (if there are no objections) |
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.
/lgtm
@@ -73,6 +73,10 @@ | |||
| Add sugar controller to E2E tests | |||
| https://github.com/knative/client/pull/920[#920] | |||
|
|||
| 🎁 | |||
| Add support for internal plugins | |||
| https://github.com/knative/client/pull/880[#880] |
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.
902, can be fixed in update to changelog PR for release as well.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: navidshaikh, rhuss 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 |
* chore: Add support for internal plugins * added test for internal plugin lookup * add changelog entry * fix formatting * update to latest changes on main * Added more tests + some docs * formatting fix * moved to proper injection label for setting up the broker in integration test
* Add support for internal plugins (#902) * chore: Add support for internal plugins * added test for internal plugin lookup * add changelog entry * fix formatting * update to latest changes on main * Added more tests + some docs * formatting fix * moved to proper injection label for setting up the broker in integration test * update changelog * fix changelog
* chore: Add support for internal plugins * added test for internal plugin lookup * add changelog entry * fix formatting * update to latest changes on main * Added more tests + some docs * formatting fix * moved to proper injection label for setting up the broker in integration test
This PR adds the possibility for internal plugins. This works by allowing code to add to a global plugin slice
plugins.InternalPlugins
. By default this slice is empty, but for a custom assembly process (outside of this project), this could be leverage to add plugins directly in the code.The changes are minimal and well tested, but the PR was created a bit in a hurry so apologies for not having an associated issue yet (but I will create on tomorrow).