-
Notifications
You must be signed in to change notification settings - Fork 54
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
container: include the architecture of the image in container.Spec #585
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I like it :) |
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 12, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
kingsleyzissou
approved these changes
Apr 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this!
Will wait for an additional review
achilleas-k
approved these changes
Apr 15, 2024
This is a different attempt to resolve the issue that the resolver consider the requested architecture more of a "hint". The initial attempt is in osbuild#451 but it caused some issues as this seems to be expected behavior of the library in tests at least. So this commit is more conservative and just includes the the architecture in the `container.Spec` so that the consumer of the library can inspect and error on mismatch of requested arch and resolved arch.
This is needed to compare an arch to an unset type.
The way architectures can be confusing, the images library is using the kernel types internally, i.e. X86_64. However the container libraries seem to use the golang names (e.g. `amd64`). To avoid the confusing use `arch.Arch` consitently which can ingest the go names.
achilleas-k
force-pushed
the
include-arch-in-spec
branch
from
April 15, 2024 15:43
44b8591
to
501d40c
Compare
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 18, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 18, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 18, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 18, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 18, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 18, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 23, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 23, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 23, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 23, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 23, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 23, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
mvo5
added a commit
to mvo5/bootc-image-builder
that referenced
this pull request
Apr 23, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
github-merge-queue bot
pushed a commit
to osbuild/bootc-image-builder
that referenced
this pull request
Apr 23, 2024
When trying to build an image with an incompatible target arch bib will currently not error because the container resolver is not very strict about the architecture request. This commit fixes this by double checking that the resolved container is actually of the expected architecture. This requires osbuild/images#585
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a different attempt to resolve the issue that the resolver consider the requested architecture more of a "hint". The initial attempt is in #451 but it caused some issues as this seems to be expected behavior of the library in tests at least.
So this commit is more conservative and just includes the the architecture in the
container.Spec
so that the consumer of the library can inspect and error on mismatch of requested arch and resolved arch.With that in bib we can check the arch, I outlined this in https://github.com/osbuild/bootc-image-builder/compare/main...mvo5:check-resolved-image-arches?expand=1 what we could have to do there (plus some other changes because the image API has changed quite a bit and a go.mod change to make it trivial to test locally but that will need adjustment of course).