Commit Graph

11563 Commits

Author SHA1 Message Date
Yang Jiao 8693b25ab1
Refresh base images on release-2.7.0 (#19644)
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-11-29 03:00:04 +00:00
Shengwen YU 005e99316f
fix: upgrade github.com/gorilla/mux/otelmux to v0.44.0 (#19620)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-11-27 11:17:33 +08:00
Shengwen YU c07f5ce9b0
fix: upgrade dependency library version and run "go mod vendor" (#19613)
fix: upgrade dependency library and run "go mod vendor"

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-11-24 16:19:33 +08:00
Shengwen YU 05a1202b38
fix: bump TRIVYVERSION=v0.46.1 & TRIVYADAPTERVERSION=v0.30.18 (#19607)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-11-24 16:01:25 +08:00
Shengwen YU d0a5032b84
feat: bump up golang-runtime from 1.19.3 to 1.21.4; upgrade MOCKERY_VERSION; upgrade golangci-lint; fix mock issue (#19608)
feat: upgrade golang-runtime from 1.19.3 to 1.21.4; upgrade golangci-lint version to v1.51.2; upgrade MOCKERY_VERSION to v2.22.1; fix mock issue

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-11-24 15:11:45 +08:00
Yang Jiao ad94f9378f
Bump up version to v2.7.4 (#19604)
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-11-22 12:48:12 +08:00
Shengwen YU 252a0b7c97
fix: bump up TRIVYVERSION=v0.45.0 && TRIVYADAPTERVERSION=v0.30.16 (#19329)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2023-09-08 10:45:35 +08:00
MinerYang c91e950ff3
bump goharbor/golang 1.19.13 on release-2.7.0 (#19324)
bump golang 1.19.13 on release-2.7.0

Signed-off-by: yminer <yminer@vmware.com>
2023-09-08 00:21:57 +08:00
Yang Jiao 3d6c70669f
Bump up version to v2.7.3 (#19314)
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-09-06 15:27:08 +08:00
stonezdj(Daojun Zhang) 4d1695c20a
(cherry-pick) Remove job status track information from redis after stop the job in the queue (#19306)
Remove job status track information from redis after stop the job in the queue

  After stop in the queue:
  Remove key in {harbor_job_service_namespace}:job_track:inprogress
  Remove {harbor_job_service_namespace}:job_stats:<job_id>
  fixes #19211

Signed-off-by: stonezdj <daojunz@vmware.com>
2023-09-06 03:29:57 +00:00
Shijun Sun d69572d51a
[Cherry-pick]Add new uri path to ShouldNotReuseRoute array (#19220)
Add new uri path to ShouldNotReuseRoute array
1.Fixes #19216

Signed-off-by: AllForNothing <sshijun@vmware.com>
2023-08-21 18:55:06 +08:00
Chlins Zhang a324b2dd20
[cherry-pick] fix: support customize cache db for business (#19189)
fix: support customize cache db for business

Support to configure the customized redis db for cache layer and other
misc business for core, by default the behavior is same with
previous(stored in db 0).

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-08-17 08:38:37 +08:00
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