Skip to content
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

fix(zb): fixed remote repositories cleanup #1461

Merged

Conversation

eusebiu-constantin-petu-dbk
Copy link
Collaborator

fix(storage): also put deduped blobs in cache, not just origin blobs

this caused an error when trying to delete deduped blobs from multiple repositories

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

andaaron
andaaron previously approved these changes May 19, 2023
@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #1461 (aaafbcb) into main (9ca85e0) will increase coverage by 0.02%.
The diff coverage is 54.54%.

@@            Coverage Diff             @@
##             main    #1461      +/-   ##
==========================================
+ Coverage   90.80%   90.83%   +0.02%     
==========================================
  Files          99       99              
  Lines       22162    22168       +6     
==========================================
+ Hits        20125    20137      +12     
+ Misses       1522     1517       -5     
+ Partials      515      514       -1     
Impacted Files Coverage Δ
pkg/storage/s3/s3.go 82.68% <16.66%> (+0.01%) ⬆️
pkg/storage/local/local.go 81.97% <100.00%> (+0.48%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

andaaron
andaaron previously approved these changes May 19, 2023
fix(storage/local): also put deduped blobs in cache, not just origin blobs

this caused an error when trying to delete deduped blobs
from multiple repositories

fix(storage/s3): check blob is present in cache before deleting

this is an edge case where dedupe is false but cacheDriver is not nil
(because in s3 we open the cache.db if storage find it in rootDir)
it caused an error when trying to delete blobs uploaded with dedupe false

Signed-off-by: Petu Eusebiu <[email protected]>
Copy link
Contributor

@rchincha rchincha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rchincha rchincha merged commit 1b184ce into project-zot:main May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants