-
Notifications
You must be signed in to change notification settings - Fork 84
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
assemble broken for Spring Boot and devtools since 2.3.0 #171
Comments
@jeffmaury I'm interested in helping with this (unless you're about to raise a PR with a fix?). This, like e.g. #169, may have been an impact of @rhuss's #165, and in the move ... ideally, I would like to use this as the opportunity to learn more about the feature behind this, where the s2i assemble script explodes the Spring Boot fat JAR if Spring Boot devtools dependency is found ... do we have doc about this? Interested, because just the other day @edewit and I were talking how something like https://github.com/GoogleContainerTools/skaffold-tools-for-java (see https://github.com/GoogleContainerTools/skaffold) for OpenShift would like like... but sounds like we may already have this? If I can learn more about it, we can make sure it doesn't break anymore here in the future. |
@jeffmaury are you having the problem with the |
Oh, just found https://github.com/fabric8io-images/s2i/tree/master/java/images/centos#spring-boot-automatic-restarts from #81 by @dhirajsb ... let me see if I can add an examples/spring-devtools (alongside my earlier maven, maven-wrapper, binary, gradle) which showcases, and integration tests this (for future non-regression). |
@jeffmaury (or @dhirajsb or anyone else familiar with this stuff .. and FYI @edewit) I've toyed with this a bit and come up with #173 BUT (a) I cannot yet reproduce anything broken due to a missing I could debug it further by looking at what #81 did in |
Not really remember how it works, just that the Spring Boot Devtools, which are required for hot-reload support, don't work on fat jar but only on the exploded one. 'would be interesting whether for new Spring Boot versions this is still the case. |
So the assemble script works that way:
so step 2 is broken as it uses unzip which is not anymore in the image. Why don't we use jar for that ? |
good point, should have been catched in the review as the feature has been introduced. |
@jeffmaury but why does my example, where the fat fat JAR does contain spring-devtools, not cause the unzip and reproduce this problem? A reproducer (example) would be a useful first step here IMHO. |
I supposed your sample is correct but the script is wrong as unzip is not there and you need to check the logs to check for the exploded message |
That's an idea, and we could do this e.g. in https://github.com/OASIS-learn-study/swissarmyknife-minecraft-server/pull/14/files, but here in this project it's not just search & replace of "unzip" by "jar xvf", because of args ( Alternatively, therefore, and IMHO safer and better for anyone else this may affect, we should just fix the regression we introduced in the move |
@jeffmaury with the just merged #185 Are you able to test to confirm if this issue is fixed? Using |
Using Spring Boot 2.1.3.RELEASE the code works, but the test is invalid as my fat jar does not include the dev tools jar. Skipping that test and just look for the main class would in my opinion be sufficient. |
@m86194 a Pull Request with (more) fixes for this, or a working test, would probably be welcome. (FYI I'm no longer involved with this project, and just un-watched this issue.) |
The s2i assemble script is supposed to explode the Spring Boot fat JAR if Spring Boot devtools dependency is found. It is broken since 2.3.0 as unzip is not found anymore in the image.
The text was updated successfully, but these errors were encountered: