Skip to content

Conversation

holly-cummins
Copy link
Contributor

It's so easy to call the Log methods, but we can't rely on bytecode manipulation in our own code.

Copy link

quarkus-bot bot commented Jun 17, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 0cbe2e6.

✅ 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 Integration Tests - JDK 17

📦 integration-tests/opentelemetry

io.quarkus.it.opentelemetry.LoggingResourceTest.testException - History

  • Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.it.opentelemetry.LoggingResourceTest.testException(LoggingResourceTest.java:113)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)

📦 integration-tests/opentelemetry-grpc-only

io.quarkus.it.opentelemetry.grpc.HelloGrpcClientTest.testHello - History

  • java.lang.RuntimeException: Failed to start quarkus - java.lang.RuntimeException
java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:668)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:763)
	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: Failed to start quarkus
	at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)

⚙️ JVM Integration Tests - JDK 21

📦 integration-tests/opentelemetry

io.quarkus.it.opentelemetry.LoggingResourceTest.testException - History

  • Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.it.opentelemetry.LoggingResourceTest.testException(LoggingResourceTest.java:113)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)

@geoand
Copy link
Contributor

geoand commented Jun 18, 2025

I wonder if we should ban the use of that logger in our code...

@geoand geoand merged commit 4b57452 into quarkusio:main Jun 18, 2025
57 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.25 - main milestone Jun 18, 2025
@holly-cummins
Copy link
Contributor Author

I wonder if we should ban the use of that logger in our code...

I think that's a really good idea. I've accidentally introduced it in at least two PRs, possibly more.

@holly-cummins holly-cummins deleted the do-not-use-static-logging-in-quarkus-classes branch June 20, 2025 15:18
@metacosm
Copy link
Contributor

I wonder if we should ban the use of that logger in our code...

I think that's a really good idea. I've accidentally introduced it in at least two PRs, possibly more.

Should that ban extend to extensions as well? Out of curiosity, since I haven't followed the issue, what's the problem with using Log in Quarkus? The fact that it's relying on Quarkus itself to do its work, thus introducing potential deadlocks / unwanted recursion?

@geoand
Copy link
Contributor

geoand commented Jun 27, 2025

Quarkus' Log only works on code that can be bytecode transformed, which excludes Quarkus code.

@geoand
Copy link
Contributor

geoand commented Jun 27, 2025

Should that ban extend to extensions as well?

Extensions should also follow the same principal, but we don't control them (and don't even have the same maven plugins that we use in this repo configured in the template generator)

@metacosm
Copy link
Contributor

Should that ban extend to extensions as well?

Extensions should also follow the same principal, but we don't control them (and don't even have the same maven plugins that we use in this repo configured in the template generator)

Something to be added to the extension guide, then.

@holly-cummins
Copy link
Contributor Author

Or should we add a banned config to the template generator? There are probably other APIs we might want to ban (looking at how much @gsmet has put into #48655).

@holly-cummins
Copy link
Contributor Author

I initially thought putting it in the guide was a good idea, but now I'm less sure. If we put it in the extension guide, would people see it at the right point? And if we put it in the logging guide, it clutters up user-facing content with extension-author-content (and people still might not see it at the right point). If it genuinely won't work, static analysis and a build-time failure seem more appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants