Move shared code to knative/client-pkg
Since we have now knative/client-pkg for holding shared client code that can be used by kn but also plugins, we should move the client API to this repository (and while doing so, thinking about cleaning it up)
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
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 discussed this with @dsimansk on today's WG meeting. There are some areas which are even broader in scope than client, and are related to command line apps in general, like:
- Cobra integration and testing (see example PR https://github.com/knative-sandbox/kn-plugin-event/pull/205)
- Logging - verbosity, format json,yaml,human, stderr by default
- Regular output - format json,yaml,human, stdout by default
- Fatal error reporting - all debug logs despite verbosity, error with stack, all in nice file to upload
Maybe others as well. All of this are command line related, and there are other command line tools that we have apart from client and plugins: test-infra tools, hack tools. Just in last week, I've added 3 command line tools: https://github.com/knative/test-infra/pull/3513, https://github.com/knative/test-infra/pull/2995, https://github.com/knative/hack/pull/222.
So, I think we could benefit from knative's commandline package. At the same time, adding those to client-pkg isn't helping as client has deps which simple command line tools don't need.
I had an idea to fix this. We could use Go 1.18 workspaces, and hack's support for it https://github.com/knative/hack/pull/205 to create commandline package in knative.dev/pkg with its own go.mod file. Also, we could fold client-pkg into knative.dev/pkg/client Go module with own deps. The go.work would reference both - simplifying the release process considerably.
go 1.18
use (
.
client
commandline
)