fix: inputs containing '-' don't function in LXC executor #1336

Merged
mfenniak merged 1 commit from mfenniak/forgejo-runner:fix-lxc-hyphen into main 2026-01-26 01:30:49 +00:00
Owner

Due to a dependency update failure in #1331, I was able to identify that #1287 introduced a regression in handling inputs that contain hyphens (-) in them. With actions that are executed as using: node20 (and similar), inputs are provided as environment variables, such as INPUT_KEEP-STATE for an input keep-state.

As part of replacing lxc-enter with nsenter, a small shell script with /bin/sh was used to change the current process's cgroup to .lxc, matching the lxc-enter behaviour. Experimentally, /bin/sh was found to strip out the INPUT_KEEP-STATE environment variable. This fix replaces /bin/sh with /usr/bin/bash. Note that pathing does not need to be dynamic (eg. no need to do /usr/bin/env bash) because the LXC environment supports Debian Bookworm & Trixie only at this time.

I've verified that I can reproduce the error identified in #1331 and that this fix continues past that error in release testing simulation.

The regression in behaviour is present in runner v12.6.0 & v12.6.1.

  • bug fixes
    • PR: fix: inputs containing '-' don't function in LXC executor
Due to a dependency update failure in #1331, I was able to identify that #1287 introduced a regression in handling inputs that contain hyphens (`-`) in them. With actions that are executed as `using: node20` (and similar), inputs are provided as environment variables, such as `INPUT_KEEP-STATE` for an input `keep-state`. As part of replacing `lxc-enter` with `nsenter`, a small shell script with `/bin/sh` was used to change the current process's cgroup to `.lxc`, matching the `lxc-enter` behaviour. Experimentally, `/bin/sh` was found to strip out the `INPUT_KEEP-STATE` environment variable. This fix replaces `/bin/sh` with `/usr/bin/bash`. Note that pathing does not need to be dynamic (eg. no need to do `/usr/bin/env bash`) because the LXC environment supports Debian Bookworm & Trixie only at this time. I've verified that I can reproduce the error identified in #1331 and that this fix continues past that error in release testing simulation. The regression in behaviour is present in runner v12.6.0 & v12.6.1. <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/1336): <!--number 1336 --><!--line 0 --><!--description Zml4OiBpbnB1dHMgY29udGFpbmluZyAnLScgZG9uJ3QgZnVuY3Rpb24gaW4gTFhDIGV4ZWN1dG9y-->fix: inputs containing '-' don't function in LXC executor<!--description--> <!--end release-notes-assistant-->
fix: inputs containing '-' don't function in LXC executor
All checks were successful
checks / Build Forgejo Runner (pull_request) Successful in 31s
checks / validate pre-commit-hooks file (pull_request) Successful in 37s
checks / validate mocks (pull_request) Successful in 39s
checks / Build unsupported platforms (pull_request) Successful in 28s
checks / runner exec tests (pull_request) Successful in 46s
checks / integration tests (docker-latest) (pull_request) Successful in 9m14s
checks / integration tests (docker-stable) (pull_request) Successful in 11m6s
issue-labels / release-notes (pull_request_target) Successful in 5s
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Successful in 5s
cascade / forgejo (pull_request_target) Successful in 1m18s
f9a7a6c93f
aahlenst approved these changes 2026-01-25 22:32:49 +00:00
Contributor

cascading-pr updated at actions/setup-forgejo#859

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/859
mfenniak deleted branch fix-lxc-hyphen 2026-01-26 01:30:50 +00:00
viceice approved these changes 2026-01-26 07:39:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/runner!1336
No description provided.