quarkus: Remote-Dev triggers an entire redeployment(S2I Processor) with OpenShift Extension
Describe the bug (Describe the problem clearly and concisely.) Quarkus remote-dev always triggers an entire redeployment using the S2I processor rather than sending changed code when Quarkus application is deployed to OpenShift using OpenShift extension. This causes removing an existing environment variable(QUARKUS_LAUNCH_DEVMODE=true) in the DeploymentConfig so the remote-dev breaks. Furthermore, it takes quite a time to send changed code rather than using binary deployment.
Expected behavior (Describe the expected behavior clearly and concisely.) Sending only changed code just like using binary build(i.e. oc new-build, oc start-build, oc new-app) when I do livecoding.
Actual behavior (Describe the actual behavior clearly and concisely.) Rebuild an entire project via OpenShift extension then package it for redeployment. after that, the following error is happened when I try to live coding:
2021-01-04 15:46:29,661 ERROR [io.qua.ver.htt.dep.dev.HttpRemoteDevClient] (Remote dev client thread) Remote dev request failed: java.io.IOException: Server did not start a remote dev session at io.quarkus.vertx.http.deployment.devmode.HttpRemoteDevClient$Session.doConnect(HttpRemoteDevClient.java:128) at io.quarkus.vertx.http.deployment.devmode.HttpRemoteDevClient$Session.run(HttpRemoteDevClient.java:169) at java.base/java.lang.Thread.run(Thread.java:832)
2021-01-04 15:46:29,662 ERROR [io.qua.ver.htt.dep.dev.HttpRemoteDevClient] (Remote dev client thread) Connection failed after 10 retries, exiting
This seems to be caused by removing “QUARKUS_LAUNCH_DEVMODE=true”.
To Reproduce
Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).
Or attach an archive containing the reproducer to the issue.
Steps to reproduce the behavior:
- Use a getting-started project like helloword
- Add an quarkus-openshift extension
- Add the below configurations
Configuration
quarkus.package.type=mutable-jar
quarkus.live-reload.password=REPLACE_WITH_YOUR_PASSWORD
quarkus.live-reload.url=REPLACE_WITH_YOUR_ROUTE_URL
quarkus.container-image.build=true
quarkus.kubernetes-client.trust-certs=true
quarkus.kubernetes.deployment-target=openshift
quarkus.kubernetes.deploy=true
quarkus.openshift.expose=true
Screenshots (If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
- Output of
uname -aorver: - Output of
java -version: OpenJDK 11 - GraalVM version (if different from Java):
- Quarkus version or git rev: 1.10.5.Final
- Build tool (ie. output of
mvnw --versionorgradlew --version):
Additional context (Add any other context about the problem here.)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (11 by maintainers)
Commits related to this issue
- Make the remote dev mode type more accessible Also make sure that deployment is not triggered when running the remote dev mode client. Fixes #14152 — committed to stuartwdouglas/quarkus by stuartwdouglas 3 years ago
- Make the remote dev mode type more accessible Also make sure that deployment is not triggered when running the remote dev mode client. Fixes #14152 — committed to stuartwdouglas/quarkus by stuartwdouglas 3 years ago
- Make the remote dev mode type more accessible Also make sure that deployment is not triggered when running the remote dev mode client. Fixes #14152 — committed to gsmet/quarkus by stuartwdouglas 3 years ago
Ok. It works with
quarkus.openshift.env-vars.quarkus-launch-devmode.value=trueThx for the help to fix it, @geoand
Will do.
The linked PR should fix 1), the workaround is to make sure that the property that triggers the S2I build is not set in application.properties, only on the command line when you do the initial build.
For 2) I think you should be able to do: quarkus.kubernetes.env.vars.QUARKUS_LAUNCH_DEVMODE=true
If this works we should document it.