Add admin page for batched background migrations
What does this MR do?
Adds a page in the admin section to show the current progress of batched background migrations
Queries
Query for successful rows per migration
SELECT "batched_background_migration_jobs"."batched_background_migration_id", SUM(batch_size) AS successful_rows
FROM "batched_background_migration_jobs"
WHERE "batched_background_migration_jobs"."status" = 3 AND
"batched_background_migration_jobs"."batched_background_migration_id" IN (1, 2, 3)
GROUP BY "batched_background_migration_jobs"."batched_background_migration_id"
Time: 48.262 ms
- planning: 0.994 ms
- execution: 47.268 ms
- I/O read: 41.324 ms
- I/O write: N/A
Shared buffers:
- hits: 30 (~240.00 KiB) from the buffer pool
- reads: 200 (~1.60 MiB) from the OS file cache, including disk I/O
- dirtied: 0
- writes: 0
Aggregate (cost=0.29..1050.01 rows=7 width=16) (actual time=43.069..47.182 rows=3 loops=1)
Group Key: batched_background_migration_jobs.batched_background_migration_id
Buffers: shared hit=30 read=200
I/O Timings: read=41.324
-> Index Scan using index_batched_jobs_on_batched_migration_id_and_status on public.batched_background_migration_jobs (cost=0.29..1003.58 rows=9271 width=12) (actual time=7.929..45.370 rows=9248 loops=1)
Index Cond: ((batched_background_migration_jobs.batched_background_migration_id = ANY ('{1,2,3}'::bigint[])) AND (batched_background_migration_jobs.status = 3))
Buffers: shared hit=30 read=200
I/O Timings: read=41.324
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #326760 (closed)
Edited by Heinrich Lee Yu