<@U02J3T6A8LB> I got a deep Python related error. ...
# python
l
@echoing-dinner-19531 I got a deep Python related error. Here is my preview run failing: github.com/hardes-bv/iac-homelab-dns/…/90635136477 Erratic line in the source code: github.com/hardes-bv/iac-homelab-dns/blob/…/__main__.py#… The typing of that property in the generated SDK: github.com/pulumiverse/pulumi-scaleway/blob/…/_inputs.py#… I let NEO investigate and somewhere in its thinking, it came up with this:
Root Cause:
PolicyRuleArgs.project_ids
is annotated as
pulumi.Input[Optional[Sequence[pulumi.Input[str]]]]
. At runtime, this expands to a 4-argument
Union[Sequence[...], None, Awaitable[...], Output[None]]
. The Pulumi SDK's
_get_list_element_type()
function only handles 3-arg Input Unions — it doesn't unwrap the 4-arg
Optional[Input[...]]
pattern — so it throws
Unexpected type. Expected 'list' got 'typing.Union[...]'
.
Can you confirm?
👀 1
This looks like this issue: github.com/pulumi/pulumi/issues/17181
e
yeh looks similar, I'll see if we can repro in a conf test and fix
🙏🏼 1
No luck repro'ing yet, will poke some more today
👍🏼 1