Loong Dai
09371b48e8
lint: sort imports ( #17131 )
...
* lint: add goimports
Signed-off-by: Loong Dai <loong.dai@intel.com>
2022-07-20 11:33:08 +08:00
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
MinerYang
efd9632e96
add nydus middleware ( #17126 )
...
Signed-off-by: yminer <yminer@vmware.com>
remove comments
Signed-off-by: yminer <yminer@vmware.com>
update ut manifest
Signed-off-by: yminer <yminer@vmware.com>
modify comment manifest
Signed-off-by: yminer <yminer@vmware.com>
updtae ut testcase
Signed-off-by: yminer <yminer@vmware.com>
fixwhitespace lint
Signed-off-by: yminer <yminer@vmware.com>
update isNydus judgement && define annotation var
Signed-off-by: yminer <yminer@vmware.com>
whitespace lint
Signed-off-by: yminer <yminer@vmware.com>
2022-07-08 09:56:10 +08:00
Chenyu Zhang
1a1ce634cc
Fix the process of cache layer ( #17010 )
...
fix: fix cache layer issues (#16995,#16997,#16996,#17038)
1. Load config and initialize cache layer in jobservice(for GC)
2. Cache artifact by digest the key should contains repository name
3. Repository cache cleanup error when update
4. Skip save cache when request ctx in transaction
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-07-06 16:11:53 +08:00
Shengwen YU
315d8a8993
fix: update code in compliance with golangci-lint revive ( #17087 )
...
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2022-07-01 14:52:47 +08:00
Wenkai Yin(尹文开)
ab74e853ee
Enhance the read-only API to avoid deleting operations during the job running ( #17055 )
...
Enhance the read-only API to avoid deleting operations during the job running
Fixes #16901
Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-06-29 08:00:17 +08:00
MinerYang
aab320591f
golangci-lint fix ineffassign ( #17027 )
...
Signed-off-by: yminer <yminer@vmware.com>
delete src/lib/redis/helper.go
Signed-off-by: yminer <yminer@vmware.com>
2022-06-21 12:01:59 +08:00
Maksym Trofimenko
9a3cb4a041
GDPR compliant deletion of Users ( #16859 )
...
fixes #16697
Signed-off-by: Maksym Trofimenko <maksym@container-registry.com>
2022-06-16 14:28:15 +02: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
Shengwen YU
c2a9f5de64
fix: update code for golangci-lint gosimple ( #16974 )
...
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2022-06-14 13:44:09 +08:00
stonezdj(Daojun Zhang)
e778ec2edf
Add audit_log forward endpoint ( #16914 )
...
add config item to set log forward endpoint
fallback the audit log to default log when endpoint in error
Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-06-10 10:59:40 +08:00
Shengwen YU
b43ba15f40
fix: golangci-lint errcheck ( #16920 )
...
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2022-06-07 17:00:36 +08:00
Chenyu Zhang
b356d58253
Merge pull request #16861 from chlins/feat/cache-layer-for-manifest
...
feat(manifest): introduce cache layer for manifest (#16459 )
2022-05-27 14:03:42 +08:00
stonezdj
1839965c7a
Add REST API for purge audit log
...
Add rest API for purge audit log
Extract scheduler, execution, task from GC controller for common use
Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-05-23 16:58:31 +08:00
chlins
7eed9db404
feat(manifest): introduce cache layer for manifest ( #16459 )
...
Implement cache layer for resource manifest, it will read manifest
from cache instead of proxying to distribution if enabled.
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-05-19 10:25:50 +08:00
Wang Yan
d3d4ad6a34
fix staticcheck issues ( #16828 )
...
Fix the staticcheck problems that reported by golangci-line staticcheck
Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-05-10 16:07:10 +08:00
MinerYang
083b44e719
bump up astaxie/beego@v1.12.1 to beego/beego/@v1.12.7 ( #16770 )
...
Signed-off-by: yminer <yminer@vmmware.com>
goo mod tidy
Signed-off-by: yminer <yminer@vmmware.com>
Co-authored-by: yminer <yminer@vmmware.com>
2022-04-28 11:58:44 +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
chlins
dbb8859ad8
feat: implement beego session provider
...
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-03-24 10:33:21 +08:00
Chenyu Zhang
84523a2da5
Merge pull request #16494 from alrs/q-err
...
lib/q: fix dropped test error
2022-03-21 17:01:29 +08:00
Wang Yan
ed1f4ab6fb
enhance health validataion ( #16549 )
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-03-18 18:36:50 +08:00
Wang Yan
7cb5c34f7e
add cosign signature icon ( #16533 )
...
Return icon message for UI to render
Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-03-17 11:08:39 +08:00
chlins
5be0b93caa
refactor: import go-redis to core as replacement of redigo
...
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-03-15 20:44:44 +08:00
Lars Lehtonen
d3f7ddfe3a
lib/q: fix dropped test error
...
Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
2022-03-09 10:03:48 -08:00
stonezdj
5618f6d211
The DB config manager is not init on jobservice to call config.WithNotary
...
Make func defaultMgr() public
Set DefaultCfgManager to RestCfgManager and Load it in the jobservice main
config.WithNotary call DefaultMgr(), it wil get the RestCfgManager
Fixes #16418
Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-03-03 14:42:56 +08:00
chlins
3d7a5064e9
fix: trim linebreaks for log parameters
...
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-02-16 10:52:58 +08:00
stonezdj(Daojun Zhang)
02e13390e0
Remove noise in log ( #16333 )
...
DB Config Manager could be registered twice if need to enable cache
Get trace config only when the trace is enabled
Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-02-10 15:42:45 +08:00
He Weiwei
8554b7d7c5
refactor: replace lib/pq with jackc/pgx ( #16267 )
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2022-01-27 11:09:37 +08:00
rao yunkun
ce6bf73884
Merge remote-tracking branch 'upstream/main'
2021-12-05 16:34:04 +08:00
Wang Yan
742e7ded00
add accessory dao service ( #16045 )
...
Signed-off-by: wang yan <wangyan@vmware.com>
2021-12-03 14:34:02 +08:00
Wang Yan
7608df4b5c
add pull update control env ( #16051 )
...
These variables are temporary solution for issue: https://github.com/goharbor/harbor/issues/16039
When user disable the pull count/time/audit log, it will decrease the database access, especially in large concurrency pull scenarios.
1, PULL_TIME_UPDATE_DISABLE : The flag to indicate if pull time is disable for pull request.
2, PULL_COUNT_UPDATE_DISABLE : The flag to indicate if pull count is disable for pull request.
3, pull audit log will not create on disabling pull time.
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-11-26 18:13:23 +08:00
He Weiwei
b2268dbf8e
fix: remove x-go-type in swagger.yaml ( #15923 )
...
Closes #15912
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-11-04 23:39:36 +08:00
stonezdj(Daojun Zhang)
adc2e8873f
Add hostname to trace span name ( #15806 )
...
Fixes #15726 , unify the trace span name in all components
Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-10-25 17:09:59 +08:00
stonezdj(Daojun Zhang)
2020bf383b
Merge pull request #15790 from stonezdj/21oct15_change_trace_name
...
Change the span name to <method>_<request uri>
2021-10-18 09:41:12 +08:00
stonezdj
3b2ac06639
Change the span name to <method>_<request uri>
...
Use the same trace option for HTTPTransport
fixes #15726
Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-10-14 14:33:16 +08:00
Soumik Majumder
2679b2427b
Fix semgrep use-of-weak-crypto error ( #15784 )
...
Signed-off-by: Soumik Majumder <soumikm@vmware.com>
2021-10-14 14:28:59 +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
Qian Deng
31707dbf25
Using harbor lib config
...
using config manager to get env configs
Signed-off-by: Qian Deng <dengq@vmware.com>
2021-09-18 10:58:52 +00:00
Qian Deng
bad913cf6d
Refactor trace code
...
* use lib trace helper function
* add gracefull shutdown
* Add commens for new added exposed function
* Add licence on top of new created files
* Update trace library
* Update configs
* Add attribute and namespance in config
Signed-off-by: Qian Deng <dengq@vmware.com>
2021-09-18 10:58:52 +00:00
Qian Deng
a15983432c
Add trace for core
...
* Add trace related lib
* Add trace middleware for core
* add rid for middleware
Signed-off-by: Qian Deng <dengq@vmware.com>
2021-09-18 10:58:52 +00:00
He Weiwei
ecc1a04c92
refactor: implement a lock free quota ( #15399 )
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-09-17 11:26:37 +08:00
Junyoung, Sung
251feea1fd
Fix typo maxDeepth -> maxDepth ( #15574 )
...
Signed-off-by: Junyoung, Sung <junyoung.sung@naverlabs.com>
2021-09-13 21:23:31 +08:00
He Weiwei
d482a0c323
fix: avoid panic in the RetryUntil ( #15501 )
...
1. Use jpillora/backoff to get the backoff to avoid the panic in RetryUntil.
2. Return with last err when retry timeout.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-08-27 17:28:33 +08:00
yunkunrao
246d863c59
Refactor ping method into util pkg
...
Signed-off-by: yunkunrao <yunkunrao@gmail.com>
2021-08-19 21:57:25 +08:00
stonezdj(Daojun Zhang)
7b84f4e137
Merge pull request #15270 from stonezdj/21jun05_fix_rest_int_parse_fail
...
Fix invalid syntax errors when int value is convert to scientific notation
2021-07-11 21:00:06 +08:00
Wang Yan
b158086642
fix conformance failure ( #15261 )
...
fixes #15252
Give 404 for invalid digest when to get/head manifest
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-07-06 15:11:13 +08:00
stonezdj
41968091a2
Fix invalid syntax errors when int value is convert to scientific notation
...
Add parseInt function to parse the scientific notation
Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-07-05 22:20:00 +08:00
stonezdj(Daojun Zhang)
08d47f471a
Move genyaml to cmd/swagger ( #15062 )
...
Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-06-29 14:29:03 +08:00
Wenkai Yin
9ebd517c7e
Add validation for destination namespace when creating/updating replication policy
...
Add validation for destination namespace when creating/updating replication policy
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-06-10 22:16:05 +08:00
He Weiwei
f6a1c31f9f
refactor: convert scan report in scan job
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-05-29 12:19:36 +00:00