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

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

Closed
csssuf opened this issue Jun 7, 2021 · 6 comments
Closed
Assignees
Labels
emergent An issue that was added to the current milestone after planning kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Milestone

Comments

@csssuf
Copy link
Contributor

csssuf commented Jun 7, 2021

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
@csssuf csssuf added the kind/bug Some behavior is incorrect or out of spec label Jun 7, 2021
@jeid64
Copy link

jeid64 commented Jun 8, 2021

@lukehoban your PR may have broken ConfigGroup in this provider

@lukehoban lukehoban self-assigned this Jun 8, 2021
@lukehoban lukehoban added the p1 A bug severe enough to be the next item assigned to an engineer label Jun 8, 2021
@lukehoban lukehoban added this to the 0.58 milestone Jun 8, 2021
@lblackstone
Copy link
Member

I just noticed that this is also causing k8s CI tests to fail: https://github.com/pulumi/pulumi-kubernetes/pull/1603/checks?check_run_id=2777986718#step:26:2492

It looks like we're not running nightly tests for some reason, so I'm not sure exactly when this regressed.

@lblackstone
Copy link
Member

@lukehoban Do you know if this will be a quick fix, or should I pin the pulumi dependency to v3.3.1 in the Python SDK for now?

@lblackstone lblackstone added the emergent An issue that was added to the current milestone after planning label Jun 8, 2021
@lukehoban
Copy link
Member

Do you know if this will be a quick fix, or should I pin the pulumi dependency to v3.3.1 in the Python SDK for now?

Pinning the dependency for now makes sense. I'll look into the underlying issue to see if we can get that addressed as well.

It looks like we're not running nightly tests for some reason, so I'm not sure exactly when this regressed.

Lets open an issue to track getting these tests running again.

@lblackstone
Copy link
Member

lblackstone commented 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

@lukehoban
Copy link
Member

The Kubernetes issues is fixed in 3.3.1, and the underlying issue is fixed in pulumi/pulumi#7252.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emergent An issue that was added to the current milestone after planning kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

4 participants