harbor icon indicating copy to clipboard operation
harbor copied to clipboard

fix dragonfly response when p2p preheat

Open mr-002 opened this issue 3 years ago • 10 comments

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]

mr-002 avatar Nov 01 '21 12:11 mr-002

please try rebase code to make the CI run

bitsf avatar Dec 03 '21 06:12 bitsf

Codecov Report

Merging #15916 (2ff8ed9) into main (4faab26) will increase coverage by 0.04%. The diff coverage is 78.08%.

Impacted file tree graph

@@            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:

codecov[bot] avatar Mar 10 '22 06:03 codecov[bot]

@mr-002 please help to fix the go check issue, then let me merge it.

wy65701436 avatar Mar 10 '22 06:03 wy65701436

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.

github-actions[bot] avatar Jul 05 '22 09:07 github-actions[bot]

@mr-002 ping, we don't want your effort to get lost. Please help us address the requested change by @wy65701436

Vad1mo avatar Jul 05 '22 09:07 Vad1mo

I'm so sorry for these days delay.

mr-002 avatar Jul 19 '22 08:07 mr-002

@mr-002 could you please resove the golint error? I'd like to merge this PR.

wy65701436 avatar Jul 30 '22 09:07 wy65701436

@wy65701436 Hi, I have resoved golint errors,All CI jobs are passed。😁

mr-002 avatar Aug 08 '22 07:08 mr-002

Thanks for all patience about my first commit 🤗

mr-002 avatar Aug 08 '22 07:08 mr-002

Looking forward to be approval.

mr-002 avatar Sep 06 '22 07:09 mr-002

@mr-002 thanks, and could you please help to squash the commits?

wy65701436 avatar Oct 17 '22 05:10 wy65701436