-
Notifications
You must be signed in to change notification settings - Fork 306
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
FISH-788: DirConfigSource should not log severe messages if unused. #5104
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
During QA after merging payara#5007, @lprimak stumbled over a SEVERE log message during deploys, triggered by the non-existing directory of DirConfigSource. The directory config value has had a default before, also the docs say otherwise. The level issue has been fixed by checking only default config value being used, resulting in an INFO level message. The logic has been refactored not to use an exception, but Optional API. - Docs will be fixed to include the formerly hidden default value - Part of payara#5006
Jenkins test please |
pdudits
approved these changes
Jan 29, 2021
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.
Tested with apps that use and don't use MP Config.
- INFO error message when default directory doesn't exist -- I'd go for
FINE
though - no message when directory exists
- error when non-default directory doesn't exist
...ig-service/src/main/java/fish/payara/nucleus/microprofile/config/source/DirConfigSource.java
Outdated
Show resolved
Hide resolved
As requested by @pdudits, reducing the log level to FINE if the directory targeted by default value (secrets) is not present.
Jenkins test please |
jenkins test |
the tests failed due to a known bug (which I am fixing) |
lprimak
approved these changes
Jan 29, 2021
lprimak
pushed a commit
that referenced
this pull request
Feb 5, 2021
…5104) * fix(mpconfig): make DirConfigSource less disrupting if not configured During QA after merging #5007, @lprimak stumbled over a SEVERE log message during deploys, triggered by the non-existing directory of DirConfigSource. The directory config value has had a default before, also the docs say otherwise. The level issue has been fixed by checking only default config value being used, resulting in an INFO level message. The logic has been refactored not to use an exception, but Optional API. - Docs will be fixed to include the formerly hidden default value - Part of #5006 * style(mpconfig): reducing log level in DirConfigSource.findDir() As requested by @pdudits, reducing the log level to FINE if the directory targeted by default value (secrets) is not present.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
During QA after merging #5007, @lprimak stumbled over a SEVERE
log message during deploys, triggered by the non-existing directory
of DirConfigSource. The directory config value has had a default
before, also the docs say otherwise.
The level issue has been fixed by checking only default config value
being used, resulting in an INFO level message. The logic has been
refactored not to use an exception, but Optional API.
Important Info
Blockers
None.
Testing
New tests
Batteries included.
Testing Performed
Usual unit tests.
Testing Environment
Documentation