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 docker templates and platform to support ubi8 and ubi9 #46567

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

ia3andy
Copy link
Contributor

@ia3andy ia3andy commented Feb 28, 2025

Supersed #46538

Current Challenges

CLI Version Target Version Base Image Builder Image Status
Old CLI (<3.19) <3.19 UBI8 UBI8 ✅ OK
Old CLI (<3.19) 3.19+ UBI8 UBI9 ❌ BAD (incompatible)
New CLI (3.19+) <3.19 UBI9 UBI8 ✅ OK (support issue)
New CLI (3.19+) 3.19+ UBI9 UBI9 ✅ OK

Solution

  • Set platform.codestart.metadata.dockerfile.from.XX to UBI9.
  • Keep UBI8 as the default in the template.
  • Modify the template to introduce a new eval-based variable (only available in 3.19+).

New Behavior

CLI Version Target Version Base Image Builder Image Status
Old CLI (<3.19) <3.19 UBI8 UBI8 ✅ OK
Old CLI (<3.19) 3.19+ UBI8 UBI9 ✅ ~OK (java version is not dynamic)
New CLI (3.19+) <3.19 UBI8 UBI8 ✅ OK
New CLI (3.19.2+) 3.19.2+ UBI9 UBI9 ✅ OK
Old CLI 3.19.1 ❌ Broken

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/platform Issues related to definition and interaction with Quarkus Platform labels Feb 28, 2025
@ia3andy
Copy link
Contributor Author

ia3andy commented Feb 28, 2025

There is not point on using ubi9 on the codestart generation test which use mock data and is not testing CreateProjectCommandHandler (responsible of using the platform project metadata)

This comment has been minimized.

@ia3andy
Copy link
Contributor Author

ia3andy commented Feb 28, 2025

Here are the commands I tested:

qs3.18 create app foo-3.19-17-old -P=io.quarkus::999-SNAPSHOT --java=17
qs3.18 create app foo-3.19-21-old -P=io.quarkus::999-SNAPSHOT --java=21
qss create app foo-3.18 -S=3.18
qss create app foo-3.19 -P=io.quarkus::999-SNAPSHOT
qss create app foo-3.19-17 -P=io.quarkus::999-SNAPSHOT --java=17

This comment has been minimized.

Copy link

quarkus-bot bot commented Feb 28, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 430d1db.

✅ 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.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 extensions/smallrye-reactive-messaging-kafka/deployment

io.quarkus.smallrye.reactivemessaging.kafka.deployment.testing.KafkaDevServicesContinuousTestingTestCase.testContinuousTestingScenario2 - History

  • io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.redis.deployment.client.DevServicesRedisProcessor\#startRedisContainers threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image docker.io/redis:7 at io.quarkus.redis.deployment.client.DevServicesRedisProcessor.startRedisContainers(DevServicesRedisProcessor.java:124) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732) at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856) - java.lang.RuntimeException
java.lang.RuntimeException: 
io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.redis.deployment.client.DevServicesRedisProcessor#startRedisContainers threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image docker.io/redis:7
	at io.quarkus.redis.deployment.client.DevServicesRedisProcessor.startRedisContainers(DevServicesRedisProcessor.java:124)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:255)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)

⚙️ JVM Tests - JDK 21

📦 extensions/micrometer-opentelemetry/deployment

io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod_AsyncFailed - History

  • Stream has no elements - java.lang.IllegalArgumentException
java.lang.IllegalArgumentException: Stream has no elements
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lambda$lastReading$2(MetricDataFilter.java:213)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lastReading(MetricDataFilter.java:213)
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lastReadingDataPoint(MetricDataFilter.java:231)
	at io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod_AsyncFailed(MicrometerTimedInterceptorTest.java:150)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at io.quarkus.test.QuarkusUnitTest.runExtensionMethod(QuarkusUnitTest.java:521)

⚙️ JVM Integration Tests - JDK 21

📦 integration-tests/oidc-client-wiremock

io.quarkus.it.keycloak.OidcClientTest.testGetAccessTokenWithConfiguredExpiresIn - History

  • expected: <true> but was: <false> - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:183)
	at io.quarkus.it.keycloak.OidcClientTest.testGetAccessTokenWithConfiguredExpiresIn(OidcClientTest.java:68)
  • expected: <true> but was: <false> - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:183)
	at io.quarkus.it.keycloak.OidcClientTest.testGetAccessTokenWithConfiguredExpiresIn(OidcClientTest.java:68)

@gsmet
Copy link
Member

gsmet commented Mar 3, 2025

@cescoffier @ia3andy @aloubyansky @gastaldi let's make sure we address this tomorrow as we need a fix for the next 3.19 (and I will probably try to release something on Wednesday).

Copy link
Member

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

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

LGTM,

It would be helpful to to add a comment explaining why in the codestart template we stick to UBI8 images (for my future self)

@@ -5,6 +5,6 @@ language:
data:
dockerfile:
native:
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a comment (it's yaml, so we can) explaining why here we want to stay on UBI8 and not switch to UBI9?

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

I will merge it so that I can backport it this evening but I agree with @cescoffier that a comment would be nice.
It can be done as a followup.

@gsmet gsmet merged commit b5f8c6a into quarkusio:main Mar 4, 2025
58 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.21 - main milestone Mar 4, 2025
@gsmet gsmet modified the milestones: 3.21 - main, 3.19.2 Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/platform Issues related to definition and interaction with Quarkus Platform triage/flaky-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants