Commit Graph

9555 Commits

Author SHA1 Message Date
Will Sun
f9a66ca666
Merge pull request #12531 from AllForNothing/gc-dry-run
Add dry run to gc page
2020-07-22 11:01:10 +08:00
Daniel Jiang
4170b267a1
Merge pull request #12496 from reasonerjt/secret-mgr-proxycache
Provide secret manager for proxy cache project
2020-07-22 09:48:24 +08:00
Wenkai Yin(尹文开)
112e38a080
Merge pull request #12541 from stonezdj/20200720_tag_ret_proxy
Add default retention policy
2020-07-21 19:31:12 +08:00
He Weiwei
f18ff08008
Merge pull request #12538 from heww/db-tx-skippers
perf(db): skip tx for get blob, patch/put blob upload apis
2020-07-21 19:04:18 +08:00
stonezdj
2f0f3c45d2 Add default retention policy
Remove images that are not visited in last 7 days
Add a build method in policy models.go

Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-07-21 16:49:35 +08:00
AllForNothing
8d9b1e18d3 Add dry run to gc page
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-21 09:51:31 +08:00
He Weiwei
6db1a1cb91 perf(db): skip tx for get blob, patch/put blob upload apis
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-07-20 16:42:16 +00:00
Steven Zou
cae087ba49
Merge pull request #12511 from steven-zou/fix/p2p_provider_health_check
fix(preheat):remove health property check when saving instance
2020-07-20 21:52:06 +08:00
Steven Zou
ee35e1ecc6
Merge pull request #12507 from chlins/fix/preheat-update-instance
fix(preheat): fix preheat handler PingInstance and UpdateInstance
2020-07-20 17:45:24 +08:00
jwangyangls
25e0f161ea
Merge pull request #12508 from jwangyangls/unified-processing-session-expired
[fix][ui] Operation unified processing session expired
2020-07-20 17:21:54 +08:00
Steven Zou
144edcc0c4 fix(preheat):fix ctl ut failure case
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-20 17:14:17 +08:00
danfengliu
4bdcc1fa7d
Merge pull request #12515 from danfengliu/fix-replication-robot-script
Fix issues in replication tests
2020-07-20 16:19:19 +08:00
Steven Zou
6b9e0e66c4 Merge branch 'master' into fix/p2p_provider_health_check 2020-07-20 16:02:40 +08:00
Daniel Jiang
14203169bf Add GC mechanism to secret manager
When Generate is called and the size is larger than cap, GC will be
triggered.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-07-20 15:53:36 +08:00
Steven Zou
46d7434d0b
Merge pull request #12473 from ywk253100/200706_scheduler
Refactor the scheduler with the task manager mechanism
2020-07-20 15:53:14 +08:00
chlins
78927af032 fix(preheat): fix preheat handler PingInstance and UpdateInstance
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-07-20 15:42:24 +08:00
Wenkai Yin
4dc4b6728c Refactor the scheduler with the task manager mechanism
Refactor the scheduler with the task manager mechanism, this will reduce the duplicate code

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-07-20 14:03:15 +08:00
Steven Zou
3c02b5da03 fix(preheat):remove health property check when saving instance
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-20 13:53:06 +08:00
Steven Zou
a11c2f32da
Merge pull request #12502 from bitsf/fix_replication_swr_pull
fix SWR replication adapter pull-based
2020-07-20 13:25:47 +08:00
Wang Yan
24ed52112e
fix blob deleting status issue (#12481)
1, The update blob status method should udpate the blob version of the blob object as well, otherwise the GC job cannot handle the blob status transform(none - delete - deleting - deletefailed)
as the method is using version equals as the query condition.
2, For the deleting blob which marked for more than 2 hours, it should be set to delete failed in head blob & put manifest request

Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-20 11:44:29 +08:00
Wenkai Yin(尹文开)
5a898c1661
Merge pull request #12510 from ywk253100/200717_copy_proxy
Prevent copying artifact to a proxy cache project
2020-07-20 11:10:46 +08:00
Wenkai Yin(尹文开)
c654b08346
Merge pull request #12506 from ywk253100/200717_save_registry
Don't return the error detail back to the client when adding registry
2020-07-20 11:09:36 +08:00
danfengliu
e20cb51d6b Fix issues in replication tests
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-07-20 09:42:55 +08:00
Ziming Zhang
8857e89e40 feature(redis) support redis sentinel
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-07-19 21:19:03 +08:00
Daniel Jiang
d891e023db
Merge pull request #9311 from airadier/autoonboard-and-custom-user-claim
Add options for automatic onboarding and username claim
2020-07-19 19:15:34 +08:00
Steven Zou
d9ca9bbc69
fix(jobservice):add job id in log getting error (#12513)
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-17 22:33:41 +08:00
Daniel Jiang
a74efdac4d
Merge pull request #12494 from wy65701436/fix-manifest-404
fix get manifest return code
2020-07-17 22:09:06 +08:00
wang yan
3345b8aae2 fix get manifest return code
When to call,
~~~ REQUEST ~~~
GET  /v2/conformance/testrepo/manifests/.INVALID_MANIFEST_NAME

Per OCI distribution spec, it has to return 404, instead of 400 (project name required)

Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-17 15:40:52 +08:00
Yogi_Wang
7b22b38c5c [fix][ui] Operation unified processing session expired
fix #11268  includes the following functions:
delete group  delete chart version  delete project   delete member  add group    delete repo  delete artifact   delete tag   delete robot  delete user   delete registry   delete label  delete replication list     replication
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-07-17 15:33:39 +08:00
Wenkai Yin
54a1155140 Prevent copying artifact to a proxy cache project
Prevent copying artifact to a proxy cache project

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-07-17 15:24:18 +08:00
Wenkai Yin
9493611666 Don't return the error detail back to the client when adding registry
Don't return the error detail back to the client when adding registry to avoid security issue

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-07-17 11:58:08 +08:00
danfengliu
af3a638980
Merge pull request #12498 from danfengliu/add-push-based-replication-test
Add push-based replication test in nightly
2020-07-17 11:01:38 +08:00
danfengliu
aa43afb601 Add push-based replication test in nightly
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-07-16 19:50:42 +08:00
Ziming Zhang
e7c89ce1d9 fix SWR replication adapter pull-based
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-07-16 19:19:18 +08:00
Daniel Jiang
840aa86dfa Provide secret manager for proxy cache project
This commit provides the secret manager for proxy cache.
The secret is used for pushing blobs to local when it's proxied from
remote registry.
Each secret can be used only once and has a relatively short expiration
time.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-07-16 19:12:52 +08:00
Alvaro Iradier
81a7239c66 Better error handling
* Raise an internal error if username claim is not found, instead of just logging a warning
* Don't remove userInfoKey for session on error when it is not required
* Rename "OIDC Username Claim" to just "Username claim"

Signed-off-by: Alvaro Iradier <airadier@gmail.com>
2020-07-16 12:12:08 +02:00
Alvaro Iradier
6f88ff7429 Fix test suite and add test for userClaim
Signed-off-by: Alvaro Iradier <airadier@gmail.com>
2020-07-16 12:12:08 +02:00
Alvaro Iradier
714f989759 Add options for automatic onboarding and username claim
- Add an option in the UI to enable or disable the automatic user onboarding
- Add an option to specify the claim name where the username is retrieved from.

Signed-off-by: Alvaro Iradier <airadier@gmail.com>
2020-07-16 12:12:08 +02:00
Wang Yan
bad8f026fc
upgrade golang to v1.14.5 (#12489)
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-16 16:20:54 +08:00
Wang Yan
d73265d10d
revise gc job to align non blocking gc (#12439)
two phases:
1, mark, select the gc candidates bases on the DB and mark them as status delete.
2, sweep, select the candidate and mark it as status deleting and remove it from backend and database.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-16 14:35:54 +08:00
Steven Zou
4d4a04fad4
Merge pull request #12478 from steven-zou/feat/read_pro_config
feat(p2p):enhance policy enforcer
2020-07-16 11:40:29 +08:00
Qian Deng
bd26c294e8
Merge pull request #12341 from ninjadq/support_multi_down_version
Enhance: Support multi downversion in migration
2020-07-15 23:39:11 +08:00
Ted Guan
9e7edb7a6e
Fix for project metadata (#12410)
Signed-off-by: guanxiatao <guanxiatao@corp.netease.com>
2020-07-15 18:46:45 +08:00
Steven Zou
fcfde5a588 feat(p2p):enhance policy enforcer
Read security settings from the project configurations and override the preheat policy settings if necessary.

Check the project security settings and override the related settings in the policy if necessary.
NOTES: if the security settings (relevant with signature and vulnerability) are set at the project configuration,
they will have the highest priority and override the related settings of the preheat policy.
 e.g (use signature as an example, similar case to vulnerability severity part):
   if policy.signature = false and project.config.signature = true; then policy.signature = true
   if policy.signature = true and project.config.signature = true; then policy.signature = true
   if policy.signature = true and project.config.signature = false; then policy.signature = true
   if policy.signature = false and project.config.signature = false; then policy.signature = false

Signed-off-by: Steven Zou <szou@vmware.com>

Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-15 14:18:34 +08:00
He Weiwei
cadcd4b877
Merge pull request #12480 from heww/move-pkg-types
refactor(quota): move pkg/types to pkg/quota/types
2020-07-15 11:32:27 +08:00
Daniel Jiang
947eadaa72
Merge pull request #12440 from heww/remove-init-clair-db
refactor: remove initialization of clair db
2020-07-15 00:38:12 +08:00
He Weiwei
a22d803a95 refactor(quota): move pkg/types to pkg/quota/types
Closes #9664

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-07-14 14:28:53 +00:00
He Weiwei
c000608d55
Merge pull request #12437 from heww/db-max-connections
chore(db): change max_connections of postgres to 1024
2020-07-14 17:24:16 +08:00
stonezdj(Daojun Zhang)
00a5f215fb
Merge pull request #12404 from stonezdj/20200615_proxy_forbid_push
Add disable push for proxy project
2020-07-14 15:39:19 +08:00
He Weiwei
2a6fe801bc chore(db): change max_connections of postgres to 1024
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-07-14 07:34:37 +00:00