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

[sdk/python] yaml. _parse_yaml_object wait only for metadata name and namespace instead of all metadata #1675

Merged
merged 2 commits into from
Aug 12, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## HEAD (Unreleased)

- [sdk/python] Fix wait for metadata in `yaml._parse_yaml_object`. (https://github.com/pulumi/pulumi-kubernetes/pull/1675)

## 3.6.0 (Auguest 4, 2021)

The following breaking changes are part of the Kubernetes v1.22 update:
Expand Down
4 changes: 2 additions & 2 deletions provider/pkg/gen/python-templates/yaml/yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,8 @@ def _parse_yaml_object(
spec = obj.get("spec")
identifier: pulumi.Output = pulumi.Output.from_input(metadata["name"])
if "namespace" in metadata:
identifier = pulumi.Output.from_input(metadata).apply(
lambda metadata: f"{metadata['namespace']}/{metadata['name']}")
identifier = pulumi.Output.all(metadata["namespace"], metadata["name"]).apply(
lambda x: f"{x[0]}/{x[1]}")
if resource_prefix:
identifier = pulumi.Output.from_input(identifier).apply(
lambda identifier: f"{resource_prefix}-{identifier}")
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/pulumi_kubernetes/yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,8 @@ def _parse_yaml_object(
spec = obj.get("spec")
identifier: pulumi.Output = pulumi.Output.from_input(metadata["name"])
if "namespace" in metadata:
identifier = pulumi.Output.from_input(metadata).apply(
lambda metadata: f"{metadata['namespace']}/{metadata['name']}")
identifier = pulumi.Output.all(metadata["namespace"], metadata["name"]).apply(
lambda x: f"{x[0]}/{x[1]}")
SharpEdgeMarshall marked this conversation as resolved.
Show resolved Hide resolved
if resource_prefix:
identifier = pulumi.Output.from_input(identifier).apply(
lambda identifier: f"{resource_prefix}-{identifier}")
Expand Down