isAlpine detection fails on quoted ID value in /etc/os-release
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker, kubernetes, linux, typescript
- Domain
- ci-cd
Research direction
The failing check is the shell command [ $(cat /etc/*release* | grep -i -e "^ID=*alpine*" -c) != 0 ] that the log shows running from /home/runner/k8s/index.js; find where that string is built in the TypeScript source. Make the grep pattern accept an optional quote around the ID value, then confirm it matches both ID=alpine and ID="alpine" from the two /etc/os-release outputs in the issue. Done when isAlpine resolves to true for the quoted DHI image and nothing else changes.
Written by the indexing model from the issue text.
Description
The DHI team has recently introduced changes to the /etc/os-release file which impacts isAlpine detection on GHA runners.
The breaking change introduced is they double-quote the ID field used by the runner-container-hooks script.
The runner hooks script should be updated to take into account quoted ID values too in order for the isAlpine process to be more resilient.
Run '/home/runner/k8s/index.js'
Alpine DHI result with quoted ID value:
##[debug]Job pod is ready for traffic
##[debug]{"message":"command terminated with non-zero exit code: error executing command [sh -c [ $(cat /etc/*release* | grep -i -e \"^ID=*alpine*\" -c) != 0 ] || exit 1], exit code 1","details":{"causes":[{"reason":"ExitCode","message":"1"}]}}
##[debug]Setting isAlpine to false
##[debug]Finishing: Initialize containers
WORKS
❯ docker container run --rm -it alpine:3.24 sh -c 'cat /etc/os-release' | grep ID
ID=alpine
VERSION_ID=3.24.2
FAILS
❯ docker container run --rm dhi.io/alpine-base:3.24-alpine3.24-dev sh -c 'cat /etc/os-release' | grep ID
ID="alpine"
VERSION_ID="3.24"
- Dominant language
- TypeScript
- Stars
- 155
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from actions/runner-container-hooks
-
Pod template `imagePullSecrets` silently overwrites `container.credentials` — should union the listsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Surface pod Events (FailedScheduling, etc.) on waitForPodPhases timeoutPossibly taken @remidebette claimed this 133 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
actions/runner-container-hooks#366 · 3 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
All issues in actions/runner-container-hooks
Similar issues
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitPossibly taken @myOmikron claimed this today. Openbug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
platform:windows tool triaged wontfix
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
nicolettas-muggelbude/RechnungsFee#448 ·
Maintainers usually reply within 1 day
-
Android bug feature/error-tracking react-native team/error-tracking
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PostHog/posthog-js#5310 · 1 comment ·
Maintainers usually reply within 1 day