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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>