Commit Graph

11551 Commits

Author SHA1 Message Date
Chlins Zhang
8476e07d75
[cherry-pick] chore: fix incorrect otel timeout in harbor yaml template (#19121)
chore: fix incorrect otel timeout in harbor yaml template

Update the incorrect otel timeout sample value in the harbor YAML
configuration template.

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-08-16 15:05:34 +08:00
Chlins Zhang
3db3d60c02
[cherry-pick] refactor: migrate the redis command keys to scan (#19148)
refactor: migrate the redis command keys to scan

Refine the cache interface, migrate the Keys to Scan, change the redis
underlying keys command to scan.

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-08-16 11:21:34 +08:00
MinerYang
738f57567e
bump go1.19.12 on release-2.7.0 base on ph4 (#19162)
Signed-off-by: yminer <yminer@vmware.com>
2023-08-14 15:24:11 +08:00
Yang Jiao
7c6e292fd4
[cherry-pick]Bump up setup-gcloud to 430.0.0 (#19119)
Bump up setup-gcloud to 430.0.0

Bump up setup-gcloud to 430.0.0

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-08-08 10:50:58 +08:00
Chlins Zhang
60ba848084
[cherry-pick] fix: fix replication list projects with pure numberic name (#19093)
fix: fix replication list projects with pure numberic name

Quote the project name when listing projects in the replication, resolve
the issue of pure number name of project.

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-08-07 14:24:21 +08:00
Shijun Sun
c1bb162f14
[Cherry-pick]Convert the string "0" to number 0 (#19082)
Convert the string "0" to number 0
1. Fixes #19046

Signed-off-by: AllForNothing <sshijun@vmware.com>
2023-08-03 14:37:18 +08:00
Shengwen YU
b2a75dc5f8
fix: TRIVYVERSION=v0.44.0 && TRIVYADAPTERVERSION=v0.30.15 (#19089)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-08-03 11:50:12 +08:00
Wang Yan
e767fe21e9
[cherry-pick]fix accessory import issue (#19056)
fix accessory import issue

fixes #19041

The issuse was introduced by https://github.com/goharbor/harbor/pull/17087.
To move the import to main since the anonymous imports only allowed at main in go-cilint.

Fixes it:
To add the anonymous imports at the jobservice main since the gc job needs to remove accessory when to delete an artifact

Signed-off-by: wang yan <wangyan@vmware.com>
2023-08-01 11:03:48 +08:00
Shengwen YU
9151435129
[Cherry-pick] fix: bump-up TRIVYVERSION=v0.43.0 and TRIVYADAPTERVERSION=v0.30.14 (#18995)
fix: bump-up TRIVYVERSION=v0.43.0 and TRIVYADAPTERVERSION=v0.30.14

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-07-27 16:59:25 +08:00
Yang Jiao
56d92a1fcd
[cherry-pick]Fix APITEST_DB_PROXY_CACHE x509 (#18980)
Fix APITEST_DB_PROXY_CACHE x509

Fix APITEST_DB_PROXY_CACHE x509, Because cicd.harbor.vmwarecna uses a self-signed certificate.

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-07-24 13:56:26 +08:00
Danny Kulchinsky
874399f6d5
[cherry-pick][2.7] fix: add retry on the caller of v2DeleteManifest instead within v2DeleteManifest (#18802)
fix: add retry on the caller of v2DeleteManifest instead within v2DeleteManifest

Signed-off-by: Danny Kulchinsky <dkulchinsky@fastly.com>
2023-06-12 16:32:45 +08:00
Viktor
1661406027
Changed logic search projects in gitlab adapter for 2.7.0 (#18784)
* fix(gitlab): change logic search projects usage search_namespaces

Signed-off-by: lxShaDoWxl <lxshadowxkingxl@gmail.com>

* tests(gitlab): remove old data and actualization test

Signed-off-by: lxShaDoWxl <lxshadowxkingxl@gmail.com>

* refactor(gitlab): added debug log

Signed-off-by: lxShaDoWxl <lxshadowxkingxl@gmail.com>
(cherry picked from commit 732806221b1c1633682fe1adad4cbcd3a4687d0b)

* lint(gitlab): fix import order

Signed-off-by: lxShaDoWxl <lxshadowxkingxl@gmail.com>

---------

Signed-off-by: lxShaDoWxl <lxshadowxkingxl@gmail.com>
2023-06-07 16:46:21 +08:00
stonezdj(Daojun Zhang)
51a4c937c6
(cherry-pick) Return error when proxy cache get too many request error(429) (#18751)
Return error when proxy cache get too many request error(429)

  Add 429 too many request error in http error
  Change e2e container for 2.7.x
  Fixes #18707

Signed-off-by: stonezdj <stonezdj@gmail.com>
2023-05-31 17:22:57 +08:00
Wang Yan
ca8bbadb58
set tag pull time for proxy cache (#18742)
fixes #18708

to set the pull time of tag for the first time cache the artifact.

Signed-off-by: Wang Yan <wangyan@vmware.com>
2023-05-29 09:42:02 +08:00
stonezdj(Daojun Zhang)
7a0f0eafed
(cherry-pick) Use subtle.ConstantTimeCompare instead of compare directly (#18711)
Use subtle.ConstantTimeCompare instead of compare directly

Signed-off-by: stonezdj <daojunz@vmware.com>
2023-05-23 21:02:38 +08:00
Yang Jiao
8bffb94ba8
[cherry-pick]Fix setup-gcloud fails when building package (#18684)
Fix setup-gcloud fails when building package

Fix #18681

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-05-16 17:28:11 +08:00
Chlins Zhang
2ee3c3e40d
fix: patch migration SQL by code (#18660)
Using code to patch the migration SQL instead of migration SQL file by
go-migrate, the latter way will bring the potential upgrade issue, refer
to code comments for more details.

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-05-16 15:08:34 +08:00
MinerYang
e54389f271
bump golang 1.19.9 on release-2.7.0 (#18650)
Signed-off-by: yminer <yminer@vmware.com>
2023-05-09 11:11:52 +08:00
Chlins Zhang
e180723bdc
[cherry-pick] fix: improve the performance of list artifacts (#18632)
fix: improve the performance of list artifacts

1. Change the query for listing tasks of scan which can use the db
   index.
2. Add the gin index for task.extra_attrs.report_uuids

Fixes: #18013

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-05-05 14:15:55 +08:00
MinerYang
a051373ee9
[cherry-pick]allow redis password safe special characters on release-2.7.0 (#18586)
allow redis password safe special characters

Signed-off-by: yminer <yminer@vmware.com>

string and None type conversion
2023-04-24 09:52:17 +08:00
Yang Jiao
369129ef66
Add Job Service Dashboard Workers testcase (#18582)
Fix #17949

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-04-23 21:13:36 +08:00
Yang Jiao
2ed1e4f2ea
[cherry-pick]Fix setup docker error (#18585)
Fix setup docker error

Fix this error[https://github.com/goharbor/harbor/actions/runs/4776991336/jobs/8492390908]

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-04-23 21:13:04 +08:00
Yang Jiao
35047cf71a
[cherry-pick]Add Job Service Dashboard Schedules testcase (#18556)
Add Job Service Dashboard Schedules testcase

Fix #17949

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-04-20 11:12:11 +08:00
Shengwen YU
c2c29fe98a
feat: update TRIVYVERSION=v0.40.0, TRIVYADAPTERVERSION=v0.30.11 (#18559)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-04-20 10:37:21 +08:00
Yang Jiao
efd47c00be
Bump up version to v2.7.2 (#18550)
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-04-19 15:57:18 +08:00
Shengwen YU
0d6633e7ce
feat: bump up TRIVYVERSION=v0.39.0, TRIVYADAPTERVERSION=v0.30.10 (#18547)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-04-19 08:55:08 +08:00
MinerYang
81caccd3f8
bump helm.sh/helm/v3 v3.11.3 on release-2.7.0 (#18548)
bump helm.sh/helm/v3 v3.11.3

Signed-off-by: yminer <yminer@vmware.com>
2023-04-18 19:17:48 +08:00
MinerYang
18323eb9ee
bump golang.org/x/net v0.9.0 on release-2.7.0 (#18544)
bump golang.org/x/net v0.9.0

Signed-off-by: yminer <yminer@vmware.com>
2023-04-18 14:14:02 +08:00
Chlins Zhang
de4cab1fb4
[cherry-pick] fix: fix error bitsize of jobservice reaper scan locks (#18494)
fix: fix error bitsize of jobservice reaper scan locks

Change the bitSize from 16 to 64 in the jobservice reaper, the 16 is too
small when the redis cursor over the max value of int16.

Fixes: #18486

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-04-11 14:21:18 +08:00
MinerYang
67e5a24ff8
bump golang 1.19.8 on release-2.7.0 (#18496)
Signed-off-by: yminer <yminer@vmware.com>

add GOFLAGS=-buildvcs=false
2023-04-10 10:47:07 +08:00
Chlins Zhang
df5f19f9cb
[cherry-pick] fix: correct the retention webhook payload (#18467)
fix: correct the retention webhook payload

Fix the incorrect number of total and retained in the retention webhook
payload, and completes the deleted_artifacts field.

Fixes: #18428

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-04-06 16:15:28 +08:00
Wang Yan
9d83365a3e
[cherry-pick]fix copy artifact issue (#18464)
fix copy artifact issue

To enable the middleware to save the project_blob data, make sure to set the accessories options to true when handling the artifact copy.

Signed-off-by: Wang Yan <wangyan@vmware.com>
2023-04-03 14:20:25 +08:00
Chlins Zhang
6216a1d1fe
[cherry-pick] fix: escape the event data for slack webhook payload (#18437)
fix: escape the event data for slack webhook payload

Escape the event data of slack webhook as original payload is invalid
when send to slack.

Fixes: #18423

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-03-30 09:58:18 +08:00
Chlins Zhang
f615e41c46
[cherry-pick] fix: fix the invalid jobid for scan data export (#18421)
fix: fix the invalid jobid for scan data export

Change the JobId param type from int to string, use int will bring some
problems for encode/decode type mismatch which generate the invalid
repository name.

Fixes: #18380

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-03-28 17:54:53 +08:00
Yang Jiao
bb64f734d3
[Cherry-pick]Add Job Service Dashboard Job Queues testcase (#18348)
Add Job Service Dashboard Job Queues testcase

Fix #17949

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-03-14 17:09:30 +08:00
Yang Jiao
6015b3efa7
[cherry-pick]Update DB Dockerfile.base (#18246)
Update DB Dockerfile.base

1. Update the path to postgresql.conf.sample as it has changed in postgresql 13.10
2. Remove creating symbolic link as it already exists in postgresql 13.10

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-02-20 15:52:13 +08:00
Yang Jiao
24c24418a2
Refresh the base images on release-2.7.0 (#18244)
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-02-20 12:15:59 +08:00
Yang Jiao
8330b468e4
[Cherry-pick]Add JobService Dashboard API test cases (#18235)
Add JobService Dashboard API test cases

Added test cases for the following APIs:
1. GET /jobservice/pools/{pool_id}/workers Get workers
2. PUT /jobservice/jobs/{job_id} Stop running jc
3. PUT /jobservice/queues/{job_type} stop and clean, pause, resume pending jobs in the queue
4. GET /jobservice/queues list job queues
5. GET /jobservice/pools Get worker pools
6. GET /schedules List schedules
7. GET /schedules/{job_type}/paused Get scheduler paused status

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-02-17 16:48:56 +08:00
Yang Jiao
ed69613b61
Bump up version to v2.7.1 (#18241)
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-02-17 15:38:13 +08:00
Yang Jiao
f93aa5cea4
[cherry-pick]Fix Setup Docker error in CI (#18238)
Fix Setup Docker error in CI

Remove the remove setup docker step in CI
Fix #18236

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-02-17 13:55:40 +08:00
Chlins Zhang
67ff82ff99
[cherry-pick] fix: resolve the oidc or ldap group user cannot export cve (#18227)
fix: resolve the oidc or ldap group user cannot export cve

Remove the project filter in the scan data export job as they have been
validated by API handler, fix the oidc or ldap group users cannot export
cve.

Fixes: #18112

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-02-16 10:37:57 +08:00
Shijun Sun
d5aeb9ebb3
[Cherry-pick]Display error message by defaul for event panel (#18229)
Display error message by defaul for event panel

Signed-off-by: AllForNothing <sshijun@vmware.com>
2023-02-16 10:30:03 +08:00
Shengwen YU
3e420956a3
[Cherry-pick] feat: bump-up trivyVersion to v0.37.2, trivyAdapterVersion to v0.30.7 (#18217) (#18220)
feat: bump-up trivyVersion to v0.37.2, trivyAdapterVersion to v0.30.7 (#18217)

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-02-15 10:19:22 +08:00
Chlins Zhang
41c9cc8f90
[cherry-pick] fix: update the replication API handler (#18213)
fix: update the replication API handler

1. Check execution before stop replication execution.
2. Check execution before list replication tasks.

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-02-14 13:11:10 +08:00
Shengwen YU
dc6681e636
[Cherry-pick] fix: reset user password (#18206)
fix: reset user password

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-02-14 09:28:02 +08:00
Shijun Sun
7f0bd60a8b
[Cherry-pick]Support searching artifacts by specified tag name (#18176)
Support searching artifacts by specified tag name
  1.Fixes #18082
  2.Update CSS

Signed-off-by: AllForNothing <sshijun@vmware.com>
2023-02-08 12:02:47 +08:00
Shijun Sun
dc931cfd2c
[Cherry-pick]Correct total count for schedule list datagrid (#18149)
Correct total count for schedule list datagrid
  1.Fixes #18120

Signed-off-by: AllForNothing <sshijun@vmware.com>
2023-02-08 10:56:10 +08:00
Shengwen YU
24f58f70d6
[Cherry-pick] fix retention/immutable API issue (#18158) (#18177)
fix retention/immutable API issue (#18158)

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-02-06 17:28:07 +08:00
Shijun Sun
ab5c594363
[2.7]Update CI for UI UT (#18166)
Update CI for UI UT
  1.Specify Chrome version for UI UT

Signed-off-by: AllForNothing <sshijun@vmware.com>
2023-02-03 17:20:43 +08:00
Chlins Zhang
771373cedf
fix: remove the scan exports volume (#18109)
1. Change the Export CVE temporary file directory to /tmp.
2. Remove the scan data export volume in Dockerfile and docker-compose
   yaml.

Fixes: #18067

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-01-31 11:32:29 +08:00