Hi, getting a panic when trying to destroy stack: ...
# general
i
Hi, getting a panic when trying to destroy stack:
Copy code
pulumi:pulumi:Stack  pubsub-service-pubsub-staging-shared           debug: Setting AWS metadata API timeout to 100ms

panic: fatal: An assertion has failed

goroutine 187 [running]:
<http://github.com/pulumi/pulumi/pkg/util/contract.failfast(...)|github.com/pulumi/pulumi/pkg/util/contract.failfast(...)>
        /private/tmp/pulumi-20190913-17277-15zhmar/src/github.com/pulumi/pulumi/pkg/util/contract/failfast.go:23
<http://github.com/pulumi/pulumi/pkg/util/contract.Assert(...)|github.com/pulumi/pulumi/pkg/util/contract.Assert(...)>
        /private/tmp/pulumi-20190913-17277-15zhmar/src/github.com/pulumi/pulumi/pkg/util/contract/assert.go:26
<http://github.com/pulumi/pulumi/pkg/resource/deploy.NewDeleteStep(0xc0010d0f00|github.com/pulumi/pulumi/pkg/resource/deploy.NewDeleteStep(0xc0010d0f00>, 0xc001234d00, 0xc001128850, 0x68)
        /private/tmp/pulumi-20190913-17277-15zhmar/src/github.com/pulumi/pulumi/pkg/resource/deploy/step.go:238 +0x261
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*stepGenerator).GenerateDeletes(0xc0005e25a0|github.com/pulumi/pulumi/pkg/resource/deploy.(*stepGenerator).GenerateDeletes(0xc0005e25a0>, 0xc0014bfc00, 0x2, 0x0)
        /private/tmp/pulumi-20190913-17277-15zhmar/src/github.com/pulumi/pulumi/pkg/resource/deploy/step_generator.go:551 +0x77d
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*planExecutor).Execute.func3(0xc0015d98c0|github.com/pulumi/pulumi/pkg/resource/deploy.(*planExecutor).Execute.func3(0xc0015d98c0>, 0xc000239be0, 0xc0006e58f0, 0x24c7aa0, 0xc0010c3f40, 0x24c7aa0, 0xc0010c3f00, 0x10000, 0x1, 0xc000761400)
        /private/tmp/pulumi-20190913-17277-15zhmar/src/github.com/pulumi/pulumi/pkg/resource/deploy/plan_executor.go:155 +0x3d5
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*planExecutor).Execute(0xc000239be0|github.com/pulumi/pulumi/pkg/resource/deploy.(*planExecutor).Execute(0xc000239be0>, 0x24c7aa0, 0xc0010c3f00, 0x24c7ea0, 0xc000af8000, 0x7fffffff, 0x10000, 0x1, 0x0, 0x0)
        /private/tmp/pulumi-20190913-17277-15zhmar/src/github.com/pulumi/pulumi/pkg/resource/deploy/plan_executor.go:192 +0x511
<http://github.com/pulumi/pulumi/pkg/resource/deploy.(*Plan).Execute(...)|github.com/pulumi/pulumi/pkg/resource/deploy.(*Plan).Execute(...)>
        /private/tmp/pulumi-20190913-17277-15zhmar/src/github.com/pulumi/pulumi/pkg/resource/deploy/plan.go:330
<http://github.com/pulumi/pulumi/pkg/engine.(*planResult).Walk.func1(0x24c7ea0|github.com/pulumi/pulumi/pkg/engine.(*planResult).Walk.func1(0x24c7ea0>, 0xc000af8000, 0xc001568160, 0x24c7aa0, 0xc0010c3f00, 0x20e5401, 0xc0006e58e0, 0xc0015d96e0)
        /private/tmp/pulumi-20190913-17277-15zhmar/src/github.com/pulumi/pulumi/pkg/engine/plan.go:182 +0x13b
created by <http://github.com/pulumi/pulumi/pkg/engine.(*planResult).Walk|github.com/pulumi/pulumi/pkg/engine.(*planResult).Walk>
        /private/tmp/pulumi-20190913-17277-15zhmar/src/github.com/pulumi/pulumi/pkg/engine/plan.go:173 +0x11b
Is that a known issue?
btw, it happened with 0.17.28. I then upgraded to 1.1.0 and still the same error
actually after the upgrade all
pulumi up
fail
w
Could you export your checkpoint and see if there is any resource whose
id
is
””
? Also, please do open an issue. This is definitely not expected.
actually after the upgrade all
pulumi up
fail
Could you include the error message you see in this case as well in an issue?
i
@white-balloon-205 No resources with empty ids…
Opened https://github.com/pulumi/pulumi/issues/3231 Not sure what else to include. I’m checking if that can be due to a custom tfgen built provider we use
w
If the assert exactly the same on 1.1.0? (Including line 238 in step.go) What is the assert on the update operation? If you can share your checkpoint in DM - that would help. Else if you can make absolutely sure there are no resources with
id
either missing or
””
?
i
@white-balloon-205 Sure. Shared in DM
Seems I found the issue. It was:
Copy code
const nodeSecurityGroup = aws.ec2.SecurityGroup.get(
      'defaultWorkerNode',
      someStackReference.outputs.workerSecurityGroupId
    )
The stack outputs didn’t have
workerSecurityGroupId
set. I think there should be an easier way to debug these. Panic and crash seems like inadequate here
m
Panic and crash seems like inadequate here
Definitely. We made some changes in August that were intended to address missing resources in `.get`: https://github.com/pulumi/pulumi/pull/3123
Notably, however, these changes do not look for an empty ID, which is what leads to the assert you're seeing.
I'll have to look into the exact behavior that occurs when attempting to read a security group with an empty ID. Hopefully the fix is straightforward.