Upgrade to django-privates 4.0+#6296
Merged
Merged
Conversation
1383a66 to
222a21d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6296 +/- ##
=======================================
Coverage 97.10% 97.10%
=======================================
Files 868 869 +1
Lines 33117 33147 +30
Branches 3045 3048 +3
=======================================
+ Hits 32159 32189 +30
Misses 646 646
Partials 312 312 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
407f371 to
ac65b9a
Compare
ac65b9a to
cc5279f
Compare
* Removed reference to removed setting * Updated how/which UUIDs are stored in the session * Updated formatting to fit within 80 cols
Now that in tests an in-memory storage is used, but the subprocess call expects the input file to exist on disk, we have to use the file field and it's storage as abstraction rather than an on-disk filesystem path. In tests we can now copy the file to a temp file, while in prod with regular storages the plain path is emitted.
cc5279f to
e322cda
Compare
It now uses the STORAGES setting and its own settings have been removed. Tests should not assume anything about the file system either and instead make assertions based on the storage used.
These should avoid hitting the filesystem for real when running tests, clobbering the private-media directory on local dev environments. You can track down the violating tests by changing the file permissions so that the directory is only writable to root: chown root private_media chmod go-rx private_media Some tests are failing that are logical in this case - so judge them accordingly.
e322cda to
74e6c69
Compare
Member
Author
|
Merged like this - the changes were discussed with the team on Monday and no further input/checks were deemed necessary :) |
This file contains hidden or 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
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.
Periodic maintenance stuff and all that :)
Turns out this hits quite a bit of dependencies and test code. Rough overview of the changes:
@temp_private_rootdecorators and/or updated them to not clear the files created in the test case data setup@temp_private_rootdecorators is detected (local private_media files are created)