I was trying to deploy a GCP cloud function using git hub actions and I got this error:
ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: ERROR: Invalid requirement: 'Creating virtualenv xxxxxx-nJ6OriN1-py3.8 in /github/home/.cache/pypoetry/virtualenvs' (from line 1 of requirements.txt)
Hint: It looks like a path. File 'Creating virtualenv retry-failed-reports-nJ6OriN1-py3.8 in /github/home/.cache/pypoetry/virtualenvs' does not exist.; Error ID: 0ea8a540
Up until today, when all git hub workflows failed with this problem, my CI-CD pipeline was working as expected.
I was able to deploy the function manually using gcloud
, it fails on cloud build step
How can I solve this issue?
We were using this command to generate the requirements.txt
:
poetry export -f requirements.txt --without-hashes > requirements.txt
However, this stopped working.
Now I tried this command and is working fine:
poetry export -f requirements.txt --output requirements.txt --without-hashes