Skip to content

Create p_ci_runner_failed_builds partitioned table

What does this MR do and why?

MR Description
!129972 (closed) you are here Create p_ci_runner_failed_builds partitioned table
!130174 (closed) Populate p_ci_runner_failed_builds table with failed builds
!130203 (closed) Clean up stale runner failed build records
omnibus-gitlab!7113 (closed) Add cronjob to clean up stale runner failed bui... (omnibus-gitlab!7113 - closed)
gitlab-org/charts/gitlab!3361 (closed) Add cronjob to clean up stale runner failed bui... (gitlab-org/charts/gitlab!3361 - closed)

This MRs introduces the EE-only p_ci_runner_failed_builds partitioned table, according to the Add new tables to the CI database documentation. It is meant to contain any builds that have failed due to a runner system failure (ci_builds.failure_reason = 4). These builds represent a small fraction of existing builds in prod.

This will be needed to build a dashboard to list out the latest instance-wide runner system failures without overloading the database with queries to ci_builds. The actual feature will be built progressively under a feature flag in follow-up MRs.

In order to do this, I've needed to add support for EE-only partitioned CI models (added as a preliminary commit).

Changelog: added EE: true

Part of #421889 (closed)

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.

Edited by Pedro Pombeiro

Merge request reports