Skip to content

Fix duplicated size metrics in Datadog - #21646

Merged
lucia-sb merged 1 commit into
masterfrom
lucia-sb/fix-send-metrics
Oct 14, 2025
Merged

Fix duplicated size metrics in Datadog#21646
lucia-sb merged 1 commit into
masterfrom
lucia-sb/fix-send-metrics

Conversation

@lucia-sb

@lucia-sb lucia-sb commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

Updates the measure_disk_size workflow to determine the branch from github.event.workflow_run.head_branch instead of github.ref.

Motivation

Metrics were being duplicated in Datadog because all workflow runs were reported under master.
This happened because github.ref refers to the branch where the workflow itself runs — and for workflow_run triggers, that’s always master. By switching to github.event.workflow_run.head_branch, the workflow now correctly compares the branch that actually triggered the run, avoiding duplicated metrics.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@lucia-sb
lucia-sb requested a review from a team as a code owner October 14, 2025 09:47
@lucia-sb lucia-sb added the qa/skip-qa Automatically skip this PR for the next QA label Oct 14, 2025

@AAraKKe AAraKKe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice catch!! Thanks a lot. Lets get it merged and see if that was the issue.

@AAraKKe AAraKKe self-assigned this Oct 14, 2025
@lucia-sb
lucia-sb added this pull request to the merge queue Oct 14, 2025
Merged via the queue into master with commit 0e6c337 Oct 14, 2025
40 of 41 checks passed
@lucia-sb
lucia-sb deleted the lucia-sb/fix-send-metrics branch October 14, 2025 10:18
@dkirov-dd dkirov-dd mentioned this pull request Oct 17, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants