-
Notifications
You must be signed in to change notification settings - Fork 12
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
WireMock config changes are taken into account for live-reload (dev mode only) #85
Conversation
6feb859
to
04f04a7
Compare
04f04a7
to
7bffb19
Compare
|
||
@GET | ||
@Path("/reload") | ||
public Response reload() { |
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.
Should be added to the docs too, right?
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.
Sorry, I don't get your point. It's just an endpoint for testing purposes. What's your intention to add this to the doc?
@BuildStep(onlyIf = { WireMockServerEnabled.class, GlobalDevServicesConfig.Enabled.class, IsDevelopment.class }) | ||
void watchWireMockConfigFiles(WireMockServerBuildTimeConfig config, | ||
BuildProducer<HotDeploymentWatchedFileBuildItem> items) { | ||
listFiles(Paths.get(config.filesMapping(), MAPPINGS), Paths.get(config.filesMapping(), FILES)).forEach(file -> { |
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.
According to https://quarkus.io/guides/all-builditems , HotDeploymentWatchedFileBuildItem actually supports passing a Glob pattern, hence you could probably instruct it to watch all files under the Mappings and Files directories (including when new ones added?)
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've analyzed the glob-pattern
feature back in the days. However, it does not convince me since the API is not very intuitive. Furthermore, it also doesn't work for new files (please see quarkusio/quarkus#25338). Anyway, the current implementation already watches all files under the Mappings and Files directories.
Sorry for delay, new job onboarding :( |
Don't worry, I am very grateful that you are doing a review at all. 😄 |
@oleg-nenashev: Any further feedback? Otherwise I would release the feature soon. |
Hi. I didn't have a chance to review it yet, was snowed under the onboarding stuff at Gradle. I do not see anything wrong so I would just ship it |
This PR makes the
Live Reload
feature ofQuarkus Dev Mode
aware ofWireMock
config changes. However, the implementation has some limitations: