Replace deprecated quarantine tracking with ClickHouse-based reports
Context
Closes #1720
Depends on gitlab-org/ruby/gems/gitlab-triage!366 (merged) (merged and released in gitlab-triage 1.48.0)
ClickHouse is now the SSOT for quarantined tests. The old approach of tracking quarantine issues via GitLab labels is deprecated and incomplete.
What's in this MR?
Removes deprecated quarantine tracking:
-
quarantined_broken_specs_summaryandquarantined_flaky_specs_summarymethods -
flaky_tests_heatmapfrom all team summary reports (uses deprecated quarantine label data) - Related conditions from policy templates
Adds ClickHouse-based quarantine reporting:
- New
quarantined_tests(group_key:)helper inlib/quarantine_helper_context.rb - Uses
ClickhouseQuarantineHelperto fetch data directly from ClickHouse - Data comes with accurate, real-time information
- Includes links to quarantine issues and Grafana dashboards
- Appears as custom type summary in team reports
Security cleanup:
- Remove
.envfile from repository (should never be committed) -
.env.exampleremains as template for local configuration - Updated
config/boot.rbto safely load.envin local development only (never in CI or production)
Dependencies:
- Upgraded to gitlab-triage 1.48.0 (required for custom type summary support)
Proof of work
Local testing instructions
Prerequisites:
- ClickHouse credentials (get from 1Password or CI variables)
- gitlab-triage 1.48.0 or higher
Setup:
# 1. Copy the example file
cp .env.example .env
# 2. Edit .env and fill in your ClickHouse credentials:
# CLICKHOUSE_URL=https://your-clickhouse-url
# CLICKHOUSE_DATABASE=test_metrics
# CLICKHOUSE_USERNAME=your_username
# CLICKHOUSE_PASSWORD=your_password
# 3. Verify gitlab-triage version
bundle exec gitlab-triage --version
# Should show: 1.48.0
Run dry-run for a team:
bundle exec gitlab-triage --dry-run \
-r ./plugins/all \
--token $GITLAB_API_PRIVATE_TOKEN \
--source-id gitlab-org/gitlab \
--policies-file policies/generated/team-summary.yml.erb/pipeline_execution.yml
Expected output: The quarantine section should show data fetched from ClickHouse (e.g., "59 quarantined tests").
CI dry-run output
Job: https://gitlab.com/gitlab-org/quality/triage-ops/-/jobs/13019125376
Result: Successfully fetched 59 quarantined tests from ClickHouse
See triage report
Quarantined tests
59 quarantined tests - View dashboard
View quarantined tests
Important: We started to import quarantine data in ClickHouse on 2026-01-08 for E2E tests, and on 2026-01-19 for non-E2E tests. Quarantined Since will not go further than that date.
Related
- gitlab-org/ruby/gems/gitlab-triage!366 (merged) - Adds custom type summary support (merged, released in 1.48.0)