Commit Graph

4883 Commits

Author SHA1 Message Date
He Weiwei
dc37c83e11
refactor: use singular as the tag for user APIs (#14654)
Use singular as the tag for user APIs to align with other APIs.

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-04-15 10:52:48 +08:00
Wenkai Yin(尹文开)
e6b2abfebb
Merge pull request #14653 from reasonerjt/no-oidc-admin
Do not get OIDC info for admin user
2021-04-15 09:50:43 +08:00
Daniel Jiang
6668883c36 Do not get OIDC info for admin user
This commit skips getting OIDC meta info for admin user.
It fixes the issue that admin user cannot login to portal, which was
introduced in refactor.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-04-14 21:51:53 +08:00
Daniel Jiang
d1426fb0c5
Merge pull request #14635 from stonezdj/21apr13_move_config_exp
Move common config api to lib/config
2021-04-14 18:08:18 +08:00
stonezdj(Daojun Zhang)
dd7bd72122
Merge pull request #14645 from stonezdj/21apr14_fix_projmember_fresh_user
Fix nightly issue: can not add user that never logged in projectmember api
2021-04-14 16:42:10 +08:00
Archer1A
264e2e45f2
fix(jobservice): value out of range (#14634)
value out of range when job count bigger than 256

Signed-off-by: vic <985695123@qq.com>
2021-04-14 14:28:36 +08:00
stonezdj
1f5b3b11f4 Fix nightly issue: can not add user that never logged in
Handle the NotFoundError in userManager.GetUserByName()

Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-04-14 13:32:47 +08:00
stonezdj
ef73c45681 review comments
Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-04-14 12:26:27 +08:00
Wenkai Yin(尹文开)
28d4e285f9
Fix bug of ping registry (#14625)
Fix bug of ping registry
fixes #14610

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-04-14 11:11:09 +08:00
stonezdj
9807a5a9ff Merge branch 'master' into 21apr13_move_config_exp
# Conflicts:
#	src/common/dao/project/projectmember_test.go
#	src/core/api/projectmember.go
#	src/core/auth/ldap/ldap_test.go
#	src/server/v2.0/handler/project.go
2021-04-14 09:45:48 +08:00
stonezdj
751d404519 Refactor project member api to new programming model
Add pkg/member/dao
    Add pkg/member/models
    Add pkg/member/manager
    Add controller/member
    Remove the old project member API

Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-04-13 21:28:54 +08:00
stonezdj
60478f4990 Move common config api to lib/config
Register all config managers, and get it by getConfigManger()

Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-04-13 19:43:33 +08:00
Will Sun
81f0e0685a
Fix creating replication rule issue and creating proxy cache project issue (#14614)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-04-13 16:28:02 +08:00
Daniel Jiang
1d01db3d3c
Merge pull request #14604 from reasonerjt/users-api-refact-2
API for users to new model
2021-04-13 16:21:51 +08:00
Steven Zou
39256193ca fix(js):job log not found issue
- return 404 code when the job log is not found

Signed-off-by: Steven Zou <szou@vmware.com>
2021-04-13 12:11:31 +08:00
Daniel Jiang
d4cd2b87bd API for users to new model
This commit moves the legacy apis related to users to new model.
Some funcs under common/dao are left b/c they are used by other module,
which should also be shifted to leverage managers.
We'll handle them separately.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-04-13 11:11:50 +08:00
Ziming Zhang
c775e989df refactor retention dao
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-04-12 16:36:00 +08:00
Wenkai Yin(尹文开)
e4678dc7db
Merge pull request #14578 from ywk253100/210318_replication
Improve the performance of replication
2021-04-12 10:44:32 +08:00
Wenkai Yin
09c3d042ea Improve the performance of replication
Improve the performance of replication by introducing a new API to check whether the blob can be mounted directly

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-04-12 09:54:25 +08:00
Steven Zou
3646b263da
Merge pull request #14591 from steven-zou/fix/hook_resent_issue
fix(js): webhook infinitely resending issue
2021-04-09 17:08:08 +08:00
stonezdj
ac5e908597 Refactor user group to new programming model
Add context to required methods
Add pkg/usergroup/dao
Add pkg/usergroup/manager
Add controller/usergroup/controller

Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-04-09 14:40:48 +08:00
stonezdj
107e468b60 Refactor configure api to new programming model
Changes include:
1. Move core/config to controller/config
2. Change the job_service and gcreadonly to depends on lib/config instead of core/config
3. Move the config related dao, manager and driver to pkg/config
4. Adjust the invocation of the config API, most of then should provide a context parameter, when accessing system config, you can call it with background context, when accessing user config, the context should provide orm.Context

Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-04-09 08:10:11 +08:00
Steven Zou
bb7f706d78 fix(js): webhook infinitely resending issue
- update the resending logic in the hook agent
- use backoff lib to generate backoff duration
- remove retry cache queue
- leverage reaper to restore the sending if direct retries are all failed
- remove useless funcs/codes

fix #14545

Signed-off-by: Steven Zou <szou@vmware.com>
2021-04-08 19:59:16 +08:00
Will Sun
d9052c8241
Fix pull command issue for unlogged users (#14584)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-04-08 18:42:46 +08:00
Will Sun
778ce4d336
Fix storage display and add build timestamp (#14592)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-04-08 18:42:29 +08:00
stonezdj(Daojun Zhang)
8d6f4ddc38
Merge pull request #14583 from reasonerjt/authproxy-admin-username
Add attribute admin username for authproxy
2021-04-08 16:56:47 +08:00
Qian Deng
c5d12ce8ee
Merge pull request #14542 from ninjadq/add_task_info_in_exporter
Add task info in exporter
2021-04-07 18:17:26 +08:00
Daniel Jiang
ad8eee8623 Add attribute admin username for authproxy
This commit adds the attribute "http_authproxy_admin_usernames", which
is string that contains usernames separated by comma, when a user logs
in and the username in the tokenreview status matches the setting of
this attribute, the user will have administrator permission.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-04-07 18:14:59 +08:00
DQ
fd62932a1f Enhance: Refactor metrics exporter
* refactor register logic
* remove unused code
* edit some wording

Signed-off-by: DQ <dengq@vmware.com>
2021-04-07 14:57:30 +08:00
Will Sun
85c08d62a4
Add server driven pagination to registries page (#14581)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-04-07 14:35:53 +08:00
Will Sun
66e0246f81
Support proxy cache for docker-registry type (#14582)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-04-07 14:35:13 +08:00
Will Sun
19a9561ffa
Improve grid view for repos page (#14500)
Signed-off-by: AllForNothing <sshijun@vmware.com>

Co-authored-by: 孙世军 <sunshijun@sunshijundeMacBook-Air.local>
2021-04-07 14:34:29 +08:00
Will Sun
acba15210b
Add ruote resue strategy (#14524)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-04-06 16:58:00 +08:00
DQ
dcb28d8e30 Add test case for exporter
add e2e test to verify exporter and jobservice metrics exist

Signed-off-by: DQ <dengq@vmware.com>
2021-04-06 15:54:33 +08:00
Will Sun
f74759667c
Improve replication page (#14566)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-04-02 14:13:34 +08:00
Will Sun
8b917c0ad3
Fix css issue for task list page (#14560)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-04-02 12:37:58 +08:00
Will Sun
3604ebc536
Update customizing UI style function (#14550)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-04-01 17:12:17 +08:00
Wenkai Yin(尹文开)
28596c3ffb
Refactor registry API (#14528)
* Refactor registry API

Refactor registry API

Signed-off-by: Wenkai Yin <yinw@vmware.com>

* Fix bugs of replications

1. Fix the scheduled replication doesn't work issue
2. Fix the destination name lost issue when updating replication policy

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-03-31 15:49:23 +08:00
stonezdj(Daojun Zhang)
70165be3f0
Remove the testing/apitests code from this repo (#14518)
Moved to the vmware/harbor-boshrelease repo already

Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-03-30 19:07:36 +08:00
DQ
7eebbeebdf Add jobservice task queue related task
add jobservice metrics
add redis client

Signed-off-by: DQ <dengq@vmware.com>
2021-03-30 10:29:36 +00:00
DQ
fbe9cd88f8 Enabled Prometheus for Jobservice
* Add prom server on jobservice
* Enabeld configs in templates
* Enabeld jobservice metrics in nginx

Signed-off-by: DQ <dengq@vmware.com>
2021-03-30 08:52:59 +00:00
stonezdj
5bc1dc8e77 Replace some x-go-type in swagger
Related models:
    LdapFailedImportUser
    LdapUser
    UserGroup

Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-03-26 14:03:02 +08:00
Vadim Bauer
e714a8eacc Before fetching the repository check if the project has container
registry enabled.
closes #14328 #13353

Signed-off-by: Vadim Bauer <vb@container-registry.com>
2021-03-24 10:58:19 +08:00
Will Sun
b74c4b0cfe
Add switch button to password input (#14484)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-03-24 09:25:52 +08:00
Wang Yan
9ef50ed430
refactor notification (#14406)
* Refactor webhook

refactor notification to new programming model

Signed-off-by: wang yan <wangyan@vmware.com>
2021-03-22 17:27:23 +08:00
Wenkai Yin(尹文开)
b2f0a1f0f5
Merge pull request #14400 from ywk253100/210226_registry
Refeactor replication policy APIs
2021-03-22 15:02:46 +08:00
He Weiwei
a2b08446d7
refactor: generate search API by go-swagger (#14422)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-03-22 14:35:44 +08:00
Wenkai Yin(尹文开)
634be34236
Merge pull request #14457 from ywk253100/210316_cpu
[cherry-pick]Fix the consume too much CPU issue
2021-03-17 14:37:29 +08:00
Will Sun
f0b241c695
Add pagination to replication rules searching (#14464)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-03-17 14:32:45 +08:00
Wenkai Yin
8b1817be0f Fix the consume too much CPU issue
1. Update execution status during the upgrade
2. Refine the execution sweeper

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-03-17 13:34:24 +08:00