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

[RFC] osbuild: define the minimum osbuild version and enforce it #1194

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thozza
Copy link
Member

@thozza thozza commented Feb 5, 2025

Define a new constant in the osbuild package for the minimum osbuild version supported by the package. Enforce the minimum version when executing osbuild.

This has the potential to prevent surprises when using older osbuild with images implementation that relies on changes in a newer version of osbuild.

This will allow dependent projects to extract the minimum version and check if their packaging requirements are up to date with the version of images that they depend on.

My plan would be to then have a GH action in osbuild-composer and image-builder-cli to check if the SPEC file requires osbuild of at least MinimumOSBuildVersion version, but in practice, CI tests building any images would fail as well.

Define a new constant in the `osbuild` package for the minimum osbuild
version supported by the package. Enforce the minimum version when
executing osbuild.

This has the potential to prevent surprises when using older osbuild
with `images` implementation that relies on changes in a newer version
of osbuild.

This will allow dependent projects to extract the minimum version and
check if their packaging requirements are up to date with the version of
`images` that they depend on.

Signed-off-by: Tomáš Hozza <[email protected]>
@thozza thozza requested a review from a team as a code owner February 5, 2025 10:57
@thozza thozza marked this pull request as draft February 5, 2025 10:57
Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this makes sense, I like it.

One thing I would change though is to probably put the minimum version in a text file and compile it in with go:embed, just for visibility and to make it easier to work with in some automated way. For example, if we want to read it during some testing, or if someone is browsing the repo to find it, it would be a lot easier to be able to point to something like res/osbuild-min-version. We could even link to it from the README or some docs without needing to point to specific lines in code.

@thozza
Copy link
Member Author

thozza commented Feb 5, 2025

One thing I would change though is to probably put the minimum version in a text file and compile it in with go:embed, just for visibility and to make it easier to work with in some automated way. For example, if we want to read it during some testing, or if someone is browsing the repo to find it, it would be a lot easier to be able to point to something like res/osbuild-min-version. We could even link to it from the README or some docs without needing to point to specific lines in code.

Great idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants