Resolve "Track failed batched jobs metric"
requested to merge 416718-service-ping-integration-with-batched-background-migrations-track-failed-jobs-2 into master
What does this MR do and why?
We had to deprecate the old metric because of a query not supported by the Snowflake platform. More info here: https://gitlab.com/gitlab-data/analytics/-/issues/18216
In this merge request, we add the batched_background_migration_count_failed_jobs_metric
back with the query fixed. This time, we are only doing one count.
Query:
SELECT "batched_background_migrations"."table_name", "batched_background_migrations"."job_class_name", COUNT(batched_jobs) AS number_of_failed_jobs
FROM "batched_background_migrations"
INNER JOIN "batched_background_migration_jobs" "batched_jobs" ON "batched_jobs"."batched_background_migration_id" = "batched_background_migrations"."id"
WHERE "batched_jobs"."status" = 2
GROUP BY "batched_background_migrations"."table_name", "batched_background_migrations"."job_class_name"
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #416718 (closed)
Edited by Vasilii Iakliushin