Hello! i'm getting the following error when using ...
# general
e
Hello! i'm getting the following error when using the experimental update plans:
Copy code
pulumi preview --save-plan plan.json
pulumi up --plan=plan.json
Previewing update (redacted/dev)



     Type                 Name             Plan        
     pulumi:pulumi:Stack  test-dev  running.    
panic: fatal: An assertion has failed

goroutine 77 [running]:
<http://github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.failfast(...)|github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.failfast(...)>
        /Users/runner/work/pulumi/pulumi/sdk/go/common/util/contract/failfast.go:23
<http://github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.Assert(...)|github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.Assert(...)>
        /Users/runner/work/pulumi/pulumi/sdk/go/common/util/contract/assert.go:26
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*ResourcePlan).checkGoal|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*ResourcePlan).checkGoal>(0x184ce40, 0xc0013d4700, 0xc0013d4700, 0x3d)
        /Users/runner/work/pulumi/pulumi/pkg/resource/deploy/plan.go:479 +0xf94
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*stepGenerator).generateSteps(0xc0006546c0|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*stepGenerator).generateSteps(0xc0006546c0>, {0x7f67304ac0b8, 0xc0025a0790})
        /Users/runner/work/pulumi/pulumi/pkg/resource/deploy/step_generator.go:471 +0x16cb
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*stepGenerator).GenerateSteps(0xc0006546c0|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*stepGenerator).GenerateSteps(0xc0006546c0>, {0x7f67304ac0b8, 0xc0025a0790})
        /Users/runner/work/pulumi/pulumi/pkg/resource/deploy/step_generator.go:186 +0x46
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).handleSingleEvent(0xc00063a2d0|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).handleSingleEvent(0xc00063a2d0>, {0x1e77f20, 0xc0025a0790})
        /Users/runner/work/pulumi/pulumi/pkg/resource/deploy/deployment_executor.go:413 +0xe5
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).Execute.func3(0xc00065a720|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).Execute.func3(0xc00065a720>, 0xc00063a2d0, 0xc0006462d0, {0x1ea9c50, 0xc000644400}, 0x0, 0x0, {0x1ea9cf8, 0xc00232e6c0})
        /Users/runner/work/pulumi/pulumi/pkg/resource/deploy/deployment_executor.go:250 +0x273
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).Execute(0xc00063a2d0|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*deploymentExecutor).Execute(0xc00063a2d0>, {0x1ea9cf8, 0xc00232e6c0}, {{0x7f6730403008, 0xc000bfcf20}, 0x7fffffff, 0x0, 0x0, {0x2cb4720, 0x0, ...}, ...}, ...)
        /Users/runner/work/pulumi/pulumi/pkg/resource/deploy/deployment_executor.go:266 +0x95f
<http://github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*Deployment).Execute(0xc0020dc420|github.com/pulumi/pulumi/pkg/v3/resource/deploy.(*Deployment).Execute(0xc0020dc420>, {0x1ea9cf8, 0xc00232e6c0}, {{0x7f6730403008, 0xc000bfcf20}, 0x7fffffff, 0x0, 0x0, {0x2cb4720, 0x0, ...}, ...}, ...)
        /Users/runner/work/pulumi/pulumi/pkg/resource/deploy/deployment.go:447 +0xd0
<http://github.com/pulumi/pulumi/pkg/v3/engine.(*deployment).run.func1()|github.com/pulumi/pulumi/pkg/v3/engine.(*deployment).run.func1()>
        /Users/runner/work/pulumi/pulumi/pkg/engine/deployment.go:269 +0x250
created by <http://github.com/pulumi/pulumi/pkg/v3/engine.(*deployment).run|github.com/pulumi/pulumi/pkg/v3/engine.(*deployment).run>
        /Users/runner/work/pulumi/pulumi/pkg/engine/deployment.go:252 +0x371
when i do a regular pulumi up on the same program (which i presume uses an internally generated plan file) it works fine. any idea why passing the plan file causes the assert failure? should i create a github issue?
e
Please create a github issue. If you've got a repro program that will really help but else the stack trace and if you can debug logs (add
--logtostderr -v9
to your pulumi command). That assert looks reasonable so something odd is happening.
e
i will create a github issue as I was able to reproduce. looks like the problem happens when you have a stackreference:
Copy code
import * as k8s from "@pulumi/kubernetes";
import * as kx from "@pulumi/kubernetesx";
import * as pulumi from "@pulumi/pulumi";

const gkeStack = new pulumi.StackReference("telushealth/gke/dev");
const appLabels = { app: "nginx" };
const deployment = new k8s.apps.v1.Deployment("nginx", {
    spec: {
        selector: { matchLabels: appLabels },
        replicas: 1,
        template: {
            metadata: { labels: appLabels },
            spec: { containers: [{ name: "nginx", image: "nginx" }] }
        }
    }
});
export const name = deployment.metadata.name;
here are the logs:
and plan.json file: