Hey there :wave: I'm having a little trouble upgr...
# general
c
Hey there 👋 I'm having a little trouble upgrading
pulumi-aws
from 5 to 6. I've gone through the migration guide and none of the changes are applicable. But after I upgrade, and run
pulumi up
, I get a stack trace that ends with
AssertionError: Unexpected type. Expected 'list' got '<class 'str'>'
. I've added
-d
to try to see more, but I don't see the connection between any of the debug messages and my stack trace. What's the best way to debug this? Can anyone point me in the right direction? 🙏
Slightly more context, I'm going from the latest 5.* version to the earliest 6.* version, and see the above issue.
c
There are some definition changes on resources, so from your stack trace you might need to see if a resource parameters need updating.
c
Hi @cuddly-computer-18851, here's the full stack trace. It doesn't appear to point to anywhere in my resource definitions, making it challenging to debug:
Copy code
error: Program failed with an unhandled exception:
    Traceback (most recent call last):
      File "/home/amoffat/work/gmi-infra/.venv/lib/python3.10/site-packages/pulumi/runtime/rpc_manager.py", line 71, in rpc_wrapper
        result = await rpc
      File "/home/amoffat/work/gmi-infra/.venv/lib/python3.10/site-packages/pulumi/runtime/resource.py", line 1029, in do_register
        rpc.resolve_outputs(
      File "/home/amoffat/work/gmi-infra/.venv/lib/python3.10/site-packages/pulumi/runtime/rpc.py", line 1108, in resolve_outputs
        translated_value = translate_output_properties(
      File "/home/amoffat/work/gmi-infra/.venv/lib/python3.10/site-packages/pulumi/runtime/rpc.py", line 987, in translate_output_properties
        element_type = _get_list_element_type(typ)
      File "/home/amoffat/work/gmi-infra/.venv/lib/python3.10/site-packages/pulumi/runtime/rpc.py", line 162, in _get_list_element_type
        raise AssertionError(f"Unexpected type. Expected 'list' got '{typ}'")
    AssertionError: Unexpected type. Expected 'list' got '<class 'str'>'
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/home/amoffat/.pulumi/bin/pulumi-language-python-exec", line 197, in <module>
        loop.run_until_complete(coro)
      File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
        return future.result()
      File "/home/amoffat/work/gmi-infra/.venv/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 137, in run_in_stack
        await run_pulumi_func(lambda: Stack(func))
      File "/home/amoffat/work/gmi-infra/.venv/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 51, in run_pulumi_func
        await wait_for_rpcs()
      File "/home/amoffat/work/gmi-infra/.venv/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 83, in wait_for_rpcs
        raise exn from cause
      File "/home/amoffat/work/gmi-infra/.venv/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 75, in wait_for_rpcs
        await rpc_manager.rpcs.pop()
    AssertionError: Unexpected type. Expected 'list' got '<class 'str'>'
Are you aware of any techniques for debugging a pulumi stack trace like this? Should I export my stack and find the issue that way somehow?