Describe the bug
Our application installs puppeteer inside the Python /share folder using yarn.
Since a few days ago, our CI builds that perform this install (both in Azure Workflows and Github Actions) started failing with the following output:
> chmod +x ./setup.sh && ./setup.sh
Check if Python hostedtoolcache folder exist...
Delete Python 3.7.* if installed
removed '/opt/hostedtoolcache/Python/3.7.6/x64/include/python3.7m/pystate.h'
removed '/opt/hostedtoolcache/Python/3.7.6/x64/include/python3.7m/pyconfig.h'
...
Area for Triage:
Containers
JavaScript and Node.js
Python
Question, Bug, or Feature?:
Bug
Virtual environments affected
Expected behavior
Change directories into a subdirectory of /opt/hostedtoolcache/Python/3.7.6/x64 (e.g. /share).
Install a node dependency using yarn.
Actual behavior
After the yarn (or npm install) command is run, the Python directory is removed.
Run the following workflow:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Run tests
run: |
cd $(dirname $(which python))
mkdir temp
cd temp
yarn
I tried with both 16.04 and 18.04, and with both the system Node/Python and the hostedtoolcache versions.
It may be related to https://github.com/actions/virtual-environments/pull/216
@blink1073 thanks for reporting! We're working on a fix.
Could you try this temporary workaround, please?
Invoke these lines before yarn
cd $(dirname $(which python))
rm -rf ../package.json
Thanks @miketimofeev! I confirmed the work around unblocks us for now.
Wow, thanks for being so responsive!
Quick update: we have a solution that should be rolled out fully by mid next week.
We had a bit of a setback with the deployment and it's probably not going to be until early next week when the fix is in. Apologies for the delay, in the meantime please retain the workaround in your workflows. We'll update this issue and close it once the fix is deployed.
Thanks for the update @alepauly, we ended up using yarn init -y as a permanent solution to avoid any interference from parent folders.
Issue should be fixed for now. Please let us know if it still persists
Cheers!
Most helpful comment
Quick update: we have a solution that should be rolled out fully by mid next week.