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: check the existence of the tag before updating pull time #16510

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

chlins
Copy link
Member

@chlins chlins commented Mar 11, 2022

Check tag before update pull time, there are two purposes:

  1. avoid noise log in the caller.("failed to update pull time, tag 0 not found")
  2. reduce the db connection because GetTag needs query tag from db.

Signed-off-by: chlins chenyuzh@vmware.com

Signed-off-by: chlins <chenyuzh@vmware.com>
@codecov
Copy link

codecov bot commented Mar 11, 2022

Codecov Report

Merging #16510 (4f2cd93) into main (6673841) will decrease coverage by 0.00%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16510      +/-   ##
==========================================
- Coverage   67.43%   67.43%   -0.01%     
==========================================
  Files         949      949              
  Lines       78812    78814       +2     
  Branches     2321     2321              
==========================================
+ Hits        53149    53150       +1     
- Misses      22112    22114       +2     
+ Partials     3551     3550       -1     
Flag Coverage Δ
unittests 67.43% <84.61%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/controller/artifact/controller.go 64.93% <84.61%> (+0.22%) ⬆️
...g-retention-tasks/tag-retention-tasks.component.ts 60.00% <0.00%> (-25.72%) ⬇️
src/common/rbac/system/namespace.go 33.33% <0.00%> (-11.12%) ⬇️
src/jobservice/worker/cworker/c_worker.go 68.42% <0.00%> (+1.91%) ⬆️
...-nav/gc-page/gc/gc-history/gc-history.component.ts 60.37% <0.00%> (+9.43%) ⬆️

Copy link
Contributor

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

@chlins chlins merged commit 7df0c39 into goharbor:main Apr 18, 2022
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