-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Conversation
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
|
||
// stop the runner before we build the new one as the debug port being free | ||
// is tested when building the runner | ||
runner.stop(); |
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.
Do we need to do this in Gradle as well?
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.
Your guess is as good as mine :). I will try to have a look.
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 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.
Status for workflow
|
We don't support restarts on Gradle build script changes atm |
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