Skip to content
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

feat(npm): support binarySource=install for pnpm #13723

Merged
merged 2 commits into from Jan 21, 2022

Conversation

rarkins
Copy link
Collaborator

@rarkins rarkins commented Jan 21, 2022

Changes:

Refactors pnpm tool installation to support binarySource=install

Context:

Part of #13683

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@rarkins rarkins requested a review from viceice January 21, 2022 14:23
@rarkins
Copy link
Collaborator Author

rarkins commented Jan 21, 2022

@viceice fails with this permissions problem when testing against https://github.com/renovate-reproductions/monosample and using binarySource=docker:

DEBUG: rawExec err (repository=renovate-reproductions/monosample, branch=renovate/typeorm-0.x)
       "err": {
         "killed": false,
         "code": 1,
         "signal": null,
         "cmd": "docker run --rm --name=renovate_node --label=renovate_child -v \"/tmp/renovate/repos/github/renovate-reproductions/monosample\":\"/tmp/renovate/repos/github/renovate-reproductions/monosample\" -v \"/tmp/renovate/cache\":\"/tmp/renovate/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e ARTIFACTORY_TOKEN -w \"/tmp/renovate/repos/github/renovate-reproductions/monosample\" docker.io/renovate/node bash -l -c \"install-tool pnpm 6.27.2 && pnpm install --recursive --lockfile-only --ignore-scripts --ignore-pnpmfile\"",
         "stdout": "Installing tool pnpm v6.27.2
/home/ubuntu/.npm-global/bin/pnpm -> /home/ubuntu/.npm-global/lib/node_modules/pnpm/bin/pnpm.cjs
/home/ubuntu/.npm-global/bin/pnpx -> /home/ubuntu/.npm-global/lib/node_modules/pnpm/bin/pnpx.cjs
+ pnpm@6.27.2
added 1 package in 1.578s
6.27.2
",
         "stderr": "npm WARN using --force I sure hope you know what you are doing.
rm: cannot remove '/root/.cache': Permission denied
",
         "message": "Command failed: docker run --rm --name=renovate_node --label=renovate_child -v \"/tmp/renovate/repos/github/renovate-reproductions/monosample\":\"/tmp/renovate/repos/github/renovate-reproductions/monosample\" -v \"/tmp/renovate/cache\":\"/tmp/renovate/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e ARTIFACTORY_TOKEN -w \"/tmp/renovate/repos/github/renovate-reproductions/monosample\" docker.io/renovate/node bash -l -c \"install-tool pnpm 6.27.2 && pnpm install --recursive --lockfile-only --ignore-scripts --ignore-pnpmfile\"
npm WARN using --force I sure hope you know what you are doing.
rm: cannot remove '/root/.cache': Permission denied
",
         "stack": "Error: Command failed: docker run --rm --name=renovate_node --label=renovate_child -v \"/tmp/renovate/repos/github/renovate-reproductions/monosample\":\"/tmp/renovate/repos/github/renovate-reproductions/monosample\" -v \"/tmp/renovate/cache\":\"/tmp/renovate/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e ARTIFACTORY_TOKEN -w \"/tmp/renovate/repos/github/renovate-reproductions/monosample\" docker.io/renovate/node bash -l -c \"install-tool pnpm 6.27.2 && pnpm install --recursive --lockfile-only --ignore-scripts --ignore-pnpmfile\"
npm WARN using --force I sure hope you know what you are doing.
rm: cannot remove '/root/.cache': Permission denied

    at ChildProcess.exithandler (node:child_process:397:12)
    at ChildProcess.emit (node:events:390:28)
    at ChildProcess.emit (node:domain:475:12)
    at maybeClose (node:internal/child_process:1064:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)"
       }

@viceice

This comment has been minimized.

@viceice

This comment has been minimized.

@rarkins
Copy link
Collaborator Author

rarkins commented Jan 21, 2022

Seems to work now with binarySource=docker

@rarkins rarkins marked this pull request as ready for review January 21, 2022 16:24
@rarkins rarkins merged commit d2a47ce into main Jan 21, 2022
@rarkins rarkins deleted the feat/13683-pnpm-binary-install branch January 21, 2022 17:03
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 31.42.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

ademar59 pushed a commit to ademar59/renovate that referenced this pull request Jan 24, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants