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

quarkus:dev hot reload behavior changed & UI resources not being loaded (new in 2.4.0.Final, works in 2.3.1.Final) #20974

Closed
nastra opened this issue Oct 25, 2021 · 9 comments · Fixed by #20986
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@nastra
Copy link
Contributor

nastra commented Oct 25, 2021

Describe the bug

We're hitting Hot reloadable dependency xyz has not been compiled yet... after upgrading to 2.4.0.Final. I think the issue is happening because of this line: https://github.com/quarkusio/quarkus/pull/20500/files#diff-dbfecb8ead57f5ad197c876b824b224ea62a3711ba4a3d2c0bb07da027aa11d1R708

Previously it was doing this via localProject.getSourcesDir().toAbsolutePath() but now it is checking module.getMainResources().iterator().next().getDestinationDir().toPath().toAbsolutePath(). Since our META-INF/resources directory is basically pointing to the build dir as defined in https://github.com/projectnessie/nessie/blob/1d9e32e47c573f9c0906a264f83066f6a45dde03/ui/pom.xml#L33-L39 the actual META-INF/resources directory doesn't exist under target, thus quarkus:dev complains.

With the changes from projectnessie/nessie#2475 we can overcome the hot reloadable... issue and make quarkus:dev start, but now static UI resources are not being loaded anymore when navigating to http://localhost:19120/, even though they are located under META-INF/resources (note that our UI resources are located in a separate maven module).

Expected behavior

static UI resources located under META-INF/resources should be loaded when running quarkus:dev

Actual behavior

static UI resources located under META-INF/resources are not loaded when running quarkus:dev

How to Reproduce?

  1. git clone [email protected]:projectnessie/nessie.git
  2. ./mvnw clean install quarkus:dev -DskipTests
  3. optionally: apply the changes from Fix running quarkus:dev projectnessie/nessie#2475 to overcome the hot reloadable... issue
  4. navigating to http://localhost:19120/ shows the UI with 2.3.1.Final, but fails with 2.4.0.Final

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@nastra
Copy link
Contributor Author

nastra commented Oct 25, 2021

/cc @aloubyansky since you worked on #20500, any chance you could take a look at this?

@aloubyansky
Copy link
Member

@nastra thanks reporting. Apparently we had a bug in previous versions which didn't manifest itself before. #20986 fixes it.

@nastra
Copy link
Contributor Author

nastra commented Oct 25, 2021

@aloubyansky thanks for looking into that. I can confirm that #20986 fixes the first issue I mentioned with resource detection (we don't see the hot reloadable xyz resource issue anymore).
However, those static resources don't seem to be loaded anymore, even though they are at the right place (this is the second issue I mentioned in the problem description above). Could that be related to the changes from #20500 as well?

@aloubyansky
Copy link
Member

Thanks for checking @nastra I'll have a look.

@aloubyansky
Copy link
Member

Should be good now.

@dimas-b
Copy link
Contributor

dimas-b commented Oct 25, 2021

@aloubyansky : Good on main? :) Could you link a PR that fixed the problem, pls?

@aloubyansky
Copy link
Member

I pushed the other fix to the same branch #20986

@nastra
Copy link
Contributor Author

nastra commented Oct 26, 2021

@aloubyansky I can confirm everything works again. Thanks for fixing

@aloubyansky
Copy link
Member

Great, thanks for the confirmation!

@quarkus-bot quarkus-bot bot added this to the 2.5 - main milestone Oct 28, 2021
@gsmet gsmet modified the milestones: 2.5 - main, 2.4.1.Final Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants