setup-miniconda
setup-miniconda copied to clipboard
Timing issue when renaming ~/.bashrc to ~/.profile
I use the action on a self-hosted runner. The VM is powerful and I run several Github Action runner instances on it.
From time to time the job fails with:
Initializing conda shell integration...
/home/ubuntu/miniconda/condabin/conda init --all
no change /home/ubuntu/miniconda/condabin/conda
no change /home/ubuntu/miniconda/bin/conda
no change /home/ubuntu/miniconda/bin/conda-env
no change /home/ubuntu/miniconda/bin/activate
no change /home/ubuntu/miniconda/bin/deactivate
no change /home/ubuntu/miniconda/etc/profile.d/conda.sh
no change /home/ubuntu/miniconda/etc/fish/conf.d/conda.fish
no change /home/ubuntu/miniconda/shell/condabin/Conda.psm1
no change /home/ubuntu/miniconda/shell/condabin/conda-hook.ps1
no change /home/ubuntu/miniconda/lib/python3.8/site-packages/xontrib/conda.xsh
no change /home/ubuntu/miniconda/etc/profile.d/conda.csh
no change /home/ubuntu/.bashrc
no change /home/ubuntu/.zshrc
no change /home/ubuntu/.config/fish/config.fish
no change /home/ubuntu/.xonshrc
no change /home/ubuntu/.tcshrc
No action taken.
Renaming "/home/ubuntu/.bashrc" to "/home/ubuntu/.profile"
Error: ENOENT: no such file or directory, rename '/home/ubuntu/.bashrc' -> '/home/ubuntu/.profile'
I use remove-profiles: false
but it seems this does not prevent the renaming.
Could this be improved to be more friendly to such self-hosted setups ?
Is there any workaround for this issue ? Almost half of the job runs fail because of this: https://github.com/martin-g/zeppelin/runs/4618065075?check_suite_focus=true
I tried touch
ing these files before running setup-miniconda but it does not help too:
https://github.com/martin-g/zeppelin/blob/1a6ffb862a20f28fb66d43ace21b1f9052caa9f6/.github/workflows/core.yml#L63-L74
It renamed also my .bashrc to .profile. The problem: .profile already existed and was overridden! This is not Ok and should at least be mentioned as important. .profile is used by our web shell and was broken for some hours. Too much hidden system modifications for a github action.
A workaround for my case was to use different OS user for each self-hosted Github runner.
Hi @martin-g sorry for the late reply. We will look into it!
+1 on at least adding more docs regarding self-hosted runners. Just naively ran this on my laptop because I'd run out of action minutes. Now my .bashrc is gone...
Ideally, the action would not meddle with anything outside of $PWD and $CONDA. Although I see how bash -l {0}
may not initialize right then.
Is there a way to run this action in a self-hosted runner that uses a regular working account on a multi-user system?
Ideally, the action would not meddle with anything outside of $PWD and $CONDA. Although I see how bash -l {0} may not initialize right then.
Correct
Is there a way to run this action in a self-hosted runner that uses a regular working account on a multi-user system?
Have not tried it