dragonflyoss / Dragonfly2

Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project.
https://d7y.io
Apache License 2.0
2.3k stars 293 forks source link

feat: add peer manager for persistent cache task #3592

Closed gaius-qi closed 1 month ago

gaius-qi commented 1 month ago

Description

Related Issue

Motivation and Context

Screenshots (if appropriate)

Types of changes

Checklist

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0.94340% with 210 lines in your changes missing coverage. Please review.

Project coverage is 35.67%. Comparing base (395fc6c) to head (f756167). Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
scheduler/resource/persistentcache/peer_manager.go 0.00% 136 Missing :warning:
scheduler/resource/persistentcache/host_manager.go 0.00% 48 Missing :warning:
scheduler/resource/persistentcache/task_manager.go 0.00% 18 Missing :warning:
pkg/redis/redis.go 0.00% 4 Missing :warning:
internal/dflog/logger.go 50.00% 2 Missing :warning:
scheduler/resource/persistentcache/peer.go 0.00% 1 Missing :warning:
scheduler/resource/persistentcache/task.go 0.00% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592/graphs/tree.svg?width=650&height=150&src=pr&token=PUICJYSAT7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) ```diff @@ Coverage Diff @@ ## main #3592 +/- ## ========================================== - Coverage 35.83% 35.67% -0.16% ========================================== Files 335 336 +1 Lines 36962 37106 +144 ========================================== - Hits 13245 13238 -7 - Misses 22882 23031 +149 - Partials 835 837 +2 ``` | [Flag](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | `35.67% <0.94%> (-0.16%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | Coverage Δ | | |---|---|---| | [scheduler/resource/persistentcache/peer.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592?src=pr&el=tree&filepath=scheduler%2Fresource%2Fpersistentcache%2Fpeer.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3BlcnNpc3RlbnRjYWNoZS9wZWVyLmdv) | `0.00% <0.00%> (ø)` | | | [scheduler/resource/persistentcache/task.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592?src=pr&el=tree&filepath=scheduler%2Fresource%2Fpersistentcache%2Ftask.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3BlcnNpc3RlbnRjYWNoZS90YXNrLmdv) | `0.00% <0.00%> (ø)` | | | [internal/dflog/logger.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592?src=pr&el=tree&filepath=internal%2Fdflog%2Flogger.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-aW50ZXJuYWwvZGZsb2cvbG9nZ2VyLmdv) | `58.09% <50.00%> (ø)` | | | [pkg/redis/redis.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592?src=pr&el=tree&filepath=pkg%2Fredis%2Fredis.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-cGtnL3JlZGlzL3JlZGlzLmdv) | `40.74% <0.00%> (-3.26%)` | :arrow_down: | | [scheduler/resource/persistentcache/task\_manager.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592?src=pr&el=tree&filepath=scheduler%2Fresource%2Fpersistentcache%2Ftask_manager.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3BlcnNpc3RlbnRjYWNoZS90YXNrX21hbmFnZXIuZ28=) | `0.00% <0.00%> (ø)` | | | [scheduler/resource/persistentcache/host\_manager.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592?src=pr&el=tree&filepath=scheduler%2Fresource%2Fpersistentcache%2Fhost_manager.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3BlcnNpc3RlbnRjYWNoZS9ob3N0X21hbmFnZXIuZ28=) | `0.00% <0.00%> (ø)` | | | [scheduler/resource/persistentcache/peer\_manager.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592?src=pr&el=tree&filepath=scheduler%2Fresource%2Fpersistentcache%2Fpeer_manager.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3BlcnNpc3RlbnRjYWNoZS9wZWVyX21hbmFnZXIuZ28=) | `0.00% <0.00%> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3592/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)