venv not created for pack from Pulumi organization
clstokes opened this issue · comments
Cameron Stokes commented
I get an error when using a Python policy pack from a Pulumi organization.
(venv) policy-as-code % pulumi up
Previewing update (dev-clstokes)
View Live: https://app.pulumi.com/clstokes/azure-py-webserver/dev-clstokes/previews/6cf9f772-d7e4-4a61-82f1-b99aa4e511e9
Installing policy pack azure-nextgen-python 0.0.3...
error: updating pip, setuptools, and wheel via 'venv/bin/python -m pip install --upgrade pip setuptools wheel': fork/exec venv/bin/python: no such file or directory
(venv) policy-as-code %
Workaround
If I manually create the virtual env, then a subsequent pulumi up
will work as expected.
e.g.
% cd ~/.pulumi/policies/clstokes/pulumi-analyzer-azure-nextgen-python-v0.0.3
% python3 -m venv venv
...
% cd -
% pulumi up
Steps to reproduce
mkdir new-proj
pulumi new aws-python -y
mkdir policy-as-code
pulumi policy new aws-python
pulumi policy publish
pulumi policy enable aws-python 0.0.1
cd -
pulumi up
Cameron Stokes commented
Per @komalali, it looks like this regressed in Pulumi 2.15.1.
Komal commented
Looking at the changelog between 2.15.0 and 2.15.1 and the code path for plugin installation, my inkling is that this was regressed by pulumi/pulumi#5787