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: update stopped execution status immediately instead of async update
Update the stopped execution status immediately becasue the user
experience is not good if wait long time when stop or reschedule a job.
Fixes: #18526
Signed-off-by: chlins <chenyuzh@vmware.com>
fix: clean the redis if the execution is not found
Delete the execution outdated status key in the redis when the execution
is not found.
Fixes: #18511
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>
Update UI testcases
1. Update copy test case to add retries
2. Updata P2P Preheat test case to waiting
3. Update the Replication new rule button xpath
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
Refactor the logic for updating the status of execution when receiving
the hook from jobservice, avoid the optimistic lock due to the multiple
tasks update one execution by refreshing the status asynchronously. But
still retain the old way by specifying the flag from ENV.
Fixes: #17584
Signed-off-by: chlins <chenyuzh@vmware.com>
Wrap orm tx when the scheduler try to create the task because submit job
maybe failure depends on the jobservice.
Fixes: #18452
Signed-off-by: chlins <chenyuzh@vmware.com>
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>
1. extend the width for event type label
2. add quotes for Retain image last pull time to make it more understandable
Signed-off-by: AllForNothing <sshijun@vmware.com>
1. Change the the value of CloudEvents id from requestid to uuid
2. Add additional requestid to trace to event
Fixes: #18448
Signed-off-by: chlins <chenyuzh@vmware.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
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>
1. Add migration SQL to handle the lost payload format for old policies.
2. Set payload format to 'Default' if not specified for http webhook in the API handler.
3. Fix the migration sql of notification_job
Fixes: #18401, #18453
Signed-off-by: chlins <chenyuzh@vmware.com>
1. Show a app level warning if there is a stuck job
2. Chang `Replication finished` to `Replication status changed`
Signed-off-by: AllForNothing <sshijun@vmware.com>
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>
1, add fitler artifactType to header when the api is called with filter
2, give an empty json body on non aritfact scenario
3, give an empty array on non accessory scenario
4, fix the artifact type filter issue
Signed-off-by: Wang Yan <wangyan@vmware.com>