-
Notifications
You must be signed in to change notification settings - Fork 364
feat(model): Check if an archive exists before trying to download it #9071
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
Merged
Conversation
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
cdc6586 to
3c53ae0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9071 +/- ##
============================================
+ Coverage 68.39% 68.42% +0.03%
- Complexity 1161 1165 +4
============================================
Files 238 238
Lines 7648 7646 -2
Branches 870 871 +1
============================================
+ Hits 5231 5232 +1
+ Misses 2060 2056 -4
- Partials 357 358 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
3c53ae0 to
a5f784d
Compare
Signed-off-by: Martin Nonnenmacher <[email protected]>
Use the function names instead of a description for consistency with other tests. Signed-off-by: Martin Nonnenmacher <[email protected]>
Signed-off-by: Martin Nonnenmacher <[email protected]>
Remove the fallback to read uncompressed files from the `XZCompressedLocalFileStorage`. The fallback was introduced for backward compatibility with previously uncompressed storage directories, but the compressed storage is now the default for several years so that the fallback can be removed. Signed-off-by: Martin Nonnenmacher <[email protected]>
The function was only applied to the path argument by the subclass `XZCompressedLocalFileStorage` which does not override all functions. This lead to inconsistencies when using `XZCompressedLocalFileStorage`. For example, `hasData(path)` could return `false` when the file was actually present, because the implementation in `LocalFileStorage` did not apply the `transformPath` function. For the same reason calling `delete` on `XZCompressedFileStorage` never deleted any files. Fix this by making sure that `transformFile` is always applied in `LocalFileStorage` and not applying it in the subclass anymore. Also add tests for all functions of `XZCompressedFileStorage` based on the tests for `LocalFileStorage` to ensure that they work as expected. Signed-off-by: Martin Nonnenmacher <[email protected]>
Check if an archive exists in the storage before trying to read it in `FileArchiver.unarchive` and `FileListResolver.resolve`. This prevents an error message when calling `storage.getData()` and the data does not exist. Resolves #7041. Signed-off-by: Martin Nonnenmacher <[email protected]>
a5f784d to
bc6785c
Compare
sschuberth
approved these changes
Sep 3, 2024
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.
Check if an archive exists in the storage before trying to read it in
FileArchiver.unarchiveandFileListResolver.resolve.This prevents an error message when calling
storage.getData()and the data does not exist.Resolves #7041.
Also fix a bug in
XZCompressedFileStoragewhich was discovered by the change.