-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential 0.40.0 regression on Github Actions runners #3405
Comments
Do you (fwiw, i use nvm 0.40.0 in my own ljharb/actions, which runs on 500 of my projects, and these don't fail, so I'm trying to figure out what might have changed here) |
Here's a similar actions failing - i've added Full output:
I wonder if the difference is that your projects might have |
Adding onto my previous comment, I think there might be a bug / edge case with In my github action I did The final working command for reference: |
hmm, it looks like it's getting |
The issue is definitely happening only when there is an .nvmrc present. I ran bash in debug mode (-xv), and I believe it was failing when trying to parse it. It seems that 0.40.0 added comments support to .nvmrc, so it sounds like it might be a regression root (not confident). I will add -xv back post the output when I'm back to this. |
I don't think I use -e anywhere (see the test workflow I've created to reproduce this issue. It's super simple) Details
Edit: updated the run to match the install |
@ljharb Does it mean it uses iojs as default (unlike node) or am I misreading the debug? |
ok, so the default options in that workflow are The github action workflow was and will be very helpful here, both for repro, investigation, and later for a regression test. |
@AutomationD yeah, you're misreading it - that's just a predicate to determine if v18 is an iojs version (which it's not, ofc). |
Great find, thanks for looking into it! At this point I'll be locking my nvm workflows and a wrapper using nvm to version |
ok, some bisecting suggests the issue was introduced in #2869: https://github.com/ljharb/ize/actions/runs/10328344009 I've got a fix; I'll adapt the workflows into a regression test |
I ran into this issue and spent a while narrowing it down to the nvm version before finding this thread, but here's my regression workflow that shows some difference between name: Test NVMs NVM_DIR on ubuntu-latest
on:
workflow_dispatch:
defaults:
run:
shell: bash
env:
UNAUTO_NODE_VERSION: v18.18.2 # "NODE_VERSION" is read by the nvm install script.
SETX: "false"
jobs:
nvmrc-present-older-nvm:
strategy:
fail-fast: false
matrix:
nvm-version: ['v0.39.5', 'v0.39.6', 'v0.39.7', 'v0.40.0']
runs-on: ubuntu-latest
steps:
- run: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${{ matrix.nvm-version }}/install.sh | bash
- run: echo "$UNAUTO_NODE_VERSION" > .nvmrc
- if: env.SETX == 'true'
run: source <(echo "set -x"; cat $NVM_DIR/nvm.sh; echo "set +x") && nvm install $(cat .nvmrc)
- if: env.SETX != 'true'
run: source $NVM_DIR/nvm.sh && nvm install $(cat .nvmrc)
nvmrc-present-default-nvm: # v0.40.0 atm
runs-on: ubuntu-latest
steps:
- run: echo "$UNAUTO_NODE_VERSION" > .nvmrc
- if: env.SETX == 'true'
run: source <(echo "set -x"; cat $NVM_DIR/nvm.sh; echo "set +x") && nvm install $(cat .nvmrc)
- if: env.SETX != 'true'
run: source $NVM_DIR/nvm.sh && nvm install $(cat .nvmrc)
nvmrc-absent-default-nvm: # v0.40.0 atm
runs-on: ubuntu-latest
steps:
- run: source $NVM_DIR/nvm.sh && nvm install $UNAUTO_NODE_VERSION |
Welcome to the family 🤗 Hopefully @ljharb will release a fix soon. |
Prior to some fix that may take some time to percolate onto the runner (and not wanting to frob the installed version), besides swallowing any other arbitrary error, is temporarily renaming the |
The only workaround I know is downgrading to
|
The trivial workaround in the meantime is |
My solution was to remove NVM from Exit code 3 was not great. |
How did you use |
NVM got installed through a third party action at the beginning, such as The rest of our actions do not require node or nvm and do not explicitly install nvm. This issue should affect anyone doing something similar: setting |
Unfortunately I was able to create solid regression tests, but they exposed they my fix wasn't complete, and I'm still working on that fix. |
Downgrading to nvm v0.39.7, see this issue: - nvm-sh/nvm#3405 Homebrew installation is not supported, see: - https://github.com/nvm-sh/nvm?tab=readme-ov-file#important-notes
Downgrading to nvm v0.39.7, see this issue: - nvm-sh/nvm#3405 Homebrew installation is not supported, see: - https://github.com/nvm-sh/nvm?tab=readme-ov-file#important-notes
got it! I'm going to try to squeeze in one more bugfix, and I'll have a patch release out tomorrow. |
Poential 0.40.0 regression in Github Actions CI/CD
I tried to fill out the form, but it's quite hard as most things simply don't run.
Here is a set of test workflows that show the regression.
Operating system and version:
Ubuntu 22.04
(Github Runner version 20240804.1.0)
nvm debug
output:# Impossible to run directly
nvm ls
output:# Impossible to run directly
How did you install
nvm
?Pre-installed on Github Runner
What steps did you perform?
What happened?
Received output:
What did you expect to happen?
Install of the node version specified in .nvmrc (
18
)Is there anything in any of your profile files that modifies the
PATH
?I don't think so. It's a fresh Github Action runner
If you are having installation issues, or getting "N/A", what does
curl -I --compressed -v https://nodejs.org/dist/
print out?Please see workflow runs for demonstration of the apparent regression,
The text was updated successfully, but these errors were encountered: