kcp-dev / kcp

Kubernetes-like control planes for form-factors and use-cases beyond Kubernetes and container workloads.
https://kcp.io
Apache License 2.0
2.35k stars 381 forks source link

bug: API dependecy on client pkg #2892

Closed mjudeikis closed 1 year ago

mjudeikis commented 1 year ago

Describe the bug

With the introduction of https://github.com/kcp-dev/kcp/issues/2885 we created an undesired dependency between the client and API. While this is not a technical challenge overall, it makes maintenance challenging as we now need to stage API changes, and cut separate releases for pkg/client and only when we can use it in the code.

proposed solutions was:

  1. do go workspaces magic in all steps of the repository. But release process still stays complex.
  2. merge pkg and client into a package of its own (SDK) so dependencies are clear.

Steps To Reproduce

N\a

Expected Behaviour

Easy to consume, easy to develop.

Additional Context

https://kubernetes.slack.com/archives/C021U8WSAFK/p1678727016614579

mjudeikis commented 1 year ago

Split/Merge pkg/apis and pkg/client into a module of its own. I can think of a few ways to do this:

  1. We copy over both of these under pkg/sdk -> pkg/sdk/apis and pkg/sdk/client And use the make new go module for it. Pros: single subdir, easy to use. Cons: non'standard pkg/apis

  2. Soft link existing folders to pkg/sdk/{api,client} and release it there. Cons: This way we keep the existing structure and change is minimal.
    Pros: One more soft link in the repo

any other suggestions?