how do i debug something like this? not much to go...
# golang
w
how do i debug something like this? not much to go on...
Copy code
Diagnostics:
  pulumi:pulumi:Stack (bos-staging):
    error: an unhandled error occurred: program exited with non-zero exit code: 2

    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x17 pc=0x10997a6]
    goroutine 754 [running]:
    reflect.(*rtype).Kind(...)
    	GOROOT/src/reflect/type.go:777
    reflect.convertOp(0x6efb760, 0x0, 0x109616d)
    	GOROOT/src/reflect/value.go:2423 +0x26
    reflect.Value.Convert(0x0, 0x0, 0x0, 0x8282080, 0x6efb760, 0x199, 0x11, 0x12)
    	GOROOT/src/reflect/value.go:2413 +0x8a
    <http://github.com/pulumi/pulumi/sdk/v2/go/pulumi.awaitInputs(0x822f700|github.com/pulumi/pulumi/sdk/v2/go/pulumi.awaitInputs(0x822f700>, 0xc0000400b8, 0x6ed4580, 0xc0000e55e0, 0x94, 0x6efb760, 0xc0004996b0, 0x199, 0x8280000, 0x0, ...)
    	external/com_github_pulumi_pulumi_sdk_v2/go/pulumi/types.go:700 +0x83f
    <http://github.com/pulumi/pulumi/sdk/v2/go/pulumi.awaitInputs(0x822f700|github.com/pulumi/pulumi/sdk/v2/go/pulumi.awaitInputs(0x822f700>, 0xc0000400b8, 0x6fd7780, 0xc0000e5580, 0x99, 0x6faf420, 0xc0000f9f20, 0x199, 0xc000040000, 0x0, ...)
    	external/com_github_pulumi_pulumi_sdk_v2/go/pulumi/types.go:646 +0xdbf
    <http://github.com/pulumi/pulumi/sdk/v2/go/pulumi.toOutputWithContext.func1(0x6fd7780|github.com/pulumi/pulumi/sdk/v2/go/pulumi.toOutputWithContext.func1(0x6fd7780>, 0xc0000e5580, 0x82465c0, 0xc0002e2700, 0x8282080, 0x6faf420, 0x822f700, 0xc0000400b8, 0x105b700)
    	external/com_github_pulumi_pulumi_sdk_v2/go/pulumi/types.go:738 +0x147
    created by <http://github.com/pulumi/pulumi/sdk/v2/go/pulumi.toOutputWithContext|github.com/pulumi/pulumi/sdk/v2/go/pulumi.toOutputWithContext>
    	external/com_github_pulumi_pulumi_sdk_v2/go/pulumi/types.go:730 +0x1e8
l
what version of the pulumi go SDK are you using?
w
v2.10.2
l
Can you share your code? It looks like this is probably an apply/all call triggering this?
w
it's a large-ish monolithic project so not comfortable sending the whole codebase, but id be happy to hop on a call?
actually i narrowed it down, i may have found a bug (if you can call it that) with the k8s lib hopping on a meeting now-- then i'll post details and tell me if you think it's a 🐛
👍 1
ok here's the issue (very minimal example)
Copy code
func Deployment(ctx *pulumi.Context, strategy *appsv1.DeploymentStrategyArgs) {
	args := &appsv1.DeploymentArgs{
		Metadata: metav1.ObjectMetaArgs{
			// fields omitted
		},
		Spec: &appsv1.DeploymentSpecArgs{
			// other fields omitted
			Strategy: appsv1.DeploymentStrategyPtr(strategy),
		},
	}

	_, _ = appsv1.NewDeployment(ctx, "deploy", args)
}
when passing in
nil
strategy, i was seeing the issue above fixed by checking for
if strategy == nil
rather than using the
appsv1.DeploymentStrategyPtr
helper seems like a bug-- i would've expected the
appsv1.DeploymentStrategyPtr
helper to handle nils?
l
Would you mind opening an issue?