Skip to content
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 the concept of unreleased api_versions #430

Merged
merged 4 commits into from
Feb 14, 2024

Conversation

drevell
Copy link
Contributor

@drevell drevell commented Feb 14, 2024

Currently, it can be hard to release a new binary version because any unfinished features and api_versions will be exposed in that release. For example, we can't release a new binary version if api_version v1beta4 is unfinished, because the new binary will put api_version: v1beta4 in all the yaml files that it creates.

Instead, we want the ability to release a new binary version at any time, with unfinished features hidden behind an api_version that is still hidden from the public.

To do this, we mark each release struct with a boolean indicating whether it is released or not. api_versions that are under construction will not be used by official release binaries. When a release build of abc creates a yaml file, the header will use api_version=$last_officially_released_api_version, not the api_version that's under construction at the time of release.

@drevell drevell requested a review from a team as a code owner February 14, 2024 00:26
@drevell drevell merged commit fba34cb into main Feb 14, 2024
2 checks passed
@drevell drevell deleted the drevell/unreleased-api-version branch February 14, 2024 00:47
capri-xiyue pushed a commit that referenced this pull request Feb 14, 2024
This is a simple hack for a very complex reason.

In #428, there's a problem where abc CLI version 0.5.0 *thinks* that it
supports api_version v1beta4, but it really doesn't. It just supports
the in-progress subset of v1beta4 that was implemented at the time that
0.5.0 was released. This causes a problem because when abc v0.5.0 sees a
test.yaml that has api_version v1beta4, it *should* say "I don't
understand this version, please upgrade your abc CLI" but what it will
actually say is a weird test failure involving the `.gitkeep` file.

By bumping the soon-to-be-released api_version to v1beta5, that will be
beyond what abc v0.5.0 thinks it can support, so it will correctly ask
the user to upgrade.

The underlying root cause (abc CLI thinks it supports api_versions that
it really doesn't) is fixed in #430 , but obviously we can't fix v0.5.0
which is already out in the wild.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants