pulumi / pulumi-aws-native

AWS Native Provider for Pulumi
Apache License 2.0
95 stars 17 forks source link

sdk/python/pulumi_aws_native/cloudformation/__init__.py Bug Report #1826

Closed SeanWei-lab closed 1 week ago

SeanWei-lab commented 1 week ago

What happened?

The file sdk/python/pulumi_aws_native/cloudformation/init.py imports from.custom_resource_emulator import *, but in the python package of version 1.7.0, this module cannot be found and there is no custom_resource_emulator.py file. When running pulumi, an error will be reported.

Example

Image

Output of pulumi about

CLI Version 3.138.0 Go Version go1.23.2 Go Compiler gc

Host OS debian Version 12.7 Arch aarch64

Backend Name pulumi.com URL https://app.pulumi.com User Unknown Organizations Token type personal

Pulumi locates its logs in /tmp by default warning: Failed to read project: no Pulumi.yaml project file found (searching upwards from /pulumi/projects). If you have not created a project yet, use pulumi new to do so: no project file found warning: Failed to get information about the current stack: no Pulumi.yaml project file found (searching upwards from /pulumi/projects). If you have not created a project yet, use pulumi new to do so: no project file found

Additional context

Please fix it as soon as possible. It affects the operation of aws-native.

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

flostadler commented 1 week ago

Sorry you're running into this @SeanWei-lab! This turns out to be the results of a rebase gone wrong in this PR https://github.com/pulumi/pulumi-aws-native/pull/1807, it seems like this ended with the custom_resource_emulator.py being deleted and our automation didn't catch that.

I just started a release earlier that should finish in the next hour. In the meantime you can roll back to the previous version v1.6.0.

SeanWei-lab commented 1 week ago

Thank you for your help. I am currently using 1.7.0. After you complete the deployment, I will switch to the new version. Thank you for your hard work.

flostadler commented 1 week ago

I opened https://github.com/pulumi/pulumi-aws-native/issues/1827 to improve our automation to catch such issues in the the future.

flostadler commented 1 week ago

@SeanWei-lab version 1.8.0 just got released to pypi: https://pypi.org/project/pulumi-aws-native/1.8.0/

Can you try it out and report back whether it solves it for you? Thanks!

SeanWei-lab commented 1 week ago

Yeah! It's working, and no error. Thank you for solving this problem so quickly.

SeanWei-lab commented 1 week ago

@flostadler I have another question I would like to consult you about. It is regarding specifying the plugin version in pulumi.yaml. My files are as follows: name: oap2-serverless-app runtime: name: python plugin: aws: version: 6.49.1 aws-native: version: 1.8.0 description: oap2-serverless-app pulumi But I am not sure if the version I specified is really effective. Can you help me check it?

flostadler commented 1 week ago

@SeanWei-lab You'd usually use the version in the plugins option if you want Pulumi to use a local provider (i.e. a local provider binary), see docs. I'd recommend you to specify the version using your languages package manager (e.g. pip in python).

I'm gonna close this issue for now, but if you have any follow up questions don't hesitate to hop on our community slack or cut another GitHub issue!

SeanWei-lab commented 1 week ago

Sure ,thanks.