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

Transition VirtualThreadsConfig to use @ConfigMapping #45749

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

gastaldi
Copy link
Contributor

  • Remove legacy configuration compiler arguments from Maven POM files to streamline build configuration.

Copy link

quarkus-bot bot commented Jan 21, 2025

Thanks for your pull request!

Your pull request does not follow our editorial rules. Could you have a look?

  • title should not end up with dot

This message is automatically generated by a bot.

@gastaldi gastaldi requested review from gsmet and cescoffier January 21, 2025 13:29
@gastaldi gastaldi changed the title Transition VirtualThreadsConfig to use @ConfigMapping. Transition VirtualThreadsConfig to use @ConfigMapping Jan 21, 2025
@gastaldi gastaldi added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 21, 2025

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link

github-actions bot commented Jan 21, 2025

🎊 PR Preview c5ae9ab has been successfully built and deployed to https://quarkus-pr-main-45749-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

This comment has been minimized.

@gastaldi
Copy link
Contributor Author

@manofthepeace @cescoffier I've changed the config to honor the default values, tests were failing without it

This comment has been minimized.

@gastaldi gastaldi force-pushed the vt_config branch 2 times, most recently from 3363668 to 882212e Compare January 21, 2025 19:35
- Remove legacy configuration compiler arguments from Maven POM files to streamline build configuration.
Copy link

quarkus-bot bot commented Jan 21, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 82a55d3.

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

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

@gastaldi gastaldi added the area/virtual-threads Issue related to Java's Virtual Threads label Jan 21, 2025
Copy link

quarkus-bot bot commented Jan 22, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 82a55d3.

✅ 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.apicurio.registry.devservice.DevServicesApicurioRegistryProcessor\#startApicurioRegistryDevService threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image quay.io/apicurio/apicurio-registry-mem:2.4.2.Final at io.quarkus.apicurio.registry.devservice.DevServicesApicurioRegistryProcessor.startApicurioRegistryDevService(DevServicesApicurioRegistryProcessor.java:90) 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.apicurio.registry.devservice.DevServicesApicurioRegistryProcessor#startApicurioRegistryDevService threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image quay.io/apicurio/apicurio-registry-mem:2.4.2.Final
	at io.quarkus.apicurio.registry.devservice.DevServicesApicurioRegistryProcessor.startApicurioRegistryDevService(DevServicesApicurioRegistryProcessor.java:90)
	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:256)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)

📦 integration-tests/observability-lgtm

io.quarkus.observability.test.LgtmLifecycleTest.testTracing - History

  • java.lang.RuntimeException: java.lang.reflect.InvocationTargetException - java.lang.RuntimeException
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:611)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:695)
	at java.base/java.util.Optional.orElseGet(Optional.java:364)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at io.quarkus.test.junit.TestResourceUtil$TestResourceManagerReflections.startReflectively(TestResourceUtil.java:214)

📦 integration-tests/reactive-messaging-hibernate-orm

io.quarkus.it.kafka.KafkaConnectorTest.testFruits - History

  • Assertion condition defined as a Lambda expression in io.quarkus.it.kafka.KafkaConnectorTest expected: <6> but was: <2> within 10 seconds. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a Lambda expression in io.quarkus.it.kafka.KafkaConnectorTest expected: <6> but was: <2> within 10 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:790)
	at io.quarkus.it.kafka.KafkaConnectorTest.testFruits(KafkaConnectorTest.java:53)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)

@gastaldi gastaldi merged commit 902116d into quarkusio:main Jan 22, 2025
53 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.19 - main milestone Jan 22, 2025
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 22, 2025
@gastaldi gastaldi deleted the vt_config branch January 22, 2025 01:24
@gastaldi
Copy link
Contributor Author

Related to #45446


/**
* Virtual thread name prefix. If left blank virtual threads will be unnamed.
* Virtual thread name prefix. The name of the virtual thread will be the prefix followed by a unique number.
* The default value is "quarkus-virtual-thread-".
Copy link
Member

Choose a reason for hiding this comment

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

I’m not sure why you added that? The generated doc takes care of it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah forgot about that, I'll fix in a separate PR

@@ -20,7 +20,7 @@ public class VirtualThreadsRecorder {

private static final Logger logger = Logger.getLogger("io.quarkus.virtual-threads");

static VirtualThreadsConfig config = new VirtualThreadsConfig();
static volatile VirtualThreadsConfig config;

Copy link
Member

Choose a reason for hiding this comment

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

Is there anything specific here that prevents us from using injection in build steps?

In the test below we could pass the config as a parameter?

(sorry on my phone in a waiting room…)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept the original code because I didn't want to break anything, but maybe I can improve that

Copy link
Member

Choose a reason for hiding this comment

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

Yeah fine with me, I was just surprised. We had quite a lot of bad surprises with this pattern.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't look like it's avoidable. It is necessary to create a new executor (io.quarkus.virtual.threads.VirtualThreadsRecorder#createExecutor) and I don't see a better way to do that without looking up the object again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config area/virtual-threads Issue related to Java's Virtual Threads triage/flaky-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants