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(metadb): populate image pushTimestamp if it's 0 value #2003

Merged

Conversation

eusebiu-constantin-petu-dbk
Copy link
Collaborator

in the case of an already existing meta db without pushTimestamp field its value would be 0 until image is updated, check for zero values and update them with time.Now() so that retention logic won't remove them.

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.

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Merging #2003 (b58abfe) into main (2db6e86) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2003      +/-   ##
==========================================
+ Coverage   91.94%   91.97%   +0.02%     
==========================================
  Files         164      164              
  Lines       27651    27657       +6     
==========================================
+ Hits        25425    25438      +13     
+ Misses       1650     1644       -6     
+ Partials      576      575       -1     
Files Coverage Δ
pkg/meta/boltdb/boltdb.go 92.03% <100.00%> (+0.01%) ⬆️
pkg/meta/convert/convert_proto.go 97.34% <100.00%> (+0.01%) ⬆️
pkg/meta/dynamodb/dynamodb.go 90.15% <100.00%> (+0.01%) ⬆️

... and 1 file with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link
Contributor

@laurentiuNiculae laurentiuNiculae left a comment

Choose a reason for hiding this comment

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

Looks good

in the case of an already existing meta db without pushTimestamp field
its value would be 0 until image is updated, check for zero values and update them
with time.Now() so that retention logic won't remove them.

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
@rchincha rchincha merged commit 4ed4661 into project-zot:main Nov 9, 2023
33 checks passed
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