fix: cleanup the purge uploads as well when running the prune command#138
Merged
fix: cleanup the purge uploads as well when running the prune command#138
Conversation
ac2f784 to
b35516e
Compare
Signed-off-by: chlins <chlins.zhang@gmail.com>
b35516e to
83a1d49
Compare
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.
This pull request introduces several changes to the backend and storage packages, primarily focusing on adding a new method for purging uploads and updating the mock functions accordingly. The most important changes include adding the
PerformPurgeUploadsmethod to the storage interface, updating the backend to call this new method, and adding mock functions for testing.Backend and Storage Enhancements:
pkg/backend/prune.go: Updated thePrunemethod to call the newPerformPurgeUploadsmethod and handle errors appropriately.pkg/storage/distribution/distribution.go: Added thePerformPurgeUploadsmethod to perform purge uploads in the storage.pkg/storage/storage.go: Added thePerformPurgeUploadsmethod to theStorageinterface.Mock Function Updates:
test/mocks/backend/backend.go: Added mock functions for theFetchmethod, including theBackend_Fetch_Callstruct and helper methods.test/mocks/storage/storage.go: Added mock functions for thePerformPurgeUploadsmethod, including theStorage_PerformPurgeUploads_Callstruct and helper methods.