Commit Graph

4509 Commits

Author SHA1 Message Date
Wenkai Yin
7816ff5e85 retry several times when failed to copy blob during the replication
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-09-02 16:07:20 +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
Steven Zou
d4108e3fac fix(preheat):handle fail case of preheat in job
Signed-off-by: Steven Zou <szou@vmware.com>
2020-08-28 17:55:36 +08:00
Wenkai Yin(尹文开)
560eba7bd1
Merge pull request #12894 from stonezdj/200827_dockerhub_offline
Fallback to local repo on errors when proxy to remote repo
2020-08-28 15:14:21 +08:00
Wenkai Yin(尹文开)
3abe8b8fab
Merge pull request #12456 from julienvey/fix-sql-typo
Fix typo in sql log
2020-08-28 10:04:27 +08:00
Wenkai Yin(尹文开)
bad704d38b
Merge pull request #12897 from reasonerjt/icon-refactor
Fill in the icon of known artifacts in artifact controller
2020-08-28 10:03:12 +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
Ziming Zhang
bda66e9e1f Add aws China regions ECR support, both of cn-north-1 and cn-northwest-1 endpoints.
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-08-27 23:43:16 +08:00
stonezdj
6967d73476 Fallback to local repo on errors when proxy to remote repo
When the remote repo is offline or network issue or credential issue, fall back to local repo.
 Fixes #12853

Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-08-27 22:10:54 +08:00
Daniel Jiang
a651eb0949
Merge pull request #12883 from wy65701436/fixes-12254
fix event log issue
2020-08-27 16:52:24 +08:00
wang yan
b51aaac26e fix event log issue
fixes #12554
Add string method for each event, and the detail can be logged in the core.log

Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-26 18:27:21 +08:00
He Weiwei
815ab61bc6
Merge pull request #12881 from heww/operator-from-security-username
refactor(event): change default operator to username of security
2020-08-26 15:42:36 +08:00
Ziming Zhang
c3fde4e483 fix(replication) gcr deletion and tag deletion
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-08-26 15:18:05 +08:00
He Weiwei
793c5ca57b refactor(event): change default operator to username of security
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-26 05:52:02 +00:00
Steven Zou
87d18268e0
Merge pull request #12879 from kofj/fix_schedule_error_msg
Fix schedule error msg.
2020-08-26 11:04:10 +08:00
Steven Zou
79665ed997
Merge pull request #12875 from chlins/fix/disable-change-p2p-provider-vendor
fix(p2p): disable change provider vendor type
2020-08-26 10:59:50 +08:00
fanjiankong
bbad4db645 Fix schedule error msg.
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-08-25 23:41:15 +08:00
chlins
d8769a41cd fix(p2p): disable change provider vendor type
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-25 16:56:17 +08:00
AllForNothing
5ae55eff6c Fix UI issues found on round-2 testing day
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-25 13:10:45 +08:00
He Weiwei
2ab4fbefd6
Merge pull request #12862 from heww/fix-issue-12861
fix(quota): change log to debug level when warning not found
2020-08-24 16:37:58 +08:00
Wang Yan
ad47d2f444
fix upgrade issue (#12857)
fixes #12849

1, gives a default value to blob status in the migration script, and use none to replace the empty string as
the StatusNone, that will more readable on debugging failure.

2, GC jobs marks all of blobs as StatusDelete in the mark phase, but if encounter any failure in the sweep phase,
GC job will quite and all of blobs are in StatusDelete. If user wants to execute the GC again, it will fail as the
StatusDelete cannot be marked as StatusDelete. So, add StatusDelete in the status map to make StatusDelete can be
marked as StatusDelete.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-24 16:08:15 +08:00
He Weiwei
356be80f56 fix(quota): change log to debug level when warning not found
Closes #12861

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-24 07:55:46 +00:00
Daniel Jiang
c0602b5fb3
Merge pull request #12832 from ywk253100/200820_data
Add id column to data_migration table
2020-08-21 19:30:05 +08:00
Ted Guan
645dea36a6
Fix for duplicate webhook policy name (#12729)
Signed-off-by: guanxiatao <guanxiatao@corp.netease.com>
2020-08-20 18:02:13 +08:00
Wenkai Yin
975ef193dd Add id column to data_migration table
Add id column to data_migration table and add logic to make sure there is only one data version record

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-20 17:43:15 +08:00
AllForNothing
b472907362 Change storage of csrf token from cookie to localstorage
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-20 16:22:25 +08:00
Daniel Jiang
05afb94b9b Store csrf token in the header of response instead of cookie
The current approach will prevent the effectiveness of `Cache-Control`
header and gorilla's library add `Vary:Cookie` header in all responses.

We will set the token in a header of response so the response can be
cached when needed.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-08-20 15:46:02 +08:00
Will Sun
446ae4c173
Merge pull request #12817 from AllForNothing/test-2
Fix issues with label target 2.1 and RC
2020-08-20 15:13:27 +08:00
Wenkai Yin(尹文开)
d4f18139ef
Merge pull request #12618 from ywk253100/200729_tk_mgr
Refresh the status of execution for every status changing of task
2020-08-20 14:38:09 +08:00
AllForNothing
56083cd5c9 Fix issues with label target 2.1 and RC
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-19 16:46:28 +08:00
wang yan
a7b9495ba0 Merge branch 'master' of https://github.com/goharbor/harbor into fix-resource-order 2020-08-19 15:30:48 +08:00
He Weiwei
d894d4c8bc
Merge pull request #12799 from wy65701436/fixes-12795
fix gc job submit issue
2020-08-19 15:27:02 +08:00
Will Sun
c35a39d432
Merge pull request #12814 from AllForNothing/ui-ut
Improve UI UT for artifact list page
2020-08-19 15:08:19 +08:00
AllForNothing
2b441a7ee5 Improve UI UT for artifact list page
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-19 12:45:39 +08:00
wang yan
1cc73bd92a Merge branch 'master' of https://github.com/goharbor/harbor into fix-resource-order 2020-08-19 12:21:45 +08:00
wang yan
648b80bc34 udpate resource list order
1, order label by creation time.
2, order webhook policy by creation time.
3, order replication policy by creation time.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-19 11:20:31 +08:00
Steven Zou
c1b6be6ac9
Merge pull request #12801 from heww/fix-issue-9471
refactor(scan): remove duplicate CVESet types
2020-08-19 10:37:10 +08:00
Ted Guan
eb317fb8cb
tag retention webhook support (#12749)
Signed-off-by: guanxiatao <guanxiatao@corp.netease.com>
2020-08-19 00:07:45 +08:00
stonezdj(Daojun Zhang)
f7e1d186e0
Merge pull request #12792 from ywk253100/200814_proxy_cache
Return 403 when trying to push artifacts into the proxy cache project…
2020-08-18 16:22:51 +08:00
stonezdj(Daojun Zhang)
716625a769
Merge pull request #12793 from ywk253100/200816_disable_tag
Disable the tag creation for the artifact under a proxy cache project
2020-08-18 16:15:33 +08:00
He Weiwei
ef37bd1afb refactor(scan): remove duplicate CVESet types
Closes #9471

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-18 06:33:17 +00:00
wang yan
44f7bf6739 fix gc job submit issue
fixes #12795
Return 409 on triggering a GC job when there is a job ongoing.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-18 14:31:54 +08:00
Wang Yan
da52e677e5
remove robot accounts when to delete a project (#12789)
The robots associate with the project should be removed after the project is deleted.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-18 10:38:45 +08:00
Daniel Jiang
77281ca68b
Token service handling invalid resource (#12790)
This commit updates the way token service handles invalid resource, for
example a resource without projectname.
It will clear the requested access instead of returning 500 error.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-08-18 10:37:20 +08:00
Will Sun
89b597a811
Merge pull request #12783 from AllForNothing/p2p-4
Fix UI bugs found on testing day for target 2.1
2020-08-18 10:29:52 +08:00
Will Sun
9671ff1f10
Merge pull request #12701 from AllForNothing/artifact-icon
get artifact icon from backend API
2020-08-18 10:29:15 +08:00
fanjiankong
09ba463cc7 Fix.
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-08-17 21:40:37 +08:00
He Weiwei
16d1613b10
Merge pull request #12786 from heww/fix-artifact-scan-permission
fix(scan): fix the permission checking for artifact scanning
2020-08-17 18:30:18 +08:00
He Weiwei
f659523f50 fix(scan): fix the permission checking for artifact scanning
Closes #12778

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-17 09:55:38 +00:00
Wenkai Yin
0fd230c2d6 Refresh the status of execution for every status changing of task
Refresh the status of execution for every status changing of task to support filtering executions by status directly

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-17 17:38:55 +08:00
AllForNothing
b664c3c235 Fix UI bugs found on testing day for target 2.1
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-17 15:22:18 +08:00
He Weiwei
929fc8b3f7
Merge pull request #12787 from chlins/fix/preheat-get-log-api
fix(preheat): fix the swagger definition of preheat get log api
2020-08-17 14:54:12 +08:00
Wenkai Yin(尹文开)
2de10700d8
Merge pull request #12762 from monofone/10712-remove-forgot-password
remove reset password dialog from sign-in component
2020-08-17 14:24:36 +08:00
chlins
4f95c4d067 fix(preheat): fix the swagger definition of preheat get log api
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-17 12:41:02 +08:00
AllForNothing
e6541672d5 get artifact icon from backend API
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-17 10:21:47 +08:00
Wenkai Yin
e9ce631aa3 Disable the tag creation for the artifact under a proxy cache project
Disable the tag creation for the artifact under a proxy cache project
Fixes #12713

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-16 22:02:30 +08:00
Wenkai Yin
a73742c0a7 Return 403 when trying to push artifacts into the proxy cache project to avoid the retrying in the docker client
Return 403 when trying to push artifacts into the proxy cache project to avoid the retrying in the docker client
fixes #12731

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-16 21:22:22 +08:00
He Weiwei
f309896f2f refactor(api): generate project apis by go-swagger
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-15 16:10:57 +00: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
stonezdj(Daojun Zhang)
205f4f6695
Merge pull request #12768 from stonezdj/200813_bug12741
Use orm.Context instead request context in background go routing
2020-08-14 21:15:15 +08:00
stonezdj
ff937e90d3 Use orm.Context instead request context in background go routing
Fixes #12741,
Avoid use ctx info in event handler because it is background go routine

Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-08-14 15:25:06 +08:00
Wenkai Yin
cca1dcca51 Use a separated database table to store the data version
Use a separated database table to store the data version.
Fixes #12747

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-14 11:38:13 +08:00
Sören Rohweder
8e876cb946 remove reset password dialog from sign-in component
As mentioned in #10712 forgot password should be removed. The
dialog was left in place.

Signed-off-by: Sören Rohweder <soeren.rohweder@fastleansmart.com>
2020-08-13 08:27:07 +02:00
Wang Yan
01e4aa61f7
fix gc remove manifest issue (#12748)
fixes #12720

The GC job doesn't remove the manifest of scheme1.MediaTypeSignedManifest as it's recognized by GC job.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-13 11:25:06 +08:00
He Weiwei
e476286fdc
Merge pull request #12755 from heww/expired-blob-size
fix(blob): make blob size in redis expired in 24 hours
2020-08-13 11:23:27 +08:00
chlins
b3012ec08d fix(replication): fix quay adapter authorization
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-12 22:12:08 +08:00
He Weiwei
e3fd83aad1 fix(blob): make blob size in redis expired in 24 hours
Closes #11873

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-12 11:45:50 +00:00
Wang Yan
980c6291df
fix gc foreign layer issue (#12736)
fixes #12717

Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-12 16:43:26 +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
Chlins Zhang
ad158964bb
Merge pull request #12690 from chlins/fix/preheat-disable-instance-precheck
fix(preheat): add precheck before disable instance
2020-08-10 17:36:29 +08:00
stonezdj(Daojun Zhang)
49f4559608
Merge pull request #12518 from stonezdj/202020717_duplicate_op
Fix #12487: Proxy cache create duplicated operation log
2020-08-10 17:01:07 +08:00
Wenkai Yin(尹文开)
d599cd98bf
Merge pull request #10455 from chlins/fix/quay-replication-adapter-refactor
fix(replication): refactor quay adapter to fix authorization and supp…
2020-08-10 16:37:19 +08:00
stonezdj
aa8b3a1343 Fix #12487: Proxy cache create duplicated operation log
Change method UseLocalManifest to avoid pull manifest frequently

Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-08-10 16:27:59 +08:00
chlins
3340086af5 fix(preheat): add precheck before disable instance
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-10 15:35:44 +08:00
Wenkai Yin(尹文开)
e8f9fb63c0
Merge pull request #12674 from reasonerjt/standalone-db-migrator
Provide a standalone migrator to migrate DB schema.
2020-08-10 15:11:52 +08:00
Will Sun
f31b29a01c
Merge pull request #12675 from AllForNothing/p2p-3
Add name and endpoint check for p2p-preheat
2020-08-10 10:16:03 +08:00
Chlins Zhang
0cd820ae6c
Merge pull request #12669 from steven-zou/fix/reuse_pro_config
fix(preheat):leverage project settings
2020-08-08 13:23:37 +08:00
chlins
b765cfe0ce fix(replication): refactor quay adapter to fix authorization and support quay.io and enterprise quay (#10317)
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-08 13:17:01 +08:00
Chlins Zhang
6b9929d848
Merge pull request #12678 from chlins/fix/preheat-delete-instance-precheck
fix(preheat): add precheck when delete instance
2020-08-08 12:54:00 +08:00
Wenkai Yin
219b9910eb Show the detail error message when failed to fetch the artifacts during replication
Show the detail error message when failed to fetch the artifacts during replication

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-07 18:31:02 +08:00
AllForNothing
041a489fad Add name and endpoint check for p2p-preheat
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-07 16:44:15 +08:00
chlins
5c433c0875 fix(preheat): add precheck when delete instance
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-07 14:06:35 +08:00
疯魔慕薇
19234cdb46
Merge pull request #12673 from chlins/fix/preheat-execution-and-task-pagination
fix(preheat): add pagination for execution and task list api
2020-08-06 23:08:21 +08:00
Daniel Jiang
4f94f59d2a Provide a standalone migrator to migrate DB schema.
Fixes #11885
This part will not by default be packaged into release.
A README.md will be added in another commit.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-08-06 18:57:55 +08:00
chlins
302e4c6659 fix(preheat): add pagination for execution and task list api
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-06 16:59:38 +08:00
Steven Zou
f7bb6dd233
Merge pull request #12665 from chlins/fix/preheat-list-providers-under-project
fix(preheat): provider more info about p2p provider instance
2020-08-06 16:57:21 +08:00
Steven Zou
4f90ebce9f
Merge pull request #12668 from chlins/fix/preheat-delete-policy
fix(preheat): check running executions when delete policy
2020-08-06 16:47:53 +08:00
Steven Zou
d7bb6dac17 fix(preheat):leverage project settings
- use content trust settings of project configurations
- use vulnerability severity settings of project configurations

Signed-off-by: Steven Zou <szou@vmware.com>
2020-08-06 14:15:21 +08:00
chlins
5a2d4dd552 fix(preheat): check running executions when delete policy
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-05 17:54:20 +08:00
Wenkai Yin
d6288a43e8 Do some refine for the scheduler
1. Accept vendorType and vendorID when creating the schedule
2. Provide more methods in the scheduler interface to reduce the duplicated works of callers
3. Use a new ormer and transaction when creating the schedule

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-05 17:43:18 +08:00
chlins
89972f766f fix(preheat): provider more info about p2p provider instance
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-05 17:23:43 +08:00
fanjiankong
4570a46823 Fix bug of update preheat instance default.
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-08-04 18:54:03 +08:00
Will Sun
5b4573c3ac
Merge pull request #12628 from AllForNothing/pull-by-tag
Add pull command by tag for artifact detail page
2020-08-04 09:59:54 +08:00
Will Sun
1006386572
Merge pull request #12641 from AllForNothing/improve-p2p-2
Improve p2p UI
2020-08-04 09:59:23 +08:00
Will Sun
18196edaa8
Merge pull request #12642 from AllForNothing/cron
Improve cron component and create project component
2020-08-04 09:58:52 +08:00
Chlins Zhang
dc58271d3e
Merge pull request #12649 from chlins/fix/prheat-log-display
fix(preheat): fix preheat task log display
2020-08-03 23:01:28 +08:00
Chlins Zhang
6f6742894c
Merge pull request #12647 from chlins/refactor/preheat-policy-serialize
refactor(preheat): refactor policy schema serialize funcs
2020-08-03 23:01:01 +08:00
AllForNothing
7065a7a0a7 Improve p2p UI
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-03 18:56:28 +08:00
Daniel Jiang
53577ceb13
Merge pull request #12650 from wy65701436/fix-gc-art-trash
update GC job
2020-08-03 18:54:22 +08:00