harbor
harbor copied to clipboard
fix dragonfly response when p2p preheat
reason when I use p2p preheat by dragonfly (1.0.6) while checking process from dragonfly it resp that :
{
"ID":"b0227c0ba41938d25abad4df1e9b57a1e7d113086cc77d047f7acb6e73916fa9",
"finishTime":"2021-10-25T07:53:44.162Z",
"startTime":"2021-10-25T07:53:44.143Z",
"status":"FAILED",
"errorMsg":"{\"Code\":208,\"Msg\":\"preheat task already exists, id:02b0d5c6e1cd99b5fa9f730b0a8d96696ca965898233ad68b4f26267b8016ce1\"}"
}
but here is status defined on git:
const (
// PreheatingImageTypeImage defines the 'image' type of preheating images
PreheatingImageTypeImage = "image"
// PreheatingStatusPending means the preheating is waiting for starting
PreheatingStatusPending = "PENDING"
// PreheatingStatusRunning means the preheating is ongoing
PreheatingStatusRunning = "RUNNING"
// PreheatingStatusSuccess means the preheating is success
PreheatingStatusSuccess = "SUCCESS"
// PreheatingStatusFail means the preheating is failed
PreheatingStatusFail = "FAIL"
)
so I fix that and add retry when dragonfly job already exists.
what I changed
- fix check dragionfly response status;
- add handle when dragonfly preheat job existed;
Signed-off-by: anyiwei [email protected]
please try rebase code to make the CI run
Codecov Report
Merging #15916 (2ff8ed9) into main (4faab26) will increase coverage by
0.04%
. The diff coverage is78.08%
.
@@ Coverage Diff @@
## main #15916 +/- ##
==========================================
+ Coverage 67.22% 67.27% +0.04%
==========================================
Files 993 993
Lines 84081 84148 +67
Branches 2632 2632
==========================================
+ Hits 56526 56609 +83
+ Misses 23706 23687 -19
- Partials 3849 3852 +3
Flag | Coverage Δ | |
---|---|---|
unittests | 67.27% <78.08%> (+0.04%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
src/pkg/p2p/preheat/provider/mock.go | 58.40% <68.08%> (+5.83%) |
:arrow_up: |
src/pkg/p2p/preheat/provider/dragonfly.go | 83.54% <96.15%> (+15.29%) |
:arrow_up: |
src/common/rbac/system/namespace.go | 33.33% <0.00%> (-11.12%) |
:arrow_down: |
src/controller/event/topic.go | 10.81% <0.00%> (+1.80%) |
:arrow_up: |
src/server/v2.0/handler/scanexport.go | 70.73% <0.00%> (+1.98%) |
:arrow_up: |
src/controller/event/handler/auditlog/auditlog.go | 60.86% <0.00%> (+4.34%) |
:arrow_up: |
...es/vulnerability/vulnerability-config.component.ts | 58.51% <0.00%> (+4.44%) |
:arrow_up: |
...audit-log-purge/history/purge-history.component.ts | 46.51% <0.00%> (+5.81%) |
:arrow_up: |
...g-retention-tasks/tag-retention-tasks.component.ts | 86.11% <0.00%> (+25.00%) |
:arrow_up: |
@mr-002 please help to fix the go check issue, then let me merge it.
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.
@mr-002 ping, we don't want your effort to get lost. Please help us address the requested change by @wy65701436
I'm so sorry for these days delay.
@mr-002 could you please resove the golint error? I'd like to merge this PR.
@wy65701436 Hi, I have resoved golint errors,All CI jobs are passed。😁
Thanks for all patience about my first commit 🤗
Looking forward to be approval.
@mr-002 thanks, and could you please help to squash the commits?