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(manager:npm): support binarySource=install for yarn #15414

Merged
merged 15 commits into from
May 4, 2022

Conversation

viceice
Copy link
Member

@viceice viceice commented May 3, 2022

Changes

  • support binarySource=install for yarn
  • use corepack if packageManager field is found.

Context

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

@viceice viceice requested a review from rarkins May 3, 2022 10:08
@viceice
Copy link
Member Author

viceice commented May 3, 2022

@viceice
Copy link
Member Author

viceice commented May 3, 2022

needs another buble

otherwise this error occures:

Installing legacy tool corepack v0.10.0

added 1 package in 588ms
0.10.0
3.1.0
Usage Error: This project is configured to use yarn

$ pnpm ...

@viceice
Copy link
Member Author

viceice commented May 3, 2022

@viceice viceice marked this pull request as ready for review May 3, 2022 19:22
@viceice viceice requested a review from JamieMagee May 3, 2022 19:22
@viceice viceice changed the title feat(manager:npm): support binarySource=install feat(manager:npm): support binarySource=install for yarn May 4, 2022
@viceice viceice merged commit 03b2882 into main May 4, 2022
@viceice viceice deleted the feat/yarn-tool-contraints branch May 4, 2022 06:32
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.41.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bobvandevijver
Copy link
Contributor

@viceice Since this morning I'm seeing bash: yarn: command not found in my newly created renovate mrs, could this be related to this change?

rarkins added a commit that referenced this pull request May 5, 2022
@rarkins
Copy link
Collaborator

rarkins commented May 5, 2022

Created #15458 to prepare for possible revert of recent yarn changes

@rarkins
Copy link
Collaborator

rarkins commented May 5, 2022

@bobvandevijver hosted app or self-hosted?

@bobvandevijver
Copy link
Contributor

Self-hosted on Gitlab, using the slim image version v32.41.2.

@rarkins
Copy link
Collaborator

rarkins commented May 5, 2022

Can you copy paste here the docker run command for one of the commands which failed? We think it's related to tags with a v prefix, e.g. selecting v16.10.0 instead of 16.10.0

@bobvandevijver
Copy link
Contributor

{"name":"renovate","hostname":"runner-3cixccwz-project-43-concurrent-0","pid":14,"level":20,"logContext":"2fGWC0V2gIC-U8Ca6fG5F","repository":"extern/project","branch":"renovate/core-js-3.x","image":"node","msg":"Using docker to execute","time":"2022-05-05T07:30:09.380Z","v":0}
{"name":"renovate","hostname":"runner-3cixccwz-project-43-concurrent-0","pid":14,"level":20,"logContext":"2fGWC0V2gIC-U8Ca6fG5F","repository":"extern/project","branch":"renovate/core-js-3.x","toolName":"yarn-slim","constraint":"^1.22.18","resolvedVersion":"1.22.18","msg":"Resolved version","time":"2022-05-05T07:30:09.547Z","v":0}
{"name":"renovate","hostname":"runner-3cixccwz-project-43-concurrent-0","pid":14,"level":20,"logContext":"2fGWC0V2gIC-U8Ca6fG5F","repository":"extern/project","branch":"renovate/core-js-3.x","image":"docker.io/renovate/node","msg":"No tag or tagConstraint specified","time":"2022-05-05T07:30:09.547Z","v":0}
{"name":"renovate","hostname":"runner-3cixccwz-project-43-concurrent-0","pid":14,"level":20,"logContext":"2fGWC0V2gIC-U8Ca6fG5F","repository":"extern/project","branch":"renovate/core-js-3.x","msg":"Fetching Docker image: docker.io/renovate/node","time":"2022-05-05T07:30:09.548Z","v":0}
{"name":"renovate","hostname":"runner-3cixccwz-project-43-concurrent-0","pid":14,"level":20,"logContext":"2fGWC0V2gIC-U8Ca6fG5F","repository":"extern/project","branch":"renovate/core-js-3.x","msg":"Finished fetching Docker image","time":"2022-05-05T07:30:10.782Z","v":0}
{"name":"renovate","hostname":"runner-3cixccwz-project-43-concurrent-0","pid":14,"level":20,"logContext":"2fGWC0V2gIC-U8Ca6fG5F","repository":"extern/project","branch":"renovate/core-js-3.x","command":"docker run --rm --name=renovate_node --label=renovate_child -v \"/cache/renovate/drenso/repos/gitlab/extern/project\":\"/cache/renovate/drenso/repos/gitlab/extern/project\" -v \"/cache/renovate/drenso/cache\":\"/cache/renovate/drenso/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -e YARN_CACHE_FOLDER -w \"/cache/renovate/drenso/repos/gitlab/extern/project\" docker.io/renovate/node bash -l -c \"install-tool yarn-slim 1.22.18 && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts\"","msg":"Executing command","time":"2022-05-05T07:30:10.836Z","v":0}
{"name":"renovate","hostname":"runner-3cixccwz-project-43-concurrent-0","pid":14,"level":20,"logContext":"2fGWC0V2gIC-U8Ca6fG5F","repository":"extern/project","branch":"renovate/core-js-3.x","err":{"code":127,"killed":false,"signal":null,"cmd":"docker run --rm --name=renovate_node --label=renovate_child -v \"/cache/renovate/drenso/repos/gitlab/extern/project\":\"/cache/renovate/drenso/repos/gitlab/extern/project\" -v \"/cache/renovate/drenso/cache\":\"/cache/renovate/drenso/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -e YARN_CACHE_FOLDER -w \"/cache/renovate/drenso/repos/gitlab/extern/project\" docker.io/renovate/node bash -l -c \"install-tool yarn-slim 1.22.18 && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts\"","stdout":"Installing legacy tool yarn-slim v1.22.18\n\nadded 1 package in 1s\n1.22.18\n","stderr":"bash: yarn: command not found\n","message":"Command failed: docker run --rm --name=renovate_node --label=renovate_child -v \"/cache/renovate/drenso/repos/gitlab/extern/project\":\"/cache/renovate/drenso/repos/gitlab/extern/project\" -v \"/cache/renovate/drenso/cache\":\"/cache/renovate/drenso/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -e YARN_CACHE_FOLDER -w \"/cache/renovate/drenso/repos/gitlab/extern/project\" docker.io/renovate/node bash -l -c \"install-tool yarn-slim 1.22.18 && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts\"\nbash: yarn: command not found\n","stack":"Error: Command failed: docker run --rm --name=renovate_node --label=renovate_child -v \"/cache/renovate/drenso/repos/gitlab/extern/project\":\"/cache/renovate/drenso/repos/gitlab/extern/project\" -v \"/cache/renovate/drenso/cache\":\"/cache/renovate/drenso/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -e YARN_CACHE_FOLDER -w \"/cache/renovate/drenso/repos/gitlab/extern/project\" docker.io/renovate/node bash -l -c \"install-tool yarn-slim 1.22.18 && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts\"\nbash: yarn: command not found\n\n    at ChildProcess.exithandler (node:child_process:398:12)\n    at ChildProcess.emit (node:events:527:28)\n    at ChildProcess.emit (node:domain:475:12)\n    at maybeClose (node:internal/child_process:1092:16)\n    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)"},"msg":"rawExec err","time":"2022-05-05T07:30:13.833Z","v":0}
{"name":"renovate","hostname":"runner-3cixccwz-project-43-concurrent-0","pid":14,"level":20,"logContext":"2fGWC0V2gIC-U8Ca6fG5F","repository":"extern/project","branch":"renovate/core-js-3.x","err":{"code":127,"killed":false,"signal":null,"cmd":"docker run --rm --name=renovate_node --label=renovate_child -v \"/cache/renovate/drenso/repos/gitlab/extern/project\":\"/cache/renovate/drenso/repos/gitlab/extern/project\" -v \"/cache/renovate/drenso/cache\":\"/cache/renovate/drenso/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -e YARN_CACHE_FOLDER -w \"/cache/renovate/drenso/repos/gitlab/extern/project\" docker.io/renovate/node bash -l -c \"install-tool yarn-slim 1.22.18 && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts\"","stdout":"Installing legacy tool yarn-slim v1.22.18\n\nadded 1 package in 1s\n1.22.18\n","stderr":"bash: yarn: command not found\n","message":"Command failed: docker run --rm --name=renovate_node --label=renovate_child -v \"/cache/renovate/drenso/repos/gitlab/extern/project\":\"/cache/renovate/drenso/repos/gitlab/extern/project\" -v \"/cache/renovate/drenso/cache\":\"/cache/renovate/drenso/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -e YARN_CACHE_FOLDER -w \"/cache/renovate/drenso/repos/gitlab/extern/project\" docker.io/renovate/node bash -l -c \"install-tool yarn-slim 1.22.18 && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts\"\nbash: yarn: command not found\n","stack":"Error: Command failed: docker run --rm --name=renovate_node --label=renovate_child -v \"/cache/renovate/drenso/repos/gitlab/extern/project\":\"/cache/renovate/drenso/repos/gitlab/extern/project\" -v \"/cache/renovate/drenso/cache\":\"/cache/renovate/drenso/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -e YARN_CACHE_FOLDER -w \"/cache/renovate/drenso/repos/gitlab/extern/project\" docker.io/renovate/node bash -l -c \"install-tool yarn-slim 1.22.18 && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts\"\nbash: yarn: command not found\n\n    at ChildProcess.exithandler (node:child_process:398:12)\n    at ChildProcess.emit (node:events:527:28)\n    at ChildProcess.emit (node:domain:475:12)\n    at maybeClose (node:internal/child_process:1092:16)\n    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)"},"type":"yarn","msg":"lock file error","time":"2022-05-05T07:30:13.896Z","v":0}

@rarkins
Copy link
Collaborator

rarkins commented May 5, 2022

Thanks, working on a fix in next 1-2 hours (it requires a lot of images to be rebuilt and pushed to Docker Hub)

@bobvandevijver
Copy link
Contributor

Yes, it is fixed now 😃

@viceice
Copy link
Member Author

viceice commented May 5, 2022

sorry for the issues, i only tested latest renovate against the image changes and did not though about these recent yarn changes.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 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.

Yarn lock file maintenance using wrong version
4 participants