Skip to content
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

[auto/python] - Fix deserialization of event #8375

Merged
merged 4 commits into from Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG_PENDING.md
Expand Up @@ -3,6 +3,9 @@

### Bug Fixes

- [automation/python] - Fix deserialization of events.
[#8375](https://github.com/pulumi/pulumi/pull/8375)

- [sdk/dotnet] - Fixes failing preview for programs that call data
sources (`F.Invoke`) with unknown outputs
[#8339](https://github.com/pulumi/pulumi/pull/8339)
Expand Down
13 changes: 10 additions & 3 deletions sdk/python/lib/pulumi/automation/events.py
Expand Up @@ -431,7 +431,9 @@ def __init__(self,

@classmethod
def from_json(cls, data: dict) -> 'ResourcePreEvent':
return cls(**data)
metadata: dict = data.get("metadata", {})
return cls(metadata=StepEventMetadata.from_json(metadata),
planning=data.get("planning"))


class ResOutputsEvent(BaseEvent):
Expand All @@ -446,7 +448,9 @@ def __init__(self,

@classmethod
def from_json(cls, data: dict) -> 'ResOutputsEvent':
return cls(**data)
metadata: dict = data.get("metadata", {})
return cls(metadata=StepEventMetadata.from_json(metadata),
planning=data.get("planning"))


class ResOpFailedEvent(BaseEvent):
Expand All @@ -464,7 +468,10 @@ def __init__(self,

@classmethod
def from_json(cls, data: dict) -> 'ResOpFailedEvent':
return cls(**data)
metadata: dict = data.get("metadata", {})
return cls(metadata=StepEventMetadata.from_json(metadata),
status=data.get("status", 0),
steps=data.get("steps", 0))


class EngineEvent(BaseEvent):
Expand Down