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

Refactor: p2p preheat dragonfly driver #20922

Merged
merged 4 commits into from
Sep 21, 2024

Conversation

chlins
Copy link
Member

@chlins chlins commented Sep 12, 2024

  1. Refactor the p2p dragonfly driver to version 2.x, as earlier versions were built on 1.x which has since been achieved and deprecated.
  2. Add a new scope field to control and describe the scope of preheat which introduced in 2.x.

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #(issue)

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 63.29787% with 69 lines in your changes missing coverage. Please review.

Project coverage is 66.69%. Comparing base (c8c11b4) to head (2525457).
Report is 278 commits behind head on main.

Files with missing lines Patch % Lines
src/pkg/p2p/preheat/provider/mock.go 58.22% 23 Missing and 10 partials ⚠️
src/pkg/p2p/preheat/provider/dragonfly.go 68.18% 20 Missing and 8 partials ⚠️
src/pkg/p2p/preheat/instance/manager.go 22.22% 5 Missing and 2 partials ⚠️
src/controller/p2p/preheat/enforcer.go 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #20922       +/-   ##
===========================================
+ Coverage   45.36%   66.69%   +21.32%     
===========================================
  Files         244     1047      +803     
  Lines       13333   114302   +100969     
  Branches     2719     2850      +131     
===========================================
+ Hits         6049    76230    +70181     
- Misses       6983    34178    +27195     
- Partials      301     3894     +3593     
Flag Coverage Δ
unittests 66.69% <63.29%> (+21.32%) ⬆️

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

Files with missing lines Coverage Δ
src/pkg/p2p/preheat/job.go 50.00% <100.00%> (ø)
src/pkg/p2p/preheat/models/policy/policy.go 70.93% <100.00%> (ø)
src/pkg/p2p/preheat/provider/driver.go 73.33% <ø> (ø)
src/pkg/p2p/preheat/provider/preheat_image.go 27.58% <ø> (ø)
src/server/v2.0/handler/preheat.go 20.32% <100.00%> (ø)
src/controller/p2p/preheat/enforcer.go 51.40% <66.66%> (ø)
src/pkg/p2p/preheat/instance/manager.go 73.07% <22.22%> (ø)
src/pkg/p2p/preheat/provider/dragonfly.go 63.63% <68.18%> (ø)
src/pkg/p2p/preheat/provider/mock.go 42.07% <58.22%> (ø)

... and 1278 files with indirect coverage changes

@chlins chlins changed the title feat: add scope for preheat policy [WIP] feat: add scope for preheat policy Sep 13, 2024
@chlins chlins added kind/refactor The issue is to track the effort of refactory. release-note/enhancement Label to mark PR to be added under release notes as enhancement labels Sep 13, 2024
@gaius-qi gaius-qi force-pushed the feat/p2p-preheat-scope branch 4 times, most recently from ad592b9 to dc21f65 Compare September 14, 2024 04:25
@chlins chlins force-pushed the feat/p2p-preheat-scope branch 2 times, most recently from 8494276 to 6011452 Compare September 18, 2024 06:53
@chlins chlins changed the title [WIP] feat: add scope for preheat policy feat: add scope for preheat policy Sep 18, 2024
@chlins chlins force-pushed the feat/p2p-preheat-scope branch 3 times, most recently from 47fcbb0 to bc58db7 Compare September 19, 2024 01:51
@chlins chlins changed the title feat: add scope for preheat policy Refactor: p2p preheat dragonfly driver Sep 19, 2024
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 and others added 4 commits September 20, 2024 12:07
The preheat policy adds a new scope field to control and describe the
scope of preheat, which currently supports two scopes: single peer and
all peers.

Signed-off-by: chlins <chlins.zhang@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
@chlins chlins merged commit c97253f into goharbor:main Sep 21, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/P2P-Distribution kind/refactor The issue is to track the effort of refactory. release-note/enhancement Label to mark PR to be added under release notes as enhancement release-note/update Update or Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants