actions-runner-controller icon indicating copy to clipboard operation
actions-runner-controller copied to clipboard

Missing /home/runner/.local/bin to /etc/environment PATH in ubuntu 22.04

Open 13013SwagR opened this issue 2 years ago • 7 comments

Checks

  • [X] I've already read https://github.com/actions/actions-runner-controller/blob/master/TROUBLESHOOTING.md and I'm sure my issue is not covered in the troubleshooting guide.
  • [X] I'm not using a custom entrypoint in my runner image

Controller Version

v0.26.0

Helm Chart Version

0.21.1

CertManager Version

No response

Deployment Method

Helm

cert-manager installation

Yes, my bug doesn't relate to this component.

Checks

  • [X] This isn't a question or user support case (For Q&A and community support, go to Discussions. It might also be a good idea to contract with any of contributors and maintainers if your business is so critical and therefore you need priority support
  • [X] I've read releasenotes before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
  • [X] My actions-runner-controller version (v0.x.y) does support the feature
  • [X] I've already upgraded ARC (including the CRDs, see charts/actions-runner-controller/docs/UPGRADING.md for details) to the latest and it didn't fix the issue
  • [X] I've migrated to the workflow job webhook event (if you using webhook driven scaling)

Resource Definitions

N/A the problem is not related to Kubernetes

To Reproduce

docker run -it --rm docker.io/summerwind/actions-runner:v2.303.0-ubuntu-22.04 "cat /etc/environment"
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ImageOS=ubuntu22

Describe the bug

The ubuntu 20.04 image PATH includes /home/runner/.local/bon and so does the Github-hosted ubuntu-latest runner. I think this is a regression that should be fixed.

Describe the expected behavior

docker run -it --rm docker.io/summerwind/actions-runner:v2.303.x-ubuntu-22.04 "cat /etc/environment" PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin ImageOS=ubuntu22

Whole Controller Logs

N/A the problem is not related to the controller

Whole Runner Pod Logs

N/A the problem is not related to Kubernetes or runtime

Additional Context

No response

13013SwagR avatar Apr 26 '23 15:04 13013SwagR

Hello! Thank you for filing an issue.

The maintainers will triage your issue shortly.

In the meantime, please take a look at the troubleshooting guide for bug reports.

If this is a feature request, please review our contribution guidelines.

github-actions[bot] avatar Apr 26 '23 15:04 github-actions[bot]

Seems to be fixed in 2.304.0

docker run -it --rm docker.io/summerwind/actions-runner:v2.304.0-ubuntu-22.04 "cat /etc/environment"
Unable to find image 'summerwind/actions-runner:v2.304.0-ubuntu-22.04' locally
v2.304.0-ubuntu-22.04: Pulling from summerwind/actions-runner
2ab09b027e7f: Already exists 
ca1f5e554077: Already exists 
87cf26d36800: Already exists 
f2c57b692970: Already exists 
0133d2b0e2fa: Already exists 
99157c9d68aa: Already exists 
dd2d95a2f500: Already exists 
6e86626cb9e6: Already exists 
c46475465cc8: Already exists 
1efeeb0e1758: Already exists 
e60c6e8cf811: Already exists 
210ffb052d85: Already exists 
97b3eca44a57: Already exists 
Digest: sha256:0d360f4daf9be987c1debfafc701953a5ae9c03a1a3aed4dad9c91014c738949
Status: Downloaded newer image for summerwind/actions-runner:v2.304.0-ubuntu-22.04
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin/
ImageOS=ubuntu22

cavila-evoliq avatar May 10 '23 04:05 cavila-evoliq

Not working on 2.320.0

docker run -it --rm  ghcr.io/actions/actions-runner:2.320.0  cat "/etc/environment"
Unable to find image 'ghcr.io/actions/actions-runner:2.320.0' locally
2.320.0: Pulling from actions/actions-runner
Digest: sha256:8de989a63c2dad8aeb7c44b70f86189d148f887cbd917ecbe83879df54bf6590
Status: Downloaded newer image for ghcr.io/actions/actions-runner:2.320.0
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"

surgiie avatar Nov 18 '24 20:11 surgiie

Like @surgiie Can someone have a look on this issue 🙏 ?

jhaumont avatar Jan 10 '25 20:01 jhaumont

Continues to be an issue in most recent version:

docker run -it --rm  ghcr.io/actions/actions-runner:2.322.0  cat "/etc/environment"

Unable to find image 'ghcr.io/actions/actions-runner:2.322.0' locally
2.322.0: Pulling from actions/actions-runner
Digest: sha256:c02e8e1b479ea39b196c3bb0a40a66a191302654a6ef5c042eafe11c13323137
Status: Downloaded newer image for ghcr.io/actions/actions-runner:2.322.0
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"

surgiie avatar Mar 04 '25 20:03 surgiie

This is still not working and breaking our builds. Can someone please look at this?

FearlessHyena avatar Apr 25 '25 09:04 FearlessHyena

FWIW, here is a work around to add things to $PATH during your build:

# see: https://github.com/actions/actions-runner-controller/issues/2540
- name: Fix Path Variable
  run: |
     echo "/home/runner/.local/bin" >> $GITHUB_PATH
     # add any other paths needed. 

surgiie avatar Apr 25 '25 15:04 surgiie