Commit Graph

43 Commits

Author SHA1 Message Date
Roooocky 7e4b26b220
Add new feature for supporting WebAssembly artifact (#16931)
support wasm

Signed-off-by: ln23415 <ln23415@hotmail.com>
2022-07-08 23:08:28 +08:00
Wang Yan 6917021b41
resolve copy failure for artifact with multiple accessories (#17123)
If the artifact has more than one signaure, it will currently copy the last one. After the fix, all accessories can be copied to the target project.

Signed-off-by: wang yan <wangyan@vmware.com>
2022-07-05 20:10:22 +08:00
Shengwen YU e9fca3de45
fix: refactor code for golangci-lint whitespace (#17005)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2022-06-16 17:42:46 +08:00
Chenyu Zhang d56a505fa7
Merge pull request #16846 from chlins/feat/cache-layer-for-repo
feat(repository): introduce cache manager for repository (#16741)
2022-05-16 11:39:28 +08:00
Wang Yan 54a857f2aa
fix artifact count issue (#16851)
The count should filter out the accessory, the result should be consistent with list method.

Fixes #16816

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-05-13 11:48:20 +08:00
chlins a82f1ba63d feat(repository): introduce cache manager for repository (#16741)
Implement cache layer for resource repository and migrate repository.Mgr
to pkg.RepositoryMgr.

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-05-12 10:14:35 +08:00
chlins 8c223135e7 feat: add cache layer for artifact (#16739)
Implement cache layer for resource artifact and define common
cache manager and workflow. Also add cache related options to
configuration yaml.

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-04-25 18:01:45 +08:00
Chenyu Zhang 7df0c3906d
Merge pull request #16510 from chlins/fix/check-before-update-tag-pulltime
fix: check the existence of the tag before updating pull time
2022-04-18 17:10:15 +08:00
Wang Yan ef991ae0c0
add transaction for artifact delete (#16506)
Add transaction for artifact deletion, given API has the transaction when to call artifact controller but other object may not, for example jobservice job.
Here, force add the tx to ensure all the things can be rolled back.

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-03-11 14:40:55 +08:00
chlins 4f2cd939ee fix: check the existence of the tag before updating pull time
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-03-11 09:40:53 +08:00
Wang Yan 8d05007eb5
fix accessory copy for index (#16378)
When issue an copy, it has to copy the reference's accessory as well

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-02-17 12:43:09 +08:00
Wang Yan 2275c6e969
fix accessory lost tags (#16304)
It needs to copy tags for the accessories.

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-01-28 10:44:29 +08:00
Wang Yan 0a183feab6
add cosign support in replication (#16282)
For the case Harbor-to-Harbor, the accessory can be replicated from source or to target.

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-01-26 21:35:17 +08:00
Wang Yan 01c6f6084b
modify artifact copy api to support cosign (#16194)
Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-01-17 15:52:14 +08:00
Chenyu Zhang b417e877b5
Merge pull request #16107 from chlins/feat/async-update-artifact-pull_count
feat: async update artifact pull time and repository pull count
2022-01-05 11:14:28 +08:00
Wang Yan 2111703d8d
Cosign artifact api
1,update artifact list & delete api to support accessory
2, add list accesories api

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-01-05 11:13:40 +08:00
chlins de7978e1b5 feat: async update artifact pull time and repository pull count
Signed-off-by: chlins <chenyuzh@vmware.com>
2021-12-24 11:17:44 +08:00
Qian Deng 354a2bd80d Enhance the trace related code
* Move request id to requestid middleware
* fix span pass to child ctx on orm
* fix typos
* remove unused code
* add operation name to Transaction

Signed-off-by: Qian Deng <dengq@vmware.com>
2021-09-22 04:14:43 +00:00
Wenkai Yin c26e45efab Fix the concurrent pushing the same image issue
The transaction will be aborted when get errors during the execution which causes the following sqls report error.
This commit moves the re-getting artifact logic out of the second transaction to avoid the concurrent pushing issue

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-06-10 21:16:05 +08:00
He Weiwei fec9f59a43 test: use mockery generated artifact Manager in tests
Closes #14284

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-06-01 04:00:08 +00:00
Wenkai Yin 998e392bb4 Clean up tech debt codes
Clean up tech debt codes

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-05-20 11:47:46 +08:00
Wang Yan 6e3c9e29df
Api refactor label (#14650)
* Refactor labl api

move to the new program model

Signed-off-by: wang yan <wangyan@vmware.com>

* continue resolve review comments

Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-04-15 17:27:58 +08:00
Wang Yan 85254ccc22
refactor immutable rule (#14371)
Migrate immutable realted APIs to v2 swagger

Signed-off-by: wang yan <wangyan@vmware.com>
2021-03-08 17:10:12 +08:00
He Weiwei 7cfd372af2
fix: use clone query in loop of artifact.Iterator func (#14283)
Closes #14251

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-02-23 12:23:36 +08:00
Wang Yan 21d35f9702
update blob list query (#14195)
* update blob list query

Deprecate blob list parameters, and use the query for instead.

Signed-off-by: wang yan <wangyan@vmware.com>

* update per review comments

Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-02-09 17:08:26 +08:00
He Weiwei 08580f9fec
refactor(scan): refactor scan/scan all job to task manager (#13684)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-14 13:34:35 +08:00
He Weiwei 9c8377909b fix: compute artifact size from db for schema1 manifest
Closes #11892

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-11-09 12:32:07 +00:00
Wenkai Yin(尹文开) 59f9ef7e5c
Abstract more info into the extra attributes for images (#13014)
1. Abstract the "config" property(which contains labels) of config layer into the extra attributes for images
2. Try to get the author information from the "maintainer" label

fixes 12066
fixes 12734

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-09-23 10:42:47 +08:00
wang yan 116d295462 remove the dependency on swagger models
1, remove the pkg dependency on v2.0/server/models
2, remove the controller dependency on v2.0/server/models

Signed-off-by: wang yan <wangyan@vmware.com>
2020-09-01 17:43:44 +08:00
Daniel Jiang 91e2779822 Fill in the icon of known artifacts in artifact controller
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-08-28 01:33:26 +08:00
Wenkai Yin b1ddb5e2cc Implement the icon API to get the icon of artifact
Implement the icon API to get the icon of artifact

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-15 08:40:38 +08:00
Yiyang Huang b98dc97fbd feat: enhanced default processor
Signed-off-by: Yiyang Huang <huangyiyang.huangyy@bytedance.com>
2020-08-11 01:31:02 +08:00
Yiyang Huang b98b8b9159 Unify parameters for functions in Processor interface
Signed-off-by: Yiyang Huang <huangyiyang@caicloud.io>
2020-08-11 01:30:00 +08:00
peimingming 65c5561032 Add P2P trigger event and handler
Signed-off-by: peimingming <peimingming@corp.netease.com>
2020-07-09 11:20:22 +08:00
Ziming Zhang 97a7a6dc35 fix(retention) fix retention repository with slash
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-04-26 15:07:25 +08:00
Wenkai Yin 7553845b4d Remove the duplicated const definition
Remove the duplicated const definition for artifact type

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-13 17:02:23 +08:00
Wenkai Yin 7188e01569 Update APIs to only accept encoded repository name that contains slash
Update APIs to only accept encoded repository name that contains slash

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-07 20:57:50 +08:00
Wenkai Yin 9bfabff4d2 Update the logic of copy artifact
1. Copy artifact will not return 409 anymore.
2. Make sure the tags of source artifact exist in the target artifact

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-07 10:55:55 +08:00
wang yan a11a70d941 move logger from common to lib
The logger is the fundamental library, so move it into lib folder
Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-02 14:09:03 +08:00
Wenkai Yin e4d42deb75 Make sure the tag filter have the same behavior for empty value and *
Fixes #11233, make sure the tag filter have the same behavior for empty value and *

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-01 17:15:23 +08:00
He Weiwei 9c06c79ff4 refactor(errors): rename pkg`lib/error` to `lib/errors`
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-03-29 05:19:05 +00:00
He Weiwei 73f3a305ce
refactor: rename testing/api to testing/controller (#11295)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-03-26 14:00:11 +08:00
Wenkai Yin(尹文开) 8984979bd2
Relocate/rename some packages (#11183)
Fixes #11016
1. src/pkg/q->src/internal/q
2. src/internal->src/lib (internal is a reserved package name of golang)
3. src/api->src/controller

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-03-24 20:45:45 +08:00