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
Remove hash npm uses
#102
Remove hash npm uses
#102
Conversation
This script runs inside a Docker container based on |
Completely agreed that given that it's always run built on the same base image, it should deterministically produce the same result. However for unknown reasons this failed consistently in my CircleCI environment exactly the same way as #96 documents, yet would build successfully on my Intel-based Mac. I'll hunt down specific version numbers tomorrow and provide build logs, and if @red-meadow and @sverrirsig would also be so kind to provide additional details that would be super. |
The changes seem fine to me, but I'd like to fully understand the issue (ideally with steps to reproduce) before merging anything in. Maybe there's a situation where |
|
The following steps are required to reproduce the issue in my case:
Previously I used Meteor@2.2 and everything worked flawlessly. |
|
On my local Mac, It also works as part of the CI in this repo: https://github.com/disney/meteor-base/runs/4954930645?check_suite_focus=true Perhaps you could clarify which environments fail and how? |
Could you explain what specific information is needed? |
A way for me to reproduce the failure. It works on my machine and on GitHub CI. |
|
We also faced this issue. I consider the command
Then I run the failing image: docker run --rm -it c85b96adb936 sh: More commands regarding the environment: For any reason, in bash, npm is not registered within hash. In our case, it may relates to the update to
Relates to https://github.com/bminor/bash/blob/master/CHANGES#L7760?
The same protocol on my MacOS does not reproduce the issue, while bash is in the same version: |
Or more specifically, the I deleted all cached images from my local machine and rebuilt everything, and I still don’t get the error. I tried to reproduce it in a simpler form: » docker run -it node:14.18.2-alpine sh
# apk --no-cache add bash
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
(1/4) Installing ncurses-terminfo-base (6.3_p20211120-r0)
(2/4) Installing ncurses-libs (6.3_p20211120-r0)
(3/4) Installing readline (8.1.1-r0)
(4/4) Installing bash (5.1.16-r0)
Executing bash-5.1.16-r0.post-install
Executing busybox-1.34.1-r3.trigger
OK: 10 MiB in 20 packages
# bash
bash-5.1# if hash npm 2>/dev/null; then echo 'npm_ok'; else echo 'npm_ko'; fi
npm_ok
bash-5.1# hash npm; echo $?
0So it would appear that In the shell script in question, a nonzero exit code for |
|
The bash issue has been reported to bash-bug. https://lists.gnu.org/archive/html/bug-bash/2022-02/msg00179.html |
|
Here the conclusions from CircleCI support team: Hello Benoit Sorry for the misunderstanding about the workaround. We have spoken with the team about this and the issue underlying issue with the OS being used. The reason for this issue was a change with musl libc in Alpine since v3.14. When using a version before 3.14 such as 3.13 it works, but when using 3.14 it fails by default if a version is not explicitly defined it uses the latest alpine 3.15 docker run -it node:14.18.2-alpine sh The available versions of remote docker that are available can be found here: https://circleci.com/docs/2.0/building-docker-images/#docker-version If you have any questions please feel free to ask. Kind Regards Owen Oliver - Support Engineer @ CircleCI |
Proposing removing the use of
hash npmwhich breaks in some environments.My understanding is that the
meteorexecutable does not exist within this layer of the build process, therefore ifhash npmevaluates to something truthy thenmeteor npmfails.Is there any use case in which
meteor npm installdoes need to run in this build layer? If not I'm assuming it's safe to remove the conditional logic based onhash npmand runnpm installinstead.