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

fix: add platform argument to preflight calls #12

Merged
merged 6 commits into from
Apr 24, 2024
Merged

Conversation

adwk67
Copy link
Member

@adwk67 adwk67 commented Apr 23, 2024

Part of stackabletech/issues#559.

The architecture is checked when the arguments are parsed, but preflight ignores the value unless the image points to a manifest list, in which case the correct image is selected.

Only stackable-experimental contains manifest lists at the moment, so these calls will always result in the default (presumably fo the calling environment) being fetched:

check-container -i 24.3.0 -p hive -a linux/amd64 --> amd64 image
check-container -i 24.3.0 -p hive -a linux/arm64 --> amd64 image

preflight .../stackable/hive:3.1.3-stackable24.3.0 --platform linux/amd64 --> amd64 image
preflight .../stackable/hive:3.1.3-stackable24.3.0 --platform linux/arm64 --> amd64 image

Preflight seems to provide the prefix so this is removed before passing the command off to preflight:

preflight .../stackable-experimental/hive:3.1.3-stackable24.3.0 --platform linux/amd64 --> no child with platform linux/linux/amd64
preflight .../stackable-experimental/hive:3.1.3-stackable24.3.0 --platform linux/arm64 --> no child with platform linux/linux/arm64

When pointing at a manifest list, the correct images are selected:

preflight .../stackable-experimental/hive:3.1.3-stackable24.3.0 --platform amd64 --> amd64 image
preflight .../stackable-experimental/hive:3.1.3-stackable24.3.0 --platform arm64 --> arm64 image

Copy link
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

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

a new version will be needed (for GH actions to pull and so on), maybe also add a line to the changelog

src/image_tools/preflight.py Show resolved Hide resolved
@adwk67 adwk67 requested a review from razvan April 24, 2024 15:16
@adwk67 adwk67 self-assigned this Apr 24, 2024
@adwk67 adwk67 added this pull request to the merge queue Apr 24, 2024
Merged via the queue into main with commit b32ec04 Apr 24, 2024
9 checks passed
@adwk67 adwk67 deleted the fix/add-platform-arg branch April 24, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants