I'm getting an internal assertion thrown here: <ht...
# general
l
I'm getting an internal assertion thrown here: https://github.com/pulumi/pulumi/blob/8b516bb05434ca8c6dac94b76a5583e855ffd0b6/sdk/go/common/resource/plugin/provider_plugin.go#L808 (Actually, it's line 807 in the stack trace, but presumably either the URN or ID is empty..) This is in a brand new project/stack. Never been deployed. Any ideas on what I should be looking for?
This is reworked/refactored code, copied from existing projects which work. Undoubtedly an error in the reworking.. but a failing internal Pulumi assertion isn't something I've seen before, maybe someone else has seen this one and has a lead for me to follow?
e
😐 That is odd. I've never seen an empty URN before, ID I suppose could end up nil and we fail to check it. Do you have any Resource.get calls in your code?
l
Yes, though not sure which one is relevant. Is there a way to figure out what sort of resource might be involved?
Unfortunately it's difficult to determine any sort of flow here, because all the Pulumi code is invoked via nest.js, which is a dependency injection manager. There's no way (as far as I can tell) to figure out the order things happen in.
e
-v9 --logtostderr
and open an issue with the logs from that. Engineering can probably work out the problematic resource from log ordering then.
👍 1
l
Figured it out. The id was coming from a stack reference using
get
instead of
require
, and the source stack didn't exist.
The log hint sorted it for me. Raising an issue with the framework to prevent this happening again (we should use require if there's no error handling).
e
We really shouldn't have an internal error for that though. I'll see if we can validate IDs passed to get in the engine and give a proper diagnostic instead.