-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue with lazy_import affecting pulumi-eks #7024
Conversation
Diff for pulumi-random with merge commit f0ace54 |
Diff for pulumi-azuread with merge commit f0ace54 |
Diff for pulumi-kubernetes with merge commit f0ace54 |
Diff for pulumi-gcp with merge commit f0ace54 |
Diff for pulumi-azure with merge commit f0ace54 |
Diff for pulumi-aws with merge commit f0ace54 |
Diff for pulumi-azure-native with merge commit f0ace54 |
One aspect tis code is moving from codegen into shared lib in pulumi Python SDK. Will this create problems (non-atomic releases)? IF this can create problems I can compensate by temporary code that, failing to find the function in Pulumi SDK defaults to an inline implementation. |
Diff for pulumi-random with merge commit 099ef4f |
Diff for pulumi-azuread with merge commit 099ef4f |
Diff for pulumi-kubernetes with merge commit 099ef4f |
Diff for pulumi-random with merge commit 26b6031 |
Diff for pulumi-azuread with merge commit 26b6031 |
Diff for pulumi-kubernetes with merge commit 26b6031 |
Diff for pulumi-gcp with merge commit 099ef4f |
Diff for pulumi-gcp with merge commit 26b6031 |
Diff for pulumi-azure with merge commit 099ef4f |
Diff for pulumi-azure with merge commit 26b6031 |
Diff for pulumi-azure-native with merge commit 099ef4f |
Diff for pulumi-aws with merge commit 099ef4f |
sdk/python/lib/pulumi/_utils.py
Outdated
# | ||
# Original example extended to support import cycles and registration | ||
# of sub-modules as attributes. | ||
def _lazy_import(fullname): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious: Why are we moving this into pulumi
package now? Is it just to make it easier to make changes to this code (if necessary), without having to the roll out the codegen changes to the various providers (we'd just have to change it once, and release a new pulumi
package?)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mostly wanted it to benefit from living in a py
file and having test and lint support. I hope that the functionality will not be updated frequently so pulumi package func is okay? Or are there arguments against it?
sdk/python/lib/pulumi/_utils.py
Outdated
# | ||
# Original example extended to support import cycles and registration | ||
# of sub-modules as attributes. | ||
def _lazy_import(fullname): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going to be using this from our SDKs, I do wonder if we should not prefix it with _
and possibly put it in a module that's not also prefixed with _
to make it more clear that this called externally. pulumi.runtime.lazy_import
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. It's already in _utils.py but I can rename it to lazy_import since it's not module-local.
Diff for pulumi-azuread with merge commit 764f975 |
Diff for pulumi-random with merge commit 764f975 |
Diff for pulumi-kubernetes with merge commit 764f975 |
Diff for pulumi-gcp with merge commit 764f975 |
Diff for pulumi-azure with merge commit 764f975 |
Diff for pulumi-random with merge commit 64ac2c7 |
Diff for pulumi-azuread with merge commit 64ac2c7 |
Diff for pulumi-kubernetes with merge commit 64ac2c7 |
Diff for pulumi-random with merge commit e82cf44 |
Diff for pulumi-azuread with merge commit e82cf44 |
Diff for pulumi-kubernetes with merge commit e82cf44 |
Diff for pulumi-gcp with merge commit e82cf44 |
Diff for pulumi-gcp with merge commit 64ac2c7 |
Diff for pulumi-aws with merge commit 764f975 |
Diff for pulumi-azure-native with merge commit 764f975 |
Diff for pulumi-azure with merge commit e82cf44 |
Diff for pulumi-azure with merge commit 64ac2c7 |
Diff for pulumi-aws with merge commit 64ac2c7 |
Diff for pulumi-azure-native with merge commit 64ac2c7 |
Diff for pulumi-aws with merge commit e82cf44 |
Diff for pulumi-azure-native with merge commit e82cf44 |
Fixes #7021