BUILD-11444 Replace decision file gate with CI_METRICS_ENABLED env var#286
BUILD-11444 Replace decision file gate with CI_METRICS_ENABLED env var#286julien-carsique-sonarsource wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the CI metrics post-job hook (ci-metrics/job-completed.sh) to use a single feature-flag source of truth: the CI_METRICS_ENABLED environment variable (written via $GITHUB_ENV by the pre-job hook), replacing the previous presence-only gate file check under ${CI_METRICS_DIR}/enabled. This reduces the risk of stale gate files on persistent runners and removes the dual-source-of-truth behavior.
Changes:
- Remove the
${CI_METRICS_DIR}/enabledfile presence gate. - Gate metrics collection on
CI_METRICS_ENABLED == "true"and improve skip logging with the observed value.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
141899f to
ce27b2b
Compare
The post-job completion hook no longer checks for the presence of
${CI_METRICS_DIR}/enabled. It now reads $CI_METRICS_ENABLED which is
written to $GITHUB_ENV by the pre-job hook (job-started.sh).
Companion changes in github-runners-infra, ci-ami-images, and gh-action_cache.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ce27b2b to
6670636
Compare
Code Review ✅ ApprovedReplaces the decision file gate with the CI_METRICS_ENABLED environment variable to align with the infrastructure source of truth. No issues found. OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Keep
ci-metrics/job-completed.shin sync with the source of truth in github-runners-infra PR #416.Merge order
Deploy after SonarSource/github-runners-infra#416 and SonarSource/ci-ami-images#384 are deployed to prod runners.