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

Make sure we transmit the actual debug port to next dev mode run #41043

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Jun 7, 2024

When starting dev mode, the debug port might not be free and we might use a random one.
When restarting dev mode (for instance when you adjust the pom.xml), we should try to reuse this port instead of defaulting to the initially non free one.

Also the port being free is tested when we build DevModeRunner, so we need to make sure we stop the old runner before build()ing the new instance (and not just before we start the new one).

Fixes #40848

When starting dev mode, the debug port might not be free and we might
use a random one.
When restarting dev mode (for instance when you adjust the pom.xml), we
should try to reuse this port instead of defaulting to the initially non
free one.

Also the port being free is tested when we build `DevModeRunner`, so we
need to make sure we stop the old runner before build()ing the new
instance (and not just before we start the new one).

Fixes quarkusio#40848
@gsmet gsmet requested a review from geoand June 7, 2024 07:13
@quarkus-bot quarkus-bot bot added area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven labels Jun 7, 2024

// stop the runner before we build the new one as the debug port being free
// is tested when building the runner
runner.stop();
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to do this in Gradle as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Your guess is as good as mine :). I will try to have a look.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't see the restart logic in Gradle but I'm not very familiar with how it works.

Maybe @glefloch or @aloubyansky know more.

But I wouldn't block this PR as the current Maven behavior is a bit annoying.

Copy link

quarkus-bot bot commented Jun 7, 2024

Status for workflow Quarkus CI

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

✅ 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

📦 integration-tests/reactive-messaging-kafka

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

  • Assertion condition defined as a Lambda expression in io.quarkus.it.kafka.KafkaConnectorTest expected: <6> but was: <5> 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: <5> 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:63)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)

⚙️ JVM Tests - JDK 21

📦 integration-tests/reactive-messaging-kafka

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

  • Assertion condition defined as a Lambda expression in io.quarkus.it.kafka.KafkaConnectorTest expected: <6> but was: <5> 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: <5> 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:63)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)

@gsmet gsmet merged commit 0da2b3f into quarkusio:main Jun 7, 2024
52 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.12 - main milestone Jun 7, 2024
@aloubyansky
Copy link
Member

We don't support restarts on Gradle build script changes atm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven kind/bugfix triage/flaky-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

devmode breaks when updating pom.xml
3 participants