kubernetes / kube-openapi

Kubernetes OpenAPI spec generation & serving
Apache License 2.0
317 stars 205 forks source link

[Discussion] Compatibility Guarantees and Versioning #421

Closed Jefftree closed 6 months ago

Jefftree commented 1 year ago

kube-openapi has always been on the v0 revision with importers pointing go.mod files directly at a specific revision (eg: kube-openapi v0.0.0-20230717233707-2695361300d9). By being on the v0 revision system, we can iterate quite fast and have no compatibility guarantees for breaking changes. I think this repo has got to the point where we should reconsider our versioning system.

With all that, here are a few suggestions

apelisse commented 1 year ago

Possibly third solution:

No? I think that'd be fairly simple to do, am I missing something?

Jefftree commented 1 year ago

Possibly third solution:

  • Version kube-openapi like kubernetes: we have a new branch for each version of kubernetes/client-go. In between release we can change compatibility if we want. Running go get -u will only update within the branch.

No? I think that'd be fairly simple to do, am I missing something?

This was part of the second solution but I'll edit to make it more clear. I'll list a couple of drawbacks to this approach that we get for free if kube-openapi becomes a staging repo

Jefftree commented 1 year ago

/cc @alexzielenski @sttts @liggitt

liggitt commented 1 year ago

even if we wanted to make k8s.io/kube-openapi a staging repo (I wouldn't), we can't make k8s.io/kube-openapi a staging repo as long as k8s.io/kubernetes has dependencies that reference it.

k8s.io/kubernetes → non-staging dep → staging dep is not allowed, since it would make it impossible to modify the staging dep in a way the non-staging dep would have to react to

sttts commented 1 year ago

I am curious which parts of this repo ppl actually use.

I have considered kube-openapi always as an internal repository without any guarantee (created to increase development velocity). And I think most of the code is written in a style that does not expect reuse in other places. In other words, semver would be cosmetics, but not honest. Semver where we constantly increase the major version has no use.

So if we want to make progress here, we should go package by package and check use outside of kube and then do a decision package by package.

Note, and this is crucial for this repo, kube-openapi has a collection of very different functionality that is independently developed. Our go-openapi fork is very different from pkg/cached or pkg/builder. Semver for a collection repository like this is not a good strategy. We could apply semver to individual parts via nested go.mods. That would make a lot more sense.

apelisse commented 1 year ago

Right, so the problem is mostly that whatever is pulled by client-go is problematic. But I'm a little concerned about the package-per-package policy inside the repo. But you're right, only the packages that are pull by client-go are problematic.

Note, and this is crucial for this repo, kube-openapi has a collection of very different functionality that is independently developed. Our go-openapi fork is very different from pkg/cached or pkg/builder. Semver for a collection repository like this is not a good strategy. We could apply semver to individual parts via nested go.mods. That would make a lot more sense.

Agreed with this.

k8s-triage-robot commented 8 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 7 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 6 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 6 months ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes/kube-openapi/issues/421#issuecomment-2023803016): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ 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/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.