-
-
Notifications
You must be signed in to change notification settings - Fork 734
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
Replace viper with koanf #4845
Merged
Merged
Replace viper with koanf #4845
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
WithoutPants
added
bug
Something isn't working
chore
Pull requests for refactoring and admin work
labels
May 16, 2024
Maista6969
suggested changes
May 20, 2024
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 this on my Windows system and I could not find any issues after migrating my config: tried toggling some settings, generating new API keys, changing some filters around, etc. and everything works fine 👍
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.
Viper has long been a pain to deal with, particularly around its handling of camelCase field keys. Investigation of #4740 also determined that viper was the root cause.
This PR replaces
viper
withkoanf
. koanf handles camel case fields correctly. This means that all of the camel case to snake case conversion hacks can be removed.Since the field keys are changed, a (non-schema) migration is required to convert existing config files. The migration backs up the existing config file in the same directory to
config.yml.57.<datetime>
. The migrated config file will not be compatible with older stash versions.Fixes #4740
Fixes #4575