Only instantiate the file watcher in a hot reloadable scenario #2108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why make this change?
Related to #2064
Closes #2064
We are getting error messaging associated with making edits to the config file due to a file watcher that is constantly looking for changes to the config file as part of the initial pieces of hot reload. Until hot reload is ready this is not error messaging that we want to be made visible.
What is this change?
Add a function to the
runtimeconfig
that checks if we are in a hot reloadable scenario. For now, this will always return false, and when we want to make the hot reload feature available, then the logic of this function can change to accommodate those updates.How was this tested?
Run manually to verify we are not file watching.
NOTE: testing for hot reload will need to be turned back on before we enable it as a feature, we have an issue to track the unit tests here: #2109
Sample Request(s)
No request is needed, simply start dab, make a change to the config file and save it, you will no longer see the error messages.
To verify the differences in the error messages and validate that they are consistent and what we expect, you can do the following:
https://localhost:5001/api/...
https://localhost:5001/rest/...
https://localhost:5001/api/...