-
Notifications
You must be signed in to change notification settings - Fork 224
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
Config: do not overwrite when loaded and not migrated #4605
Config: do not overwrite when loaded and not migrated #4605
Conversation
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.
thanks @sphuber !
Codecov Report
@@ Coverage Diff @@
## release/1.5.1 #4605 +/- ##
=================================================
- Coverage 79.48% 79.48% -0.00%
=================================================
Files 482 482
Lines 35326 35329 +3
=================================================
+ Hits 28076 28077 +1
- Misses 7250 7252 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@ltalirz Since we are going to release a v1.5.1, I am merging this into the |
The `Config.from_file` classmethod used to load the `config.json` file into memory was always writing the contents from memory to disk if it was read, even if the content was not migrated. This is unnecessary and so the write is now only performed if the config was migrated.
fedd9df
to
6fd15b8
Compare
@sphuber By the way, I wonder whether we should add a test to prevent a regression of this? Not sure it's necessary |
I think it is fine not to include one now |
Fixes #4606
The
Config.from_file
classmethod used to load theconfig.json
fileinto memory was always writing the contents from memory to disk if it
was read, even if the content was not migrated. This is unnecessary and
so the write is now only performed if the config was migrated.