Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestExamples/ts-nlb-simple/upgrade-preview-only fails on CI #1114

Closed
t0yv0 opened this issue Oct 23, 2023 · 2 comments
Closed

TestExamples/ts-nlb-simple/upgrade-preview-only fails on CI #1114

t0yv0 opened this issue Oct 23, 2023 · 2 comments
Assignees
Labels
area/tests kind/engineering Work that is not visible to an external user resolution/fixed This issue was fixed

Comments

@t0yv0
Copy link
Member

t0yv0 commented Oct 23, 2023

What happened?

There is an issue with a replay-based provider upgrade test. It seems to pass for me locally but fails in CI. The failure reads something like this:

warning: using pulumi-resource-awsx from $PATH at /home/runner/work/pulumi-awsx/pulumi-awsx/bin/pulumi-resource-awsx
  warning: using pulumi-resource-awsx from $PATH at /home/runner/work/pulumi-awsx/pulumi-awsx/bin/pulumi-resource-awsx
    pulumi:pulumi:Stack: (same)
      [urn=urn:pulumi:p-it-fv-az491-5-ts-nlb-sim-b0cccd6e::ts-nlb-simple::pulumi:pulumi:Stack::ts-nlb-simple-p-it-fv-az491-5-ts-nlb-sim-b0cccd6e]
  warning: using pulumi-resource-awsx from $PATH at /home/runner/work/pulumi-awsx/pulumi-awsx/bin/pulumi-resource-awsx
          +-aws:lb/loadBalancer:LoadBalancer: (replace)
              [id=arn:aws:elasticloadbalancing:us-west-2:616138583583:loadbalancer/net/nginx-lb-c00afb4/821fc191ad125fbe]
              [urn=urn:pulumi:p-it-fv-az491-5-ts-nlb-sim-b0cccd6e::ts-nlb-simple::awsx:lb:NetworkLoadBalancer$aws:lb/loadBalancer:LoadBalancer::nginx-lb]
              [provider: urn:pulumi:p-it-fv-az491-5-ts-nlb-sim-b0cccd6e::ts-nlb-simple::pulumi:providers:aws::default_5_35_0::fcb88445-5634-43ad-9dd9-d9d032832b45 => urn:pulumi:p-it-fv-az491-5-ts-nlb-sim-b0cccd6e::ts-nlb-simple::pulumi:providers:aws::default_6_5_0::output<string>]
            ~ subnets: [
                ~ [0]: "subnet-0016572b" => "subnet-03711d3b9b21b3a8e"
                ~ [1]: "subnet-d7e7fe9c" => "subnet-06e8296c053e2b952"
                ~ [2]: "subnet-c7d926bf" => "subnet-0fc2dc8f8ba906919"
                ~ [3]: "subnet-43f43a1e" => "subnet-037f366816336db85"
              ]
          +-aws:lb/targetGroup:TargetGroup: (replace)
              [id=arn:aws:elasticloadbalancing:us-west-2:616138583583:targetgroup/nginx-lb-3cfc5c4/4f00a96b0fd82d3b]
              [urn=urn:pulumi:p-it-fv-az491-5-ts-nlb-sim-b0cccd6e::ts-nlb-simple::awsx:lb:NetworkLoadBalancer$aws:lb/targetGroup:TargetGroup::nginx-lb]
              [provider: urn:pulumi:p-it-fv-az491-5-ts-nlb-sim-b0cccd6e::ts-nlb-simple::pulumi:providers:aws::default_5_35_0::fcb88445-5634-43ad-9dd9-d9d032832b45 => urn:pulumi:p-it-fv-az491-5-ts-nlb-sim-b0cccd6e::ts-nlb-simple::pulumi:providers:aws::default_6_5_0::output<string>]
            ~ vpcId: "vpc-4b82e033" => "vpc-043be661de8760bec"
          +-aws:lb/listener:Listener: (replace)
              [id=arn:aws:elasticloadbalancing:us-west-2:616138583583:listener/net/nginx-lb-c00afb4/821fc191ad125fbe/8f5ee5491d839947]
              [urn=urn:pulumi:p-it-fv-az491-5-ts-nlb-sim-b0cccd6e::ts-nlb-simple::awsx:lb:NetworkLoadBalancer$aws:lb/listener:Listener::nginx-lb-0]
              [provider: urn:pulumi:p-it-fv-az491-5-ts-nlb-sim-b0cccd6e::ts-nlb-simple::pulumi:providers:aws::default_5_35_0::fcb88445-5634-43ad-9dd9-d9d032832b45 => urn:pulumi:p-it-fv-az491-5-ts-nlb-sim-b0cccd6e::ts-nlb-simple::pulumi:providers:aws::default_6_5_0::output<string>]
            ~ defaultActions : [
                ~ [0]: {
                        ~ targetGroupArn: "arn:aws:elasticloadbalancing:us-west-2:616138583583:targetgroup/nginx-lb-3cfc5c4/4f00a96b0fd82d3b" => output<string>
                      }
              ]
            ~ loadBalancerArn: "arn:aws:elasticloadbalancing:us-west-2:616138583583:loadbalancer/net/nginx-lb-c00afb4/821fc191ad125fbe" => output<string>
  Resources:
      +-3 to replace
      2 unchanged

Basically there is an unexpected replace plan on this simple program:

import * as awsx from "@pulumi/awsx";

// // Create a network load balancer.
const lb = new awsx.lb.NetworkLoadBalancer("nginx-lb");

Example

import * as awsx from "@pulumi/awsx";

// // Create a network load balancer.
const lb = new awsx.lb.NetworkLoadBalancer("nginx-lb");

Output of pulumi about

Locally I'm on 3.86.0.

Additional context

Could it be an issue with the program behaving differently on Mac OS vs Linux?

Could it be due to a Pulumi version difference?

Since the upgrade testing framework is very new, also cannot rule out some misconfigured test aspect.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@t0yv0 t0yv0 added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 23, 2023
@mikhailshilkov mikhailshilkov added area/tests kind/engineering Work that is not visible to an external user and removed kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 26, 2023
@danielrbradley
Copy link
Member

This is actually caused by the lb default behavour trying to use the private subnets from the default subnet in the current account. However, the account changes between recording locally and running in CI. We should avoid using default VPCs in upgrade tests and also avoid ever using invokes which return information related to the current environment.

@thomas11 thomas11 removed their assignment Feb 14, 2024
flostadler added a commit that referenced this issue May 14, 2024
Since August 23 NLBs support Security Groups as well now (see [AWS blog
post](https://aws.amazon.com/blogs/containers/network-load-balancers-now-support-security-groups/)).

This change adds the parameter for configuring security groups to the
NLB component. The one notable difference compared to the ALB component
is that I refrained from adding the default security group. For NLBs
security groups cannot be added if none are currently present, and
cannot all be removed once added. Adding a default security group to
NLBs would cause replacements during upgrades.

Fixes #1282

Also re-enabled the LB upgrade tests and re-recorded them. They were
failing because they were using invokes under the hood to get the
default subnet. Invokes are not compatible with upgrade tests because
they don't use the recorded calls and instead reach out to the cloud
instead.
Fixes #1265 &
#1114
@flostadler flostadler self-assigned this May 15, 2024
@flostadler flostadler added the resolution/fixed This issue was fixed label May 15, 2024
@t0yv0
Copy link
Member Author

t0yv0 commented May 16, 2024

Ah that's a good note. Super tricky. Perhaps we could avoid this just by being really systematic about only ever recording on CI (not locally), but I guess then again these recordings will not be useful for fast-testing locally. Very annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests kind/engineering Work that is not visible to an external user resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

5 participants