Skip to content

RUNNER_LABELS contains trailing ',' if runner_extra_labels is not set #1961

Closed

Description

@lmeynberg

If you not set any extra labels with runner_extra_labels, because the default ones "self-hosted,${var.runner_os},${var.runner_architecture} would be good enough, you cannot use runner_enable_workflow_job_labels_check as this prevent scaling of any runners:

 Received workflow job event with labels: '["self-hosted","linux","arm64"]'. The event does NOT match the runner labels: 'self-hosted,linux,x64,'

A dummy label in runner_extra_labels would be a workaround but then one must update any runs-on: [self-hosted, linux, x64] to runs-on: [self-hosted, linux, x64, dummy] as long as https://github.com/philips-labs/terraform-aws-github-runner/issues/1714 is unsolved.

Maybe runner_labels could be a added as variable of the main module with "self-hosted,${var.runner_os},${var.runner_architecture} as default value. So it can be overridden completely of needed. Then runner_extra_labels is not needed anymore.

Activity

  1. shashidhar087 commented on Apr 25, 2022

    @shashidhar087
    Contributor

    We need runner_extra_labels as we have multiple runner types based on Linux OS. We use custom labels to assign the workflow job to one particular runner type.

  2. ScottGuymer commented on May 8, 2022

    @ScottGuymer
    Contributor

    The labels self-hosted,OS,ARCH are automatically added by the agent when registering the runner to GH.

    I think you are correct in that this is related to #1714 and the label matching logic needs some work and this particular use case needs to be added into the tests.

  3. added
    bug
    on May 8, 2022
  4. github-actions commented on Jun 8, 2022

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs. Thank you for your contributions.

  5. jonohill commented on Jun 21, 2022

    @jonohill
    Contributor

    This is still an issue. If runner_extra_labels is empty then it should not be appended to the list of labels.

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

    Staleabandonedbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions