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

Codestart modularize Dockerfiles #42601

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vsevel
Copy link
Contributor

@vsevel vsevel commented Aug 16, 2024

This is an alternate proposition for #42589

there are 2 main include, which provide an overall view for docker files:

  • Dockerfile-jar.include.qute
  • Dockerfile-native.include.qute

each one includes a FROM include, which will allow for easy override:

  • Dockerfile-jar-from.include.qute
  • Dockerfile-native-from.include.qute

all 4 templates Dockerfile.tpl.qute... merely include one of the 2 main include.

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform labels Aug 16, 2024
@vsevel vsevel force-pushed the feature/codestart_modularize_dockerfiles_bis branch 3 times, most recently from 2e68c6f to a66b3b7 Compare August 16, 2024 17:50
@vsevel vsevel requested review from gsmet and ia3andy August 16, 2024 17:52
Copy link
Contributor

@ia3andy ia3andy left a comment

Choose a reason for hiding this comment

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

You should be able to have only one include file for all types (native and non native), just use a Let https://quarkus.io/guides/qute-reference#let_section to set the value for jvm

Copy link
Contributor

@ia3andy ia3andy left a comment

Choose a reason for hiding this comment

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

Neat @vsevel

@vsevel vsevel force-pushed the feature/codestart_modularize_dockerfiles_bis branch from 2769139 to 86b193e Compare August 19, 2024 11:51
@vsevel vsevel force-pushed the feature/codestart_modularize_dockerfiles_bis branch from 86b193e to a500337 Compare August 19, 2024 11:54
@vsevel vsevel changed the title Codestart modularize dockerfiles bis Codestart modularize Dockerfiles Aug 19, 2024
@vsevel vsevel force-pushed the feature/codestart_modularize_dockerfiles_bis branch 2 times, most recently from 2dd738d to 14bcb6f Compare August 19, 2024 12:04
@vsevel
Copy link
Contributor Author

vsevel commented Aug 19, 2024

the original intent was to allow overriding the FROM by redefining the template. but we reverted that.
instead we simplified the templates by providing just 2 include templates that are used from all 4 templates (jvm, legacy, ...).

@vsevel vsevel marked this pull request as ready for review August 19, 2024 12:29
Copy link
Contributor

@ia3andy ia3andy left a comment

Choose a reason for hiding this comment

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

Perfect!

@quarkus-bot

This comment has been minimized.

@maxandersen
Copy link
Contributor

wonder how it relates to #42316

@quarkus-bot

This comment has been minimized.

@ia3andy
Copy link
Contributor

ia3andy commented Aug 20, 2024

@gsmet waiting for your final word on this one too to merge it

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.

Sorry for the delay. I like this approach a lot better, thanks.

There's only one thing that is bothering me a bit. Could you adjust? Then I think we can merge.

And we will have to discuss what you achieve here with the work of @iocanel on the dynamic generation of templates.

@vsevel vsevel force-pushed the feature/codestart_modularize_dockerfiles_bis branch 2 times, most recently from 56f1344 to 3cc866a Compare September 10, 2024 12:14
@vsevel vsevel force-pushed the feature/codestart_modularize_dockerfiles_bis branch from 3cc866a to 411f65e Compare September 10, 2024 12:21
@vsevel
Copy link
Contributor Author

vsevel commented Sep 10, 2024

I made the change and rebased. I think we are good @gsmet .

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 10, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 411f65e.

Failing Jobs

Status Name Step Failures Logs Raw logs Build scan
JVM Tests - JDK 17 Build Failures Logs Raw logs 🔍
JVM Tests - JDK 21 Build Failures Logs Raw logs 🔍
JVM Tests - JDK 17 Windows Build Failures Logs Raw logs 🔍

Full information is available in the Build summary check run.
You can consult the Develocity build scans.

Failures

⚙️ JVM Tests - JDK 17 #

- Failing: independent-projects/tools/devtools-testing 
! Skipped: devtools/cli devtools/gradle/gradle-application-plugin devtools/gradle/gradle-extension-plugin and 7 more

📦 independent-projects/tools/devtools-testing

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateGradleDefaultJava(TestInfo) line 210 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateMavenConfigYamlJava(TestInfo) line 248 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateMavenDefaultJava(TestInfo) line 191 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateMavenResteasyJava(TestInfo) line 229 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateRESTEasyJavaCustom(TestInfo) line 82 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateRESTEasyKotlinCustom(TestInfo) line 130 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateRESTEasyScalaCustom(TestInfo) line 163 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

⚙️ JVM Tests - JDK 21 #

- Failing: independent-projects/tools/devtools-testing 
! Skipped: devtools/cli devtools/gradle/gradle-application-plugin devtools/gradle/gradle-extension-plugin and 7 more

📦 independent-projects/tools/devtools-testing

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateGradleDefaultJava(TestInfo) line 210 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateMavenConfigYamlJava(TestInfo) line 248 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateMavenDefaultJava(TestInfo) line 191 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateMavenResteasyJava(TestInfo) line 229 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateRESTEasyJavaCustom(TestInfo) line 82 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateRESTEasyKotlinCustom(TestInfo) line 130 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateRESTEasyScalaCustom(TestInfo) line 163 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

⚙️ JVM Tests - JDK 17 Windows #

- Failing: independent-projects/tools/devtools-testing 
! Skipped: devtools/cli devtools/gradle/gradle-application-plugin devtools/gradle/gradle-extension-plugin and 7 more

📦 independent-projects/tools/devtools-testing

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateGradleDefaultJava(TestInfo) line 210 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateMavenConfigYamlJava(TestInfo) line 248 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateMavenDefaultJava(TestInfo) line 191 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateMavenResteasyJava(TestInfo) line 229 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateRESTEasyJavaCustom(TestInfo) line 82 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateRESTEasyKotlinCustom(TestInfo) line 130 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartGenerationTest.generateRESTEasyScalaCustom(TestInfo) line 163 - History - More details - Source on GitHub

org.assertj.core.error.AssertJMultipleFailuresError: 

Multiple Failures (1 failure)
-- failure 1 --
Expecting actual:
  "####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#

Flaky tests - Develocity

⚙️ Native Tests - HTTP

📦 integration-tests/rest-client-reactive

io.quarkus.it.rest.client.BasicTestIT.shouldCreateClientSpans - History

  • expected: <1> but was: <2> - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: expected: <1> but was: <2>
	at io.quarkus.it.rest.client.BasicTest.shouldCreateClientSpans(BasicTest.java:216)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:810)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

Copy link
Contributor

@maxandersen maxandersen left a comment

Choose a reason for hiding this comment

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

Yeah. Well want to figure how this relates to the regeneration work before we merge it.

I think it can be aligned but as it is now we would end up with two approaches that are related but having duplicated maintanence and different level of customization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codestarts area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform area/security area/testing triage/flaky-test
Projects
Development

Successfully merging this pull request may close these issues.

4 participants