-
Notifications
You must be signed in to change notification settings - Fork 3k
Config - Avoid producing duplicate GeneratedClassBuildItem #50278
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
@radcortez I would appreciate if you could prioritize the review as we need the fix in 3.28.2. |
The check seems to be failing with other generated classes. |
This comment has been minimized.
This comment has been minimized.
🎊 PR Preview 0075acc has been successfully built and deployed to https://quarkus-pr-main-50278-preview.surge.sh/version/main/guides/
|
I'll have a look once I get a full CI report. |
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.
Thanks for the quick fix :)
BuildProducer<AdditionalConstrainedClassBuildItem> additionalConstrainedClasses) { | ||
|
||
processConfigClasses(combinedIndex, generatedClasses, reflectiveClasses, reflectiveMethods, configClasses, | ||
Map<String, GeneratedClassBuildItem> generatedConfigClasses = new HashMap<>(); |
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.
(Not very familiar with the code-generation code, so ignore my comment, if it doesn't apply)
Should this be a LinkedHashMap
for reproducibility?
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.
The elements are sorted when necessary i.e. later when assembling the jar.
Build steps are generating classes in parallel so the list is not really ordered.
BuildProducer<AdditionalConstrainedClassBuildItem> additionalConstrainedClasses) { | ||
|
||
processConfigMapping(combinedIndex, generatedClasses, reflectiveClasses, reflectiveMethods, configClasses, | ||
Map<String, GeneratedClassBuildItem> generatedConfigClasses = new HashMap<>(); |
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.
(Not very familiar with the code-generation code, so ignore my comment, if it doesn't apply)
Should this be a LinkedHashMap
for reproducibility?
byte[] classBytes = mappingMetadata.getClassBytes(); | ||
generatedClasses.produce(new GeneratedClassBuildItem(isApplicationClass, mappingMetadata.getClassName(), | ||
classBytes)); | ||
generatedConfigClasses.put(mappingMetadata.getClassName(), |
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.
Wonder if it's sufficient to check for generatedConfigClasses.put() != null
instead of doing a Stream.sorted().count()
in AbstractJarBuilder
.
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.
I want the full list of problematic classes, otherwise it makes fixing issues very annoying.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Also guard against it in the Jar generation to make sure we don't end up with duplicate entries. Fixes quarkusio#50265
… multiple interfaces
ae51595
to
fc8f1fd
Compare
Status for workflow
|
Status for workflow
|
Status | Name | Step | Failures | Logs | Raw logs | Build scan |
---|---|---|---|---|---|---|
❌ | Gradle Tests - JDK 17 | Build |
Failures | Logs | Raw logs | 🔍 |
✔️ | Gradle Tests - JDK 17 Windows | Logs | Raw logs | 🚧 |
Full information is available in the Build summary check run.
You can consult the Develocity build scans.
Failures
⚙️ Gradle Tests - JDK 17 #
- Failing: integration-tests/gradle
📦 integration-tests/gradle
❌ io.quarkus.gradle.TestFixturesClientExceptionMapperTest.testBasicMultiModuleBuild
line 12
- History - More details - Source on GitHub
java.lang.AssertionError: Gradle build failed with exit code 1
at io.quarkus.gradle.QuarkusGradleWrapperTestBase.runGradleWrapper(QuarkusGradleWrapperTestBase.java:173)
at io.quarkus.gradle.QuarkusGradleWrapperTestBase.runGradleWrapper(QuarkusGradleWrapperTestBase.java:87)
at io.quarkus.gradle.QuarkusGradleWrapperTestBase.runGradleWrapper(QuarkusGradleWrapperTestBase.java:82)
at io.quarkus.gradle.TestFixturesClientExceptionMapperTest.testBasicMultiModuleBuild(TestFixturesClientExceptionMapperTest.java:12)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
📦 integration-tests/gradle/target/classes/test-fixtures-client-exception-mapper
❌ org.example.MyRemoteServiceTest.testGetExtensionsById()
- History - More details - Source on GitHub
jakarta.ws.rs.ProcessingException: io.netty.channel.ConnectTimeoutException: connection timed out after 15000 ms: stage.code.quarkus.io/44.199.152.74:443
at org.jboss.resteasy.reactive.client.handlers.ClientSendRequestHandler$2.accept(ClientSendRequestHandler.java:235)
at org.jboss.resteasy.reactive.client.handlers.ClientSendRequestHandler$2.accept(ClientSendRequestHandler.java:227)
at io.smallrye.context.impl.wrappers.SlowContextualConsumer.accept(SlowContextualConsumer.java:21)
at io.smallrye.mutiny.helpers.UniCallbackSubscriber.onFailure(UniCallbackSubscriber.java:62)
at io.smallrye.mutiny.operators.uni.UniOperatorProcessor.onFailure(UniOperatorProcessor.java:55)
at org.jboss.resteasy.reactive.client.AsyncResultUni.lambda$subscribe$1(AsyncResultUni.java:37)
at io.vertx.core.impl.future.FutureImpl$4.onFailure(FutureImpl.java:188)
Flaky tests - Develocity
⚙️ JVM Tests - JDK 17
📦 test-framework/jacoco/runtime
❌ io.quarkus.jacoco.runtime.DataFileWatchTest.waitForDataFileThatNeverAppears
- History
Expecting value to be false but was true
-org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError:
Expecting value to be false but was true
at io.quarkus.jacoco.runtime.DataFileWatchTest.waitForDataFileThatNeverAppears(DataFileWatchTest.java:208)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
⚙️ JVM Tests - JDK 21
📦 extensions/smallrye-openapi/deployment
❌ io.quarkus.smallrye.openapi.test.vertx.OpenApiHttpRootPathCorsTestCase.testCorsFilterProperties
- History
1 expectation failed. Expected status code <200> but was <500>.
-java.lang.AssertionError
java.lang.AssertionError:
1 expectation failed.
Expected status code <200> but was <500>.
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:73)
⚙️ Maven Tests - JDK 17 Windows
📦 integration-tests/devmode
❌ io.quarkus.test.devui.DevUIGrpcSmokeTest.testTestService
- History
Too many recursions, message not returned for id [123205416]
-java.lang.RuntimeException
java.lang.RuntimeException: Too many recursions, message not returned for id [123205416]
at io.quarkus.devui.tests.DevUIJsonRPCTest.objectResultFromJsonRPC(DevUIJsonRPCTest.java:175)
at io.quarkus.devui.tests.DevUIJsonRPCTest.objectResultFromJsonRPC(DevUIJsonRPCTest.java:178)
at io.quarkus.devui.tests.DevUIJsonRPCTest.objectResultFromJsonRPC(DevUIJsonRPCTest.java:178)
at io.quarkus.devui.tests.DevUIJsonRPCTest.objectResultFromJsonRPC(DevUIJsonRPCTest.java:178)
at io.quarkus.devui.tests.DevUIJsonRPCTest.objectResultFromJsonRPC(DevUIJsonRPCTest.java:178)
at io.quarkus.devui.tests.DevUIJsonRPCTest.objectResultFromJsonRPC(DevUIJsonRPCTest.java:178)
at io.quarkus.devui.tests.DevUIJsonRPCTest.objectResultFromJsonRPC(DevUIJsonRPCTest.java:178)
⚙️ Gradle Tests - JDK 17 Windows
📦 integration-tests/gradle
❌ io.quarkus.gradle.TestFixturesClientExceptionMapperTest.testBasicMultiModuleBuild
- History
Gradle build failed with exit code 1
-java.lang.AssertionError
java.lang.AssertionError: Gradle build failed with exit code 1
at io.quarkus.gradle.QuarkusGradleWrapperTestBase.runGradleWrapper(QuarkusGradleWrapperTestBase.java:173)
at io.quarkus.gradle.QuarkusGradleWrapperTestBase.runGradleWrapper(QuarkusGradleWrapperTestBase.java:87)
at io.quarkus.gradle.QuarkusGradleWrapperTestBase.runGradleWrapper(QuarkusGradleWrapperTestBase.java:82)
at io.quarkus.gradle.TestFixturesClientExceptionMapperTest.testBasicMultiModuleBuild(TestFixturesClientExceptionMapperTest.java:12)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Also guard against it in the Jar generation to make sure we don't end up with duplicate entries.
Fixes #50265