Skip to content

Add job_workflow_ref label to listener metrics #4054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 5, 2025

Conversation

rskmm0chang
Copy link
Contributor

fix: #4053

Signed-off-by: rskmm0chang <rskmm0chang@hatena.ne.jp>
@Copilot Copilot AI review requested due to automatic review settings April 22, 2025 09:13
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new label for job workflow references to the listener metrics to address issue #4053 by extending the metric dimensions.

  • Added a constant for "job_workflow_ref".
  • Updated the exporter to include the job_workflow_ref from jobBase.
Comments suppressed due to low confidence (1)

cmd/ghalistener/metrics/metrics.go:83

  • Consider adding test coverage to validate that the job_workflow_ref label is correctly mapped in the metrics exporter.
labelKeyJobWorkflowRef: jobBase.JobWorkflowRef,

rskmm0chang and others added 2 commits April 23, 2025 12:08
Signed-off-by: rskmm0chang <rskmm0chang@hatena.ne.jp>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@rskmm0chang
Copy link
Contributor Author

@nikola-jokic

Hi, thank you always for your great maintenance work.
Regarding the job_workflow_ref label that was removed in v0.11.0, we actively use it in our operations for ARC.
I've created a pull request for this. Please let me know if there are any considerations I've missed or if you have any comments.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@nikola-jokic
Copy link
Contributor

Hey @rskmm0chang,

Thank you for your kind words! Can you please add the configurable part as well, including these metrics in values.yaml?

@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label May 15, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@rskmm0chang
Copy link
Contributor Author

@nikola-jokic

Thank you for your comment.
I added it at https://github.com/actions/actions-runner-controller/pull/4054/files#diff-dc582b4dc873f100695b98727c859d0c547ea228b6f09f206857f5c5d64dd8a9. Are there any other places where this is required?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@nikola-jokic
Copy link
Contributor

Hey @rskmm0chang,

It seems to me that gha_started_jobs_total and gha_completed_jobs_total also used to have the the job_workflow_ref label, so could you please include it in the values.yaml?

@nikola-jokic nikola-jokic self-assigned this Jun 4, 2025
rskmm0chang and others added 2 commits June 5, 2025 08:29

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: rskmm0chang <rskmm0chang@hatena.ne.jp>
@rskmm0chang
Copy link
Contributor Author

@nikola-jokic

Hi, thank you for your comments!

I updated values.yaml at 4159865

Copy link
Contributor

@nikola-jokic nikola-jokic left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for your contribution!

@nikola-jokic nikola-jokic merged commit 97697e8 into actions:master Jun 5, 2025
20 of 21 checks passed
@pedrolarios
Copy link

pedrolarios commented Jun 6, 2025

Hi @nikola-jokic, do I need to update my helm release to get the fix?

@nikola-jokic
Copy link
Contributor

Hey @pedrolarios,

You need to wait for the next release, which is coming up next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gha-runner-scale-set Related to the gha-runner-scale-set mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request to restore label job_workflow_ref
3 participants