Skip to content

config.sh --labels should sanity-check its value and print+log a warning #4124

@timbaverstock-bmbl

Description

@timbaverstock-bmbl

Describe the bug

The --labels option should do basic sanity checking: warning very strongly if presented with a value containing spaces and/or other non-label characters.

Otherwise someone else might accidentally feed it a space-separated list of labels and wonder why it registers but never picks up jobs.

To Reproduce
Steps to reproduce the behavior:

  1. ./config.sh ... --labels "full_build staging"
  2. ./run.sh
  3. Runner registers and looks fine with a label of "full_build staging"
  4. Runner fails to pick up jobs with both "full_build" and "staging" labels.

Expected behavior

Runner should print and log a clear warning:

"WARNING: non-label characters detected in comma-separated label list: only (whatever) are permitted."

Personally I'd prefer that it abort too, but a warning is safer for backwards compatibility.

Probably should warn about labels exceeding any size limit, too.

Runner Version and Platform

actions-runner-linux-arm64-2.329.0

What's not working?

My runner did not pick up its jobs, despite registering successfully because --labels silently accepted spaces.

It should warn very clearly about any non-label characters, especially spaces.

Job Log Output

Requested labels: iat-951-app-android-2-19472959613-6, iat-951-keep-alive
Job defined at: [xxx]/.github/workflows/build.yaml@refs/heads/IAT-951-ec2-runner
Waiting for a runner to pick up this job...

Runner and Worker's Diagnostic Logs

[2025-11-19 12:36:24Z INFO CommandLineParser] Adding option 'labels': 'ip_34_224_102_123 ec2_i-0a55b0f8bc2378d60 host-iat-951 iat-951-app-android-2-19472959613-6 iat-951-keep-alive'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions