BUILD-11470 Use snake_case keys in cache JSON metrics#289
Conversation
Update jq field references to match the renamed CacheMetricsRecord fields (cache_hit, restore_key_hit, size_bytes_*, timestamp_*). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Code Review ✅ ApprovedRenames jq field references in the job-completed script to snake_case to align with the updated CacheMetricsRecord schema. 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 |
There was a problem hiding this comment.
Pull request overview
Updates the CI metrics runner hook to read cache metrics JSON using the new snake_case field names, aligning the summary rendering with the updated gh-action_cache CacheMetricsRecord schema (BUILD-11470).
Changes:
- Switches jq field accesses from kebab-case to snake_case for cache metrics (
cache_hit,restore_key_hit,size_bytes_restored,size_bytes_at_end).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



Summary
ci-metrics/job-completed.shto snake_case to match the updatedCacheMetricsRecordschema fromgh-action_cache(BUILD-11470)cache-hit→cache_hit,restore-key-hit→restore_key_hit,size-bytes-restored→size_bytes_restored,size-bytes-at-end→size_bytes_at_endThe file is aligned with the source in https://github.com/SonarSource/github-runners-infra/pull/417
https://github.com/SonarSource/github-runners-infra/blob/8d793a9623327bac9b363dd0d5d8e47d8e17230d/infra/applications/github-runners/hooks/job-completed.sh
Related PRs
Part of BUILD-11470 — three-repo change:
gh-action_cache— interface + source (pending)github-runners-infra— hook + fixtures (pending)ci-metrics/Test plan
$GITHUB_STEP_SUMMARYon a real run