pulumiverse / pulumi-esxi-native

VMWare ESXi provider to provision VMs directly on an ESXi hypervisor without a need for vCenter or vSphere.
Apache License 2.0
6 stars 3 forks source link

Python example 01_simple_virtual_machine is not working (anymore) #42

Open gzeel opened 1 year ago

gzeel commented 1 year ago

Summary

I've tried to deploy a vm with you 01_simple_virtual_machine_python example. A few weeks a go it worked. When I want to try it again today it doesn't. I've tried it on MacOS and Debian (in WSL).

Diagnostics

1.0.0

    error: Program failed with an unhandled exception:
    Traceback (most recent call last):
      File "/opt/homebrew/bin/pulumi-language-python-exec", line 197, in <module>
        loop.run_until_complete(coro)
      File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
        return future.result()
               ^^^^^^^^^^^^^^^
      File "/Users/gerrit/Code/les-05/pulumi-esxi/venv/lib/python3.11/site-packages/pulumi/runtime/stack.py", line 137, in run_in_stack
        await run_pulumi_func(lambda: Stack(func))
      File "/Users/gerrit/Code/les-05/pulumi-esxi/venv/lib/python3.11/site-packages/pulumi/runtime/stack.py", line 51, in run_pulumi_func
        await wait_for_rpcs()
      File "/Users/gerrit/Code/les-05/pulumi-esxi/venv/lib/python3.11/site-packages/pulumi/runtime/stack.py", line 121, in wait_for_rpcs
        raise exception
      File "/Users/gerrit/Code/les-05/pulumi-esxi/venv/lib/python3.11/site-packages/pulumi/output.py", line 172, in run
        is_known = await self._is_known
                   ^^^^^^^^^^^^^^^^^^^^
      File "/Users/gerrit/Code/les-05/pulumi-esxi/venv/lib/python3.11/site-packages/pulumi/output.py", line 103, in is_value_known
        return await is_known and not contains_unknowns(await future)
               ^^^^^^^^^^^^^^
      File "/Users/gerrit/Code/les-05/pulumi-esxi/venv/lib/python3.11/site-packages/pulumi/runtime/resource.py", line 872, in do_register
        resolver = await prepare_resource(res, ty, custom, remote, props, opts, typ)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/gerrit/Code/les-05/pulumi-esxi/venv/lib/python3.11/site-packages/pulumi/runtime/resource.py", line 176, in prepare_resource
        serialized_props = await rpc.serialize_properties(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/gerrit/Code/les-05/pulumi-esxi/venv/lib/python3.11/site-packages/pulumi/runtime/rpc.py", line 209, in serialize_properties
        result = await serialize_property(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/gerrit/Code/les-05/pulumi-esxi/venv/lib/python3.11/site-packages/pulumi/runtime/rpc.py", line 562, in serialize_property
        raise ValueError(f"unexpected input of type {type(value).__name__}")
    ValueError: unexpected input of type _GenericAlias

As far as I can debug it is in the part:

network_interfaces=Sequence[NetworkInterfaceArgs(
                        virtual_network="default"
                    )])

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

TeRua commented 10 months ago

Try without Sequence.

network_interfaces=[NetworkInterfaceArgs(virtual_network="default")]

edmondshtogu commented 8 months ago

Hi @gzeel did you try the suggestion from @TeRua?

edmondshtogu commented 7 months ago

There is another chance that you might be using a different pulumi version from what I have used in the package https://github.com/pulumiverse/pulumi-esxi-native/blob/main/provider/go.mod#L9-L10

Can you share the version?