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
Daniel Jiang
12420ae31d
Merge pull request #14957 from stonezdj/21may24_update_configure
...
Change configurations in swagger.yaml make it more readable
2021-05-25 23:58:40 +08:00
stonezdj
fe830ac4d2
Change configurations in swagger.yaml make it more readable
...
Update the genyaml to generate the configurations type
Add toCfgMap in config handler
Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-05-24 19:13:55 +08:00
Wenkai Yin(尹文开)
544fa806fa
Set null list when or list is nil in query ( #14941 )
...
Set null list when or list is nil in query
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-05-24 16:22:39 +08:00
Wenkai Yin
5ebc8b4fdd
Truncate the string when deletinng the resources when the length exceeds the limit
...
Truncate the string when deletinng the resources when the length exceeds the limit
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-05-18 17:17:41 +08:00
He Weiwei
6f3607cebd
perf: cache the metadata of the scanner ( #14879 )
...
1. Cache the metadata of scanner 30s.
2. Change the scanner client request timeout to 5s.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-05-14 14:27:37 +08:00
Moshe Immerman
d1b553fd3a
feat: add ORM_DEBUG env option ( #14709 )
...
Signed-off-by: Moshe Immerman <moshe@flanksource.com>
2021-05-12 10:56:30 +08:00
stonezdj(Daojun Zhang)
a6d92ca807
Merge pull request #14777 from stonezdj/21apr15_declarative_config
...
Implement declarative configure feature
2021-05-12 09:21:57 +08:00
stonezdj
3825220ca6
Implement declarative configure feature
...
Add env CONFIG_OVERWRITE_JSON for declarative config
Init config with the json in CONFIG_OVERWRITE_JSON in main.go
Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-05-11 20:58:19 +08:00
Wenkai Yin(尹文开)
e006f4bab5
Support specifying multiple fields for default sorting ( #14788 )
...
Support specifying multiple fields for default sorting
Fixes #14433
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-05-10 17:04:10 +08:00