Skip to content

BUILD-11470 Use snake_case keys in cache JSON metrics#289

Merged
julien-carsique-sonarsource merged 1 commit into
masterfrom
feat/jcarsique/BUILD-11470-snakeCase
Jun 8, 2026
Merged

BUILD-11470 Use snake_case keys in cache JSON metrics#289
julien-carsique-sonarsource merged 1 commit into
masterfrom
feat/jcarsique/BUILD-11470-snakeCase

Conversation

@julien-carsique-sonarsource

@julien-carsique-sonarsource julien-carsique-sonarsource commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Renames kebab-case jq field references in ci-metrics/job-completed.sh to snake_case to match the updated CacheMetricsRecord schema from gh-action_cache (BUILD-11470)
  • Fields renamed: cache-hitcache_hit, restore-key-hitrestore_key_hit, size-bytes-restoredsize_bytes_restored, size-bytes-at-endsize_bytes_at_end

The 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)
  • This PR — copy of the hook in ci-metrics/

Test plan

  • Pre-commit hooks passed (ShellCheck)
  • Verify cache section renders correctly in $GITHUB_STEP_SUMMARY on a real run

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>
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Jun 8, 2026

Copy link
Copy Markdown

BUILD-11470

@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

@gitar-bot

gitar-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Renames jq field references in the job-completed script to snake_case to align with the updated CacheMetricsRecord schema. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread ci-metrics/job-completed.sh
@julien-carsique-sonarsource julien-carsique-sonarsource merged commit 7a5c607 into master Jun 8, 2026
24 checks passed
@julien-carsique-sonarsource julien-carsique-sonarsource deleted the feat/jcarsique/BUILD-11470-snakeCase branch June 8, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants