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

Configurable strategy to control GraalVM build image pulling #33749

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

yrodiere
Copy link
Member

Fixes #33691

With this patch, you can set the environment variable QUARKUS_NATIVE_BUILDER_IMAGE_PULL to e.g. missing, and Quarkus will only ever pull the image if it's not available in the local docker/podman registry.

I'd appreciate if someone could test with podman as I don't have it locally, and from what I understand CI does not run against podman (yet).

I tested locally with the Hibernate ORM quickstart:

cd hibernate-orm-quickstart
# Will pull and build
mvn install -Dnative -DskipTests
# Will display "Found builder image [...] locally", will not pull and will build
QUARKUS_NATIVE_BUILDER_IMAGE_PULL=missing mvn install -Dnative -DskipTests
# Will display "Could not find builder image [...] locally", will pull and will build (and fail, obviously, since postgres is not a valid builder image)
QUARKUS_NATIVE_BUILDER_IMAGE_PULL=missing mvn install -Dnative -DskipTests -Dquarkus.native.builder-image=postgres:15.2

@quarkus-bot
Copy link

quarkus-bot bot commented May 31, 2023

✔️ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@yrodiere yrodiere merged commit 1e2a69e into quarkusio:main Jun 1, 2023
@quarkus-bot quarkus-bot bot added the kind/enhancement New feature or request label Jun 1, 2023
@quarkus-bot quarkus-bot bot added this to the 3.2 - main milestone Jun 1, 2023
yrodiere added a commit to yrodiere/quarkus that referenced this pull request Jun 1, 2023
Follows up on quarkusio#33749.

I forgot to remove this code that was just a remainder of an earlier
approach which didn't go anywhere
(quarkusio#33691 (comment)).

Keeping this code could in theory lead to extra pulls when using
quarkus.native.build-image.pull='always' (the default) and the image
gets updated right while we're building, but more importantly it could
lead to extra, unecessary queries to quay.io, so let's avoid that.
sberyozkin pushed a commit to sberyozkin/quarkus that referenced this pull request Jun 21, 2023
Follows up on quarkusio#33749.

I forgot to remove this code that was just a remainder of an earlier
approach which didn't go anywhere
(quarkusio#33691 (comment)).

Keeping this code could in theory lead to extra pulls when using
quarkus.native.build-image.pull='always' (the default) and the image
gets updated right while we're building, but more importantly it could
lead to extra, unecessary queries to quay.io, so let's avoid that.
@yrodiere yrodiere deleted the pull-strategy branch August 7, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configurable strategy to control GraalVM build image pulling
2 participants