-
Notifications
You must be signed in to change notification settings - Fork 3k
Make substitution of JMX#createProxy conditional on inclusion of jmxserver feature #46592
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
Conversation
9ff82d0 to
d3cdbe0
Compare
|
Currently, the |
d3cdbe0 to
8abadd5
Compare
|
The reason this doesn't work is because you are setting the value at deployment time and then try to read it at native-image build time. When compiling a Quarkus native application the following two phases/steps take place:
Any code in The best way IMHO would be to see if jmx-server is included in The simplest way I can think of is to use a property, e.g. |
|
Thank you @zakkak for the detailed explanation! I hadn't realized there were two separate processes. I'll give your suggestion a try. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please squash the two commits and have a look at my suggestion.
Thanks for the contribution!
core/runtime/src/main/java/io/quarkus/runtime/graal/Target_javax_management_JMX.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
…built into the image.
42964a5 to
11b06d9
Compare
|
Thanks @zakkak! I've adopted your suggestion and also squashed the commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @roberttoyonaga !
Status for workflow
|
| Status | Name | Step | Failures | Logs | Raw logs | Build scan |
|---|---|---|---|---|---|---|
| ✖ | MicroProfile TCKs Tests | Verify |
Failures | Logs | Raw logs | 🔍 |
You can consult the Develocity build scans.
Failures
⚙️ MicroProfile TCKs Tests #
- Failing: tcks/microprofile-opentelemetry
📦 tcks/microprofile-opentelemetry
✖ Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.5.2:test (tracing) on project quarkus-tck-microprofile-opentelemetry: There are test failures.
See /home/runner/_work/quarkus/quarkus/tcks/microprofile-opentelemetry/target/surefire-reports-tracing for the individual test results.
See dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
Flaky tests - Develocity
⚙️ JVM Tests - JDK 17
📦 extensions/scheduler/deployment
✖ io.quarkus.scheduler.test.PausedSchedulerTest.testSchedulerPauseResume - History
expected: <false> but was: <true>-org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
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.AssertFalse.failNotFalse(AssertFalse.java:63)
at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:36)
at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:31)
at org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:231)
at io.quarkus.scheduler.test.PausedSchedulerTest.testSchedulerPauseResume(PausedSchedulerTest.java:47)
⚙️ JVM Tests - JDK 17 Windows
📦 extensions/hibernate-orm/deployment
✖ io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest.testFieldAccess - History
Expecting actual not to be null-java.lang.AssertionError
java.lang.AssertionError:
Expecting actual not to be null
at io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest$FieldAccessEnhancedDelegate$1.assertValue(PublicFieldAccessInheritanceTest.java:141)
at io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest.doTestFieldAccess(PublicFieldAccessInheritanceTest.java:100)
at io.quarkus.hibernate.orm.applicationfieldaccess.PublicFieldAccessInheritanceTest.testFieldAccess(PublicFieldAccessInheritanceTest.java:61)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at io.quarkus.test.QuarkusUnitTest.runExtensionMethod(QuarkusUnitTest.java:521)
📦 extensions/micrometer-opentelemetry/deployment
✖ io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod - 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(MicrometerTimedInterceptorTest.java:77)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at io.quarkus.test.QuarkusUnitTest.runExtensionMethod(QuarkusUnitTest.java:521)
This is a fix for: #46506
This change makes the substitution that prevents use of
JMX#createProxyconditional. The substitution should only be enabled if thejmxserverfeature is not included in the image build.