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

Support reading build-time config properties in code generation #20819

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

michalszynkiewicz
Copy link
Member

fixes #19389

@quarkus-bot quarkus-bot bot added area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/grpc gRPC area/maven labels Oct 18, 2021

compileJavaTask.dependsOn(quarkusGenerateCode);
compileJavaTask.mustRunAfter(quarkusGenerateCodeDev);
compileJavaTask.mustRunAfter(quarkusGenerateCode);
Copy link
Member

Choose a reason for hiding this comment

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

@glefloch can you think of a trick to make quarkusGenerateCodeDev run only when the intention is to launch the dev mode? Perhaps, the task can be disabled by default and enabled by the quarkusDev somehow?

Copy link
Member

Choose a reason for hiding this comment

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

right, I'm working a branch, that will only register task instead of creating them. This should allow gradle to only create task depending on the task graph.

Copy link
Member

Choose a reason for hiding this comment

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

Great, thanks @glefloch Should we merge this one or wait on your PR first?

Copy link
Member

Choose a reason for hiding this comment

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

We can merge this one.

@aloubyansky
Copy link
Member

@michalszynkiewicz could you please look into the CI failures?

@michalszynkiewicz
Copy link
Member Author

checking

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 18, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 382d33b

Status Name Step Failures Logs Raw logs
Gradle Tests - JDK 11 Build Failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build Failures Logs Raw logs
Maven Tests - JDK 11 Build Failures Logs Raw logs
Maven Tests - JDK 11 Windows Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Gradle Tests - JDK 11 #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.devmode.ResourcesInBuildStepsDevModeTest.main line 36 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting path:

⚙️ Gradle Tests - JDK 11 Windows #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.devmode.ResourcesInBuildStepsDevModeTest.main line 36 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting path:

⚙️ Maven Tests - JDK 11 #

- Failing: integration-tests/maven 

📦 integration-tests/maven

io.quarkus.maven.it.DevMojoIT.testThatTheApplicationIsReloadedOnPomChange line 476 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with io.quarkus.maven.it.DevMojoIT was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:166)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

io.quarkus.maven.it.DevMojoIT.testThatTheApplicationIsReloadedOnPomChange line 476 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with io.quarkus.maven.it.DevMojoIT was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:166)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

⚙️ Maven Tests - JDK 11 Windows #

- Failing: integration-tests/maven 

📦 integration-tests/maven

io.quarkus.maven.it.DevMojoIT.testThatTheApplicationIsReloadedOnPomChange line 476 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with io.quarkus.maven.it.DevMojoIT was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:166)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

io.quarkus.maven.it.DevMojoIT.testThatTheApplicationIsReloadedOnPomChange line 476 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with io.quarkus.maven.it.DevMojoIT was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:166)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

@michalszynkiewicz
Copy link
Member Author

It's definitely my PR that changes breaks something.
The test adds an openapi extensiont to a project and verifies that the openapi documentation is then available.
I tested it outside tests and I'm getting 404 on /q/openapi on the reload, and the extensions listed are as follows (i.e. openapi is missing from the list of extensions too):

2021-10-18 14:41:43,898 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, grpc-server, resteasy-reactive, smallrye-context-propagation, vertx]

I'll investigate further

public Map<String, String> properties() {
return properties;
public Config config() {
return config;
}
Copy link
Member

Choose a reason for hiding this comment

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

@michalszynkiewicz are we sure no one else in the ecosystem is using this API?

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't heard of anyone...

@michalszynkiewicz
Copy link
Member Author

It's definitely my PR that changes breaks something. The test adds an openapi extensiont to a project and verifies that the openapi documentation is then available. I tested it outside tests and I'm getting 404 on /q/openapi on the reload, and the extensions listed are as follows (i.e. openapi is missing from the list of extensions too):

2021-10-18 14:41:43,898 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, grpc-server, resteasy-reactive, smallrye-context-propagation, vertx]

I'll investigate further

fixed

@aloubyansky aloubyansky merged commit d06fa24 into quarkusio:main Oct 19, 2021
@quarkus-bot quarkus-bot bot added this to the 2.5 - main milestone Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/grpc gRPC area/maven
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code generation: Support reading build-time config properties
3 participants