-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Avoid making IsolatedDevModeMain and allegates static for no good reason #41726
Conversation
This comment has been minimized.
This comment has been minimized.
@geoand not the most glamorous patch but I would appreciate a review :). It's really about trying to reduce the number of static things and cross references. |
if (context.isTest() || context.isAbortOnFailedStart()) { | ||
return TestExitCodeHandler.INSTANCE; | ||
} | ||
|
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.
Here we isolate this special case to avoid pushing an object that has a reference to the IsolatedDevModeMain
instance to a static field, when we can avoid it (and in the case of testing, this is a noop so we really don't need to complicate things).
@@ -0,0 +1,18 @@ | |||
package io.quarkus.deployment.dev; | |||
|
|||
public class DeploymentProblem { |
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.
Is there a good reason to introduce this vs using AtomicReference
?
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.
No, old habits :). I adjusted to use AtomicReference
.
Also avoid a reference to IsolatedDevModeMain from ApplicationLifecycleManager.
Status for workflow
|
Status | Name | Step | Failures | Logs | Raw logs | Build scan |
---|---|---|---|---|---|---|
✖ | Kubernetes Tests - JDK 17 | Build |
Logs | Raw logs | 🚧 | |
✔️ | Kubernetes Tests - JDK 21 | Logs | Raw logs | 🔍 | ||
✔️ | Kubernetes Tests - JDK 17 Windows | Logs | Raw logs | 🔍 |
You can consult the Develocity build scans.
Flaky tests - Develocity
⚙️ JVM Tests - JDK 17 Windows
📦 extensions/amazon-lambda/deployment
✖ io.quarkus.amazon.lambda.deployment.testing.InputCollectionOutputCollectionLambdaTest.requestHandler_InputCollectionInputPerson_OutputCollectionOutputPerson
- History
1 expectation failed. JSON path doesn't match. Expected: a collection containing map containing ["outputname"->"Fred"] Actual: <[{outputname=Chris}]>
-java.lang.AssertionError
java.lang.AssertionError:
1 expectation failed.
JSON path doesn't match.
Expected: a collection containing map containing ["outputname"->"Fred"]
Actual: <[{outputname=Chris}]>
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
Also avoid a reference to IsolatedDevModeMain from ApplicationLifecycleManager.