From e767fe21e95a3c50dd2f2fde846dbd51f0d31f25 Mon Sep 17 00:00:00 2001 From: Wang Yan Date: Tue, 1 Aug 2023 11:03:48 +0800 Subject: [PATCH] [cherry-pick]fix accessory import issue (#19056) fix accessory import issue fixes #19041 The issuse was introduced by https://github.com/goharbor/harbor/pull/17087. To move the import to main since the anonymous imports only allowed at main in go-cilint. Fixes it: To add the anonymous imports at the jobservice main since the gc job needs to remove accessory when to delete an artifact Signed-off-by: wang yan --- src/jobservice/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jobservice/main.go b/src/jobservice/main.go index 1a9609e10..318d1129e 100644 --- a/src/jobservice/main.go +++ b/src/jobservice/main.go @@ -32,6 +32,8 @@ import ( "github.com/goharbor/harbor/src/lib/cache" cfgLib "github.com/goharbor/harbor/src/lib/config" tracelib "github.com/goharbor/harbor/src/lib/trace" + _ "github.com/goharbor/harbor/src/pkg/accessory/model/base" + _ "github.com/goharbor/harbor/src/pkg/accessory/model/cosign" _ "github.com/goharbor/harbor/src/pkg/config/inmemory" _ "github.com/goharbor/harbor/src/pkg/config/rest" )