https://pulumi.com logo
Title
w

witty-battery-24953

01/08/2020, 5:45 PM
Hey folks 👋! I believe the Pulumi Actions v1.8.1/latest tag in docker (released ~25min ago) is broken for Python. Using it with github actions results in a
No module named pulumi
error, but using the v1.7.1 tagged actions container works just fine. Unrelated question: where's the right place to bring up issues with actions/ci in general? Opening up an issue in the
pulumi/pulumi
repo didn't seem quite right...
c

colossal-beach-47527

01/08/2020, 5:50 PM
The
pulumi/pulumi
repo is the right location, or mentioning it in the #python channel works too 🙂 I’m taking a look now.
👍 1
So I think this is actually “by design”, in that the
pulumi/pulumi
container doesn’t install any dependencies before running. You would need to first run
pip3 install
first, which would download all of the required dependencies. The
pulumi/actions
container (which is ~the same, but intended to be used for GitHub Actions) has a specialized entry point that looks for a package manager and triggers an install first. https://github.com/pulumi/pulumi/blob/master/dist/actions/entrypoint.sh#L103
Does that explanation sound right to you? Or are you somehow running
pip install
and do not expect this error? Also, how are you using the
pulumi/pulumi
container?
w

witty-battery-24953

01/08/2020, 5:53 PM
That sounds about right. However, even using the
pulumi/actions
container in a github actions spec (
- uses: <docker://pulumi/actions>
) fails
As of v1.8.1. The exact same workflow config with
- uses: <docker://pulumi/actions:v1.7.1>
works.
Lemme grab the full actions yaml (it's pretty small thankfully, this is a tiny project at the moment)
on: pull_request
name: Pulumi
jobs:
  preview:
    name: Preview
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
      with:
        fetch-depth: 1
    - uses: <docker://pulumi/actions:v1.7.1> # <-- Dropping the version specifier here fails since v1.8.1 was pushed earlier today
      env:
        PULUMI_CI: pr
        PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
      with:
        args: preview -s prod
c

colossal-beach-47527

01/08/2020, 5:58 PM
Just to make sure I understand correctly, if you use that
actions.yaml
file, it will work for your Python app. Since
pulumi/actions:v1.7.1
does all the things you need. But changing that to the latest
pulumi/actions:v1.8.1
fails with the error you have above? “No module named ‘pulumi’“? Do I have that all right?
w

witty-battery-24953

01/08/2020, 5:59 PM
Yup! With one errata: since v1.8.1 is the new
pulumi/actions:latest
, it will fail with
pulumi/actions
(so this impacts any
actions.yaml
using Python that doesn't pin the
pulumi/actions
version)
Is there any way to tell what commit sha is associated with a version number? I'm looking at a blame for
entrypoint.sh
to try to help pin down the change that broke things, but I'm not sure what date I should be looking around...
nevermind, it's right there in releases, silly question
c

colossal-beach-47527

01/08/2020, 6:05 PM
Are you seeing the
entrypoint.sh
file? If so, does it match what you see here on GitHub? https://github.com/pulumi/pulumi/blob/master/dist/actions/entrypoint.sh
OK, yes, I see the problem. the
pulumi/actions
container does look like we have published the wrong one. (The entry point is probably the one from the
pulumi/pulumi
container and not the
pulumi/actions
container.) I’ll try to fix this ASAP.
w

witty-battery-24953

01/08/2020, 6:09 PM
Yeah, pulling the
pulumi/actions
image locally I'm not even seeing a
/usr/bin/pulumi-action
file
c

colossal-beach-47527

01/08/2020, 8:12 PM
The issue should be resolved now, so if you later switch back to
pulumi/actions:v1.8.1
or
pulumi/actions:latest
and have any problems please let me know!
w

witty-battery-24953

01/08/2020, 8:48 PM
Yup, working like a charm now. Thanks for jumping on this, Chris!
👍 1