actions / actions/runner

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

Open
#4,124 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

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'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the config.sh --labels entry point and the CommandLineParser log output shown in the report. Trace how comma-separated labels are accepted, then verify that values containing spaces or other non-label characters produce a clear warning both on the console and in the runner log, including any reported size-limit case.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.