Wenkai Yin
654f4d9202
Refactor health check API
...
Refactor the health check API
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-04-15 14:50:27 +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
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
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
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
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
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
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
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
3d7fd070c7
Refeactor replication policy APIs
...
Refeactor replication policy APIs
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-03-17 10:57:31 +08:00
Daniel Jiang
0d4992a41e
API for system CVE allowlist to new model ( #14412 )
...
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-03-12 10:23:48 +08:00
stonezdj
5a35b7a9c4
Move ldap API to new program model
...
Fix some issue with the LDAP connection test
Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-03-10 16:26:45 +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
ef0bdf6954
refactor: generate scanner APIs by go-swagger
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-03-03 04:23:36 +00:00
He Weiwei
9161a3fbdf
refactor: use ormer from the ctx for scanner ctl mgr and dao ( #14313 )
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-03-01 12:02:40 +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
Wenkai Yin
cc3e240d56
Recover the panic of the process of replication adapter and fix bug of gitlab adapter
...
Recover the panic of the process of replication adapter
Fix bug of gitlab adapter
Fixes #14153
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-02-05 20:21:10 +08:00
Ziming Zhang
ec83f49a1a
fix(retention) migrate sql error
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-02-05 09:09:26 +00:00
He Weiwei
de97b900cf
fix: remove default execution sweeper count ( #14168 )
...
1. Remove the default execution sweeper count for execution vendor.
2. Set the execution sweeper count for gc, preheat, replication,
retention to 50.
3. Disable sweep for the executions of the scan job.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-02-05 12:15:15 +08:00
He Weiwei
060a282e71
fix: 404 if report not found when updating report
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-02-04 07:10:58 +00:00
He Weiwei
3ba0d5a590
fix: make a new ctx when start scan all in async
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-28 09:45:17 +00:00
He Weiwei
e0f7778027
fix: ignore tag in the scan webhook when it's empty ( #14057 )
...
Closes #13464
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-22 20:08:36 +08:00
Wenkai Yin(尹文开)
63831dfd08
Merge pull request #14027 from ywk253100/210116_status
...
Don't ignore the NotFoundErr when handling the status hook of tasks to avoid the status out of sync
2021-01-20 17:07:18 +08:00
Wenkai Yin
e55c7d05ff
Don't ignore the NotFoundErr when handling the status hook of tasks to avoid the status out of sync
...
Don't ignore the NotFoundErr when handling the status hook of tasks to avoid the status out of sync
Fixes #14016
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-01-20 14:53:50 +08:00
He Weiwei
59a0e321ed
fix: always remove the robot after scan job finished
...
1. Register task status change function for the scan job triggered by
scan all.
2. Always to delete the robot account for the scan job after the job is
finished because the job does not retry again when it's failed.
Closes #14000
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-18 07:37:09 +00:00
Steven Zou
42559479e6
Merge pull request #14023 from ywk253100/210115_scheduled
...
Fix the legacy scheduled job issue for GC/scan all
2021-01-18 14:01:01 +08:00
Wenkai Yin(尹文开)
c3b986cbcd
Merge pull request #14012 from ywk253100/210113_replication
...
Query executions with both vendor type and ID when sweep the execution records
2021-01-18 11:15:31 +08:00
Wenkai Yin
7c072e17a6
Fix the legacy scheduled job issue for GC/scan all
...
Fix the legacy scheduled job issue for GC/scan all
Fixes #13968
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-01-15 22:02:36 +08:00
Wenkai Yin
38e0f102bf
Query executions with both vendor type and ID when sweep the execution records
...
Query executions with both vendor type and ID when sweep the execution records
Fixes #13996
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-01-15 20:23:55 +08:00
Ziming Zhang
a7a1149454
fix(retention) execution status for zero repo
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-01-14 06:37:47 +00:00
Wang Yan
dedb86384b
do not add prefix for the legacy robots ( #13966 )
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-12 16:43:54 +08:00
Wang Yan
2d4456c630
refractor project rbac ( #13924 )
...
As the system rbac introduced, move the code of project rbac into project directory
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-11 11:27:26 +08:00
Wang Yan
64e61c0d11
fix robot cannot update expirsat ( #13944 )
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-11 11:26:05 +08:00
Ziming Zhang
39fb500318
feat(retention) refactor to use go swagger api
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-01-08 07:09:28 +00:00
He Weiwei
9402077695
feat: save summary for the scan all execution ( #13931 )
...
Compute the summary info for the scan all and save it to the extra attrs
of the execution.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-08 10:10:31 +08:00
Wang Yan
0cf43d766c
enable system resource access ( #13826 )
...
1, introduce & define the system resources.
2, replace the IsSysAdmin judge method.
3, give the robot the system access capability.
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-07 15:45:04 +08:00
Steven Zou
be98748ca7
Merge pull request #13896 from ywk253100/210105_replication
...
Fix replication filter bug
2021-01-07 13:45:46 +08:00
Wenkai Yin(尹文开)
3408f0b577
Merge pull request #13909 from ywk253100/210106_task
...
Provide a mechanism to sweep the execution/task records in task manager
2021-01-07 13:44:21 +08:00
Wenkai Yin
fb871dbbe8
Provide a mechanism to sweep the execution/task records in task manager
...
Provide a mechanism to sweep the execution/task records in task manager
Fixes #13888
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-01-06 16:41:46 +08:00
He Weiwei
e33ff932d1
test: fix the data race in the test of scan controller ( #13899 )
...
Closes #13876
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-06 16:17:47 +08:00
stonezdj(Daojun Zhang)
b748852ee8
Merge pull request #13805 from stonezdj/201218_add_content_type_length
...
Add content type and length in header
2021-01-06 15:02:34 +08:00