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

ConfigGroup throws NoneType error in python #2309

Closed
rshade opened this issue Feb 14, 2023 · 0 comments · Fixed by #2317
Closed

ConfigGroup throws NoneType error in python #2309

rshade opened this issue Feb 14, 2023 · 0 comments · Fixed by #2317
Assignees
Labels
customer/feedback Feedback from customers kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@rshade
Copy link
Contributor

rshade commented Feb 14, 2023

What happened?

Code:

rbac_yaml = files(".traefik").joinpath("traefik-rbac.yaml").read_text()
  crd_yaml = files(".traefik").joinpath("traefik-crd.yaml").read_text()

  self.traefik_k8s_setup = ConfigGroup(
      "traefik-config-files",
      yaml=[rbac_yaml, crd_yaml],
      opts=ResourceOptions.merge(parent_opts, ResourceOptions(depends_on=[self.namespace]))
  )

Error:

ConfigGroup(
      File "/Users/rshade//examples/standard-cluster/with-cni-custom-networking/venv/lib/python3.8/site-packages/pulumi_kubernetes/yaml/yaml.py", line 196, in __init__
        __ret__ = pulumi.runtime.invoke('kubernetes:yaml:decode', {'text': text}, invoke_opts).value['result']
    TypeError: 'NoneType' object is not subscriptable

Expected Behavior

Error not to be thrown.

Steps to reproduce

Working on an isolated repro

Output of pulumi about

pulumi_kubernetes 3.23.1

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@rshade rshade added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Feb 14, 2023
@mikhailshilkov mikhailshilkov added the customer/feedback Feedback from customers label Feb 15, 2023
@lblackstone lblackstone removed the needs-triage Needs attention from the triage team label Feb 16, 2023
@lblackstone lblackstone added this to the 0.85 milestone Feb 16, 2023
rshade added a commit that referenced this issue Feb 16, 2023
* Fix: Moving yaml_decode, and using it in ConfigGroup as well, Fixes #2309

* Chore: Updating changelog
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer/feedback Feedback from customers kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants