-
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 7862 #7887
Fix 7862 #7887
Conversation
from .. import Resource | ||
|
||
|
||
_DEPENDENCIES_PROPERTY = '_direct_computed_dependencies' |
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.
So this algorithm needs to store the state somewhere. Options to put the state in:
- some property of Resource objects (currently
_DEPENDENCIES_PROPERTY
is exactly that) - global table (I'm ever-so-slightly worried about leaks and re-entrancy in some auto API cases)
- table scoped to the Pulumi program run that is executing - this would perhaps be ideal, but where do we put such state, which object/class?
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.
@pgavlin has talked about adding a kv store in the engine as a first class feature in the pulumi RPC interface to service scenarios just like this. But I don't personally have anything against the approach you've taken to solve the customer issue right now.
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.
Yeah! Hm. This would indeed come handy one day. However as things stand with Py SDK I'd be a bit worried about relying on async KV store for core functionality.. For example I'd love to first get rid of threading and have a really foolproof async situation. in current design core functionality of Py SDK is to order the RegisterResource calls "right" before they hit the engine.
So far I can think of no downside piggybacking on the Resource prop - we're not ever pickling these objects right.. But if needed/wanted I can also explicitly declare this prop on the Resource class so it's more official this is being used.
Description
Fixes #7862
Checklist