You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Annotating parameters in a transformation function results in an error.
Errors & Logs
error: Program failed with an unhandled exception:
error: Traceback (most recent call last):
File "/usr/local/bin/pulumi-language-python-exec", line 85, in <module>
loop.run_until_complete(coro)
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "/Users/josh/code/lab/kube/venv/lib/python3.7/site-packages/pulumi/runtime/stack.py", line 81, in run_in_stack
await run_pulumi_func(lambda: Stack(func))
File "/Users/josh/code/lab/kube/venv/lib/python3.7/site-packages/pulumi/runtime/stack.py", line 34, in run_pulumi_func
func()
File "/Users/josh/code/lab/kube/venv/lib/python3.7/site-packages/pulumi/runtime/stack.py", line 81, in <lambda>
await run_pulumi_func(lambda: Stack(func))
File "/Users/josh/code/lab/kube/venv/lib/python3.7/site-packages/pulumi/runtime/stack.py", line 105, in __init__
func()
File "/usr/local/bin/pulumi-language-python-exec", line 84, in <lambda>
coro = pulumi.runtime.run_in_stack(lambda: runpy.run_path(args.PROGRAM, run_name='__main__'))
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 280, in run_path
run_name, mod_spec, pkg_name).copy()
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "./__main__.py", line 12, in <module>
metallb = lb.MetalLB("loadbalancer", lb.MetalLBProperties.from_config(lb_config))
File "./network/metallb.py", line 62, in __init__
transformations=[_add_namespace])
File "/Users/josh/code/lab/kube/venv/lib/python3.7/site-packages/pulumi_kubernetes/yaml.py", line 69, in __init__
self.resources = _parse_yaml_document(__ret__, opts, transformations, resource_prefix)
File "/Users/josh/code/lab/kube/venv/lib/python3.7/site-packages/pulumi_kubernetes/yaml.py", line 122, in _parse_yaml_document
file_objects = _parse_yaml_object(obj, opts, transformations, resource_prefix)
File "/Users/josh/code/lab/kube/venv/lib/python3.7/site-packages/pulumi_kubernetes/yaml.py", line 150, in _parse_yaml_object
if len(getargspec(t)[0]) == 2:
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py", line 1082, in getargspec
raise ValueError("Function has keyword-only parameters or annotations"
ValueError: Function has keyword-only parameters or annotations, use getfullargspec() API which can support them
error: an unhandled error occurred: Program exited with non-zero exit code: 1
Affected product version(s)
pulumi-vault==2.2.0
Reproducing the issue
The issue can be reproduced by creating a transformation function and annotating the type as seen below:
I'm not familiar with what is going on under the hood, and I understand that the type annotation, in this case, isn't necessarily required, but it seems like a resolvable bug given the descriptive help message given at the end.
The text was updated successfully, but these errors were encountered:
Problem description
Annotating parameters in a transformation function results in an error.
Errors & Logs
Affected product version(s)
pulumi-vault==2.2.0
Reproducing the issue
The issue can be reproduced by creating a transformation function and annotating the type as seen below:
And then used somewhere as is shown below:
Removing the
Any
annotation resolves the issue.Suggestions for a fix
I'm not familiar with what is going on under the hood, and I understand that the type annotation, in this case, isn't necessarily required, but it seems like a resolvable bug given the descriptive help message given at the end.
The text was updated successfully, but these errors were encountered: