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 doesn't refresh when resource files are updated #15820

Closed
maryellenw77 opened this issue Mar 17, 2021 · 9 comments · Fixed by #16005
Closed

Quarkus doesn't refresh when resource files are updated #15820

maryellenw77 opened this issue Mar 17, 2021 · 9 comments · Fixed by #16005
Labels
Milestone

Comments

@maryellenw77
Copy link

Describe the bug

My project has a set of json configuration files in the resources directory. We'd like Quarkus to restart and load these files when they are updated. Currently, Quarkus sees the file updates but determines that a restart isn't necessary. We know this because we see the message 'Files changed but restart not needed' when we make modifications.

Expected behavior

Quarkus is restarted when any resource file is modified.

Actual behavior

Quarkus is only restarted when certain resources files are modified. Not certain what these files are, but they include banner.txt.

To Reproduce

Steps to reproduce the behavior:

  1. Add file fields.json to resources directory
  2. Start quarkus
  3. Edit fields.json
  4. See message "Files changed but restart not needed'

Environment (please complete the following information):

Output of java -version

openjdk 11.0.10

Quarkus version or git rev

1.10.5.Final

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

Apache Maven 3.6.3

Additional context

None.

@maryellenw77 maryellenw77 added the kind/bug Something isn't working label Mar 17, 2021
@geoand geoand added kind/enhancement New feature or request and removed kind/bug Something isn't working labels Mar 18, 2021
@mkouba
Copy link
Contributor

mkouba commented Mar 19, 2021

@maryellenw77 FYI you should be able to specify additional watched resources via the quarkus.live-reload.watched-resources config property. Unfortunately, directories and wildcards are not supported. @geoand Maybe we could try to implement wildcards so that e.g. *.json would match all json resources?

@geoand
Copy link
Contributor

geoand commented Mar 19, 2021

@mkouba yeah, that sounds very reasonable

@geoand
Copy link
Contributor

geoand commented Mar 19, 2021

@gastaldi @radcortez is there anything in SR Commons that could be used for ^?

@radcortez
Copy link
Member

I don't think we have. Feel free to add something :)

@gastaldi
Copy link
Contributor

@geoand
Copy link
Contributor

geoand commented Mar 19, 2021

Right! That exactly like what we want here. Mind integrating it in the handling of quarkus.live-reload.watched-resources?

@gastaldi
Copy link
Contributor

I think this issue may be closed (or renamed) and can be marked as a good-first-issue for our rockstar community contributors 😉

@gsmet
Copy link
Member

gsmet commented Mar 19, 2021

Stupid question maybe but why don't we reload by default when resources are changed?

@mkouba
Copy link
Contributor

mkouba commented Mar 22, 2021

Stupid question maybe but why don't we reload by default when resources are changed?

I think that historically we've chosen this path to minimize the number of resources that can trigger the reload, i.e. not every resource modification requires a reload. Anyway, if we change it now it would be a non-compatible change. So we should be careful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants