bug: runner is not respecting PATH in envfile for looking up git #1177
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
run-multi-platform-tests
No milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
forgejo/runner#1177
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Can you reproduce the bug on the Forgejo test instance?
No
Description
Yet:
Forgejo Version
Codeberg current
Runner Version
v12.0.0
How are you running Forgejo?
Codeberg
How are you running the Runner?
make build+ rc.dLogs
No response
Workflow file
No response
This is the documented breaking change of v12 https://code.forgejo.org/forgejo/runner/releases/tag/v12.0.0
You may want to wait for v12.0.1 before upgrading due to this regression.
I'm aware of the breaking change, but I would still expect the runner to pick up
PATHfrom the.envfile (if any) in order to find executables that it depends on. It does so fornode, for example, and we rely on that on most of our machines.I'm not sure about this; all the documentation related to the envfile support describes it as being used "in the containers", or "extra environment variables to run jobs from a file." This requirement for git is not at all related to the containers or jobs being executed. I recognize that there's some overlap here as you're using the host-based executor, and that environment file is used for command execution in that environment -- but there,
nodeis being executed because it is referenced by the job, andgitis being executed as a system requirement for the runner.This could be made to work by pulling some chunks out of code out of the host executor, and dropping it into lower-level libraries that can be referenced by the git module. Then both
envsandenv_fileoption would need to be passed over to the clone system, which would be awkwardly pulled out of container-level options where the clone is invoked, as the system-level config isn't accessible there. It seems ugly but possible.But I'm not sure it's right... for instance, on my NixOS system
gitisn't in a standard location. If I was setting a container-levelPATH, I'd be setting it to standard Linux FHS so that it worked withubuntu:latest, for example... and then it wouldn't be able to find my host'sgit. 🤔I see; if the env file is indeed only intended for the executor, then this behavior makes sense. I hadn't thought too deeply about that aspect since the line is a bit blurry in our case of only using host executors. I guess we'll just set
PATHin therc.dservice script.