pulumi-eks icon indicating copy to clipboard operation
pulumi-eks copied to clipboard

Cover EKS certificate authority being undefined with a test

Open t0yv0 opened this issue 1 year ago • 5 comments

Reference:

  • https://github.com/pulumi/pulumi-eks/issues/676
  • https://github.com/pulumi/pulumi-eks/pull/903

Engineering was not able to add tests due to high cost of eks.Cluster ProgramTest execution and no viable alternatives to test the logic out.

t0yv0 avatar Aug 22 '23 13:08 t0yv0

I think this issue is also likely an indicator of a bug in the AWS provider, so perhaps that could also be the place to have this test around the EKS Cluster lifecycle.

danielrbradley avatar Aug 22 '23 13:08 danielrbradley

Oh. Could you file that please? I'm not quite seeing it. You mean that a property that's marked "required output" is sometimes unknown?

t0yv0 avatar Aug 22 '23 13:08 t0yv0

Yup that's what #676 is tracking. We still don't have a full repro so my PR was just fixing the immediate mishandling of undefined. However, there's still more investigation to do but my initial hypothesis points back to AWS in this comment:

  • https://github.com/pulumi/pulumi-eks/issues/676#issuecomment-1688231424

danielrbradley avatar Aug 22 '23 14:08 danielrbradley

https://github.com/pulumi/pulumi-terraform-bridge/issues/1239 related perhaps. There's some more bridge issues I recall vaguely that don't guarantee that an output property is never nil.

t0yv0 avatar Aug 22 '23 14:08 t0yv0

Yes that might be relevant @t0yv0 - it's a computed list property. It's not set as optional, but perhaps is always kinda optional given the list could have zero elements?

Here's where we set the value. I'm unsure how the empty map will get serialized .. will this be removed and therefore be undefined?

https://github.com/pulumi/terraform-provider-aws/blob/225e17c8a683de1264a1e6d07e2ccc62852dead4/internal/service/eks/cluster.go#L908-L918

danielrbradley avatar Aug 22 '23 14:08 danielrbradley