Skip to content

Add job metadata labels to runner pods when a job is assigned #4485

Open

Description

@arjunmadan-toast

What would you like added?

When using ARC at the org level, there's no way to attribute runner pod costs to the specific repository or workflow that triggered the job. The EphemeralRunner status already receives job info (repository name, display name, workflow run ID) from the listener when a job is assigned, but this information is never propagated to the pod.

Proposal: Patch pod labels/annotations with job metadata when the controller reconciles an EphemeralRunner that has been assigned a job:

  • actions.github.com/job-repository (label, sanitized)
  • actions.github.com/job-display-name (label, sanitized)
  • actions.github.com/job-repository-name (annotation, full value)
  • actions.github.com/workflow-run-id (annotation)

Changes required:

  • EphemeralRunner controller patches pod labels/annotations when job info is present on the status
  • Scale set manager role needs patch verb on pods
  • Label values are sanitized to meet K8s validation (63 chars, alphanumeric start/end)

Why is this needed?

This enables cost attribution via pod labels without requiring changes to individual workflows. It also allows us to only modify permissions on the listener pods, ensuring the actual runner pods don't have permissions to mutate pod configuration.

Activity

  1. github-actions commented on May 5, 2026

    @github-actions
    Contributor

    Hello! Thank you for filing an issue.

    The maintainers will triage your issue shortly.

    In the meantime, please take a look at the troubleshooting guide for bug reports.

    If this is a feature request, please review our contribution guidelines.

  2. ntno commented on May 21, 2026

    @ntno

    hello github team
    i manage enterprise runners using ARC and this feature would greatly help my team to get visibility into our users' usage patterns. we are interested in organization, repository, workflow file, and job name labels.
    thank you!

  3. hnnynh commented on Jun 5, 2026

    @hnnynh

    We've been thinking about this as well, and it would be very helpful for our ARC metrics and cost attribution use cases.

    We've been considering how to implement this through custom configuration, so it would be great if this were supported as a built-in feature. It would also be useful if repository-related data were available in metadata, not only in status, so it can be used more easily for Kubernetes-level observability and attribution.
    It would be good to add custom label that gets data from job status. (It's just an idea.)

    Hope to see this feature available soon.

  4. jordan-da commented on Jul 23, 2026

    @jordan-da

    It would be extremely useful if we could associate run id to resource usage. Right now it isn't easy determine how much a workflow needs when it runs, making it really hard to tune. You basically have to create a whole other runner with its own name just for this purpose, but that doesn't help for ongoing tuning.

  5. hnnynh commented on Jul 24, 2026

    @hnnynh

    For now we just wrote a little exporter that watches EphemeralRunner objects and exposes the job info (repo, job, etc.) that's already on the status as per-pod metrics. I'd love to see it supported natively. +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    communityCommunity contributionenhancementNew feature or requestneeds triageRequires review from the maintainers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions