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

Deprecate --local flag (HMS-3792) #423

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

kingsleyzissou
Copy link
Contributor

@kingsleyzissou kingsleyzissou commented May 7, 2024

Pulling container images before building would break in the case of authenticated images on podman machine, since the auth file lives on the host and podman machine and won't know about it.

This commit deprecates the --local flag and puts the requirement on the user to ensure that the container is in local storage before initiating the build.

Copy link
Contributor

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Overall LGTM just two nits

bib/cmd/bootc-image-builder/main.go Outdated Show resolved Hide resolved
bib/cmd/bootc-image-builder/main.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

Thanks for this! Looks good, one tiny idea/suggestion inline.

test/test_build.py Outdated Show resolved Hide resolved
@kingsleyzissou
Copy link
Contributor Author

Arghhh of course this breaks tls-verify, how do we want to handle that? We aren't resolving containers from remote registries anymore, so maybe we want to disable this too

@kingsleyzissou kingsleyzissou force-pushed the deprecate-local branch 2 times, most recently from 996a9ff to 0f0f46f Compare May 7, 2024 15:59
achilleas-k
achilleas-k previously approved these changes May 7, 2024
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.

The joy and simplicity of a mostly-red PR :)

mvo5
mvo5 previously approved these changes May 8, 2024
Copy link
Collaborator

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

Thank you!

@kingsleyzissou
Copy link
Contributor Author

flake8 failed on line length. Think it should be all good now 🤞

mvo5
mvo5 previously approved these changes May 8, 2024
mvo5
mvo5 previously approved these changes May 8, 2024
@kingsleyzissou
Copy link
Contributor Author

Okay it's finally green now. Removing the flag also broke the cross-arch integration tests :/
Simple PR but had so many knock-on effects

mvo5
mvo5 previously approved these changes May 13, 2024
Copy link
Collaborator

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

Thank you

Copy link
Collaborator

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

One more note/question but could be followup (just defensive)

test/test_build.py Outdated Show resolved Hide resolved
test/test_build.py Outdated Show resolved Hide resolved
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

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

I love this! :)

Marking this as request changes, because I want to first talk to the podman desktop folks if this is alright for them, and I want to figure out if we can somehow have bib releases, so users know what version they run, and thus which flags are supported and what's the default behaviour (git SHAs aren't very friendly in this case unfortunately).

@kingsleyzissou kingsleyzissou force-pushed the deprecate-local branch 3 times, most recently from acc9c79 to e3d37c7 Compare May 15, 2024 23:17
mvo5
mvo5 previously approved these changes Jan 15, 2025
@achilleas-k achilleas-k enabled auto-merge January 15, 2025 13:31
achilleas-k
achilleas-k previously approved these changes Jan 15, 2025
@mvo5 mvo5 dismissed stale reviews from achilleas-k and themself via 4063981 January 17, 2025 08:52
@mvo5 mvo5 force-pushed the deprecate-local branch 2 times, most recently from 4063981 to e3492b6 Compare January 17, 2025 16:21
achilleas-k
achilleas-k previously approved these changes Jan 17, 2025
kingsleyzissou and others added 4 commits January 24, 2025 21:38
Pulling container images before building would break in the case of
authenticated images on podman machine, since the auth file lives on the
host and not podman machine and won't know about it.

This commit deprecates the `--local` flag and warns users when it is
passed to the CLI so that this won't break things for anyone who might
already be using the flag. This change means that the user will have to
ensure that the container is pulled to the local container store before
initiating the build.

Co-authored-by: Ondřej Budai <[email protected]>
Ensure that the containers have been copied into local
storage for all test cases.

We need to explicitly pull the container into local containers
storage with the correct arch otherwise cross-arch building
fails. The helper function uses the host-arch as a fallback
when no target arch is provided.
Since all containers are coming from local storage and require the user
to pull in the container before-hand, we can disable the `--tls-verify`
flag. The containers will not be resolved from a remote registry but
rather from the local container store.
This commit ensures all tests pull the container into local
storage before.
@kingsleyzissou
Copy link
Contributor Author

One or two more of the tests needed to pull the containers first, I updated Ondrej's commit with it.

Copy link
Collaborator

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

Thank you

@achilleas-k achilleas-k added this pull request to the merge queue Jan 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 27, 2025
@mvo5 mvo5 added this pull request to the merge queue Jan 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 27, 2025
@mvo5 mvo5 added this pull request to the merge queue Jan 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 27, 2025
@achilleas-k achilleas-k added this pull request to the merge queue Jan 30, 2025
Merged via the queue into osbuild:main with commit 4f86598 Jan 30, 2025
10 of 12 checks passed
@kingsleyzissou kingsleyzissou deleted the deprecate-local branch January 30, 2025 15:49
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.

7 participants