question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`yaml.ConfigGroup` raises exception when run with Pulumi 3.4.0 under Python

See original GitHub issue

When running with Pulumi 3.4.0 on Python, trying to create a yaml.ConfigGroup fails with an exception in the ConfigGroup constructor. Downgrading to Pulumi 3.3.1 fixes the issue, which suggests pulumi/pulumi#7175 may be related.

Steps to reproduce

Create a ConfigGroup:

  1. __main__.py:
"""A Kubernetes Python Pulumi program"""

import pulumi
from pulumi_kubernetes.yaml import ConfigGroup

CONFIGS = [
    """
apiVersion: v1
kind: Namespace
metadata:
  name: java
    """.strip(),
    """
apiVersion: v1
kind: Namespace
metadata:
  name: chesterfield-kings
    """.strip(),
]

config_group = ConfigGroup("configs", yaml=CONFIGS)
  1. pulumi preview

Expected: The preview runs successfully and previews creating the two namespaces. Actual:

error: Program failed with an unhandled exception:
error: Traceback (most recent call last):
  File "/pulumi/bin/pulumi-language-python-exec", line 92, in <module>
    loop.run_until_complete(coro)
...
[long RPC stacktrace snipped]
...
  File "/usr/local/lib/python3.8/site-packages/pulumi/output.py", line 157, in run
    value = await self._future
  File "/usr/local/lib/python3.8/site-packages/pulumi/output.py", line 178, in run
    transformed: Input[U] = func(value)
  File "/usr/local/lib/python3.8/site-packages/pulumi_kubernetes/yaml.py", line 190, in <lambda>
    self.resources = pulumi.Output.all(resources, self.resources).apply(lambda x: {**x[0], **x[1]})
TypeError: 'list' object is not a mapping

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lukehobancommented, Jun 9, 2021

The Kubernetes issues is fixed in 3.3.1, and the underlying issue is fixed in https://github.com/pulumi/pulumi/issues/7252.

1reaction
lblackstonecommented, Jun 8, 2021

The v3.3.1 release is in progress with this hot fix, and I enabled nightly tests in #1604

Release is out now: https://github.com/pulumi/pulumi-kubernetes/releases/tag/v3.3.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

[sdk/python] Output.from_input({}) regression - returns ... - GitHub
The changes in #7175 introduced a regression where ... yaml.ConfigGroup raises exception when run with Pulumi 3.4.0 under Python ...
Read more >
kubernetes.yaml.ConfigGroup - Pulumi
Documentation for the kubernetes.yaml.ConfigGroup resource with examples, input properties, output properties, lookup functions, and supporting types.
Read more >
yaml - Go Packages
"github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/yaml" ... GetResource returns a resource defined by a built-in Kubernetes ...
Read more >
pulumi refresh targeting a yaml.ConfigFile or ... - Issues Antenna
A Pulumi resource provider for Kubernetes to manage API resources and workloads in running clusters. pulumi. 299 92 29 1101.
Read more >
Pulumi kubernetes ConfigGroup takes string, I only got Outputs
My problem is that the anycodings_pulumi yaml field in the code below only take anycodings_pulumi strings and I cannot figure a way to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found