Skip to content

Fix bg migration and requeue backfill migration for remediations

Subashis Chakraborty requested to merge 429361-requeue-backfill into master

This MR introduces a post-deployment migration to reschedule a background job to backfill remediations in vulnerability_reads table.

Output of the post-deployment migration

bundle exec rake db:migrate:up:main VERSION=20231031204841

main: == [advisory_lock_connection] object_id: 181720, pg_backend_pid: 21434
main: == 20231031204841 RequeueBackfillHasRemediationsOfVulnerabilityReads: migrating 
main: == 20231031204841 RequeueBackfillHasRemediationsOfVulnerabilityReads: migrated (0.0255s) 
main: == [advisory_lock_connection] object_id: 181720, pg_backend_pid: 21434

bundle exec rake db:migrate:down:main VERSION=20231031204841

main: == [advisory_lock_connection] object_id: 181740, pg_backend_pid: 24303
main: == 20231031204841 RequeueBackfillHasRemediationsOfVulnerabilityReads: reverting 
main: == 20231031204841 RequeueBackfillHasRemediationsOfVulnerabilityReads: reverted (0.0343s) 
main: == [advisory_lock_connection] object_id: 181740, pg_backend_pid: 24303
Update query used in background migration

Covered already in the original MR !133714 (merged) https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/23061/commands/74278 (copied from the original MR)

Related to #429361 (closed)

Edited by Subashis Chakraborty

Merge request reports

Loading