Repository navigation
fix(image): restore login-shell PATH and SHELL for GARM runner jobs - #246
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The implementation matches the stated goal and includes integration checks across the supported image matrix.
0 open findings
What changed in this PR
Restores the expected login environment for GARM runner jobs.
Changes:
- Adds the user-local binary directory to the PAM-provided
PATH. - Sets the runner account’s shell to Bash.
- Adds integration coverage, changelog entry, and patch version bump.
| File | Description |
|---|---|
docs/changelog.md |
Documents the environment fix. |
app/tests/unit/test_openstack_builder.py |
Updates rendered cloud-init expectations. |
app/tests/integration/commands.py |
Verifies runner PATH and SHELL. |
app/src/github_runner_image_builder/templates/cloud-init.sh.j2 |
Configures the environment and runner shell. |
app/pyproject.toml |
Bumps the application version to 0.14.4. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
cbartz
marked this pull request as ready for review
October 9, 2026 12:46
cbartz
requested review from
javierdelapuente,
yanksyoon and
yhaliaw
as code owners
October 9, 2026 12:46
florentianayuwono
approved these changes
Oct 9, 2026
Collaborator
Author
|
force merging - application integration test pass . there is one charm integration test failing due to a garm runner picking it up (chicken-egg problem), but the pr does not really touch charm code so I don't anticipate issues there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applicable spec: N/A
Overview
Jobs started by the GARM agent now get
/home/ubuntu/.local/binonPATH(through/etc/environment) andSHELL=/bin/bash(therunneraccount's login shell), matching the previous runner manager.Rationale
#245 runs the agent in a PAM session, but a PAM session doesn't run a login shell, so
~/.profilenever adds~/.local/bin. Tools installed withpipxorpip install --userthen fail withcommand not foundin later steps.pam_envreadsPATHfrom/etc/environment, which is also where GitHub-hosted runners put it. Therunneralias account was created with useradd's default/bin/shshell, while legacy and GitHub-hosted runners have/bin/bash.An environment comparison of legacy, GARM and GitHub-hosted runners also found
umaskandXDG_DATA_DIRSdifferences. They're left unchanged on purpose:0022matches GitHub-hosted runners, andXDG_DATA_DIRSonly matters to desktop apps.Juju Events Changes
None.
Module Changes
cloud-init.sh.j2configure_system_users: prepends~/.local/bintoPATHin/etc/environmentand gives therunneraccount/bin/bash. The new integration checks usesystemd-runwithUser=runnerandPAMName=su-lto reproduce the job environment.Library Changes
None.
Checklist
urgent,trivial,senior-review-required,documentation)app/pyproject.tomlAI-generated message.