pulumi / pulumi-aws

An Amazon Web Services (AWS) Pulumi resource package, providing multi-language access to AWS
Apache License 2.0
449 stars 155 forks source link

FLAKE: TestAccWebserverPy/webserver-py #4010

Open t0yv0 opened 3 months ago

t0yv0 commented 3 months ago
❌ TestAccWebserverPy/webserver-py (42.82s)
      program.go:1946: sample: /home/runner/work/pulumi-aws/pulumi-aws/examples/webserver-py
      program.go:1951: pulumi: /usr/local/bin/pulumi
      command.go:46: **** Invoke '/opt/hostedtoolcache/Python/3.11.8/x64/bin/python3 -m venv venv' in '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914'
      command.go:121: Command completed without output
      command.go:46: **** Invoke '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914/venv/bin/python -m pip install -r requirements.txt' in '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914'
      command.go:118: Wrote output to /tmp/p-it-fv-az1215--webserver--47088cae-3617947914/command-output/virtualenv-pip-install.20240531-164835.68fae.log
      command.go:46: **** Invoke '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914/venv/bin/python -m pip install -e /home/runner/work/pulumi-aws/pulumi-aws/sdk/python/bin' in '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914'
      command.go:118: Wrote output to /tmp/p-it-fv-az1215--webserver--47088cae-3617947914/command-output/virtualenv-pip-install-package.20240531-164843.6c330.log
      program.go:2096: projdir: /tmp/p-it-fv-az1215--webserver--47088cae-3617947914
      program.go:1336: Initializing project (dir /tmp/p-it-fv-az1215--webserver--47088cae-3617947914; stack p-it-fv-az1215--webserver--47088cae)
      command.go:46: **** Invoke '/usr/local/bin/pulumi login --cloud-url file:///tmp/TestAccWebserverPywebserver-py3817785819/001' in '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914'
      command.go:118: Wrote output to /tmp/p-it-fv-az1215--webserver--47088cae-3617947914/command-output/pulumi-login.20240531-164844.8063a.log
      command.go:46: **** Invoke '/usr/local/bin/pulumi stack init p-it-fv-az1215--webserver--47088cae' in '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914'
      command.go:118: Wrote output to /tmp/p-it-fv-az1215--webserver--47088cae-3617947914/command-output/pulumi-stack-init.20240531-164844.b2b1d.log
      command.go:46: **** Invoke '/usr/local/bin/pulumi config set-all --plaintext aws:region=us-west-2' in '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914'
      command.go:121: Command completed without output
      program.go:1503: Performing primary preview and update
      command.go:46: **** Invoke '/usr/local/bin/pulumi preview --non-interactive --diff' in '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914'
      command.go:118: Wrote output to /tmp/p-it-fv-az1215--webserver--47088cae-3617947914/command-output/pulumi-preview-initial.20240531-164850.3fc4b.log
      command.go:46: **** Invoke '/usr/local/bin/pulumi up --non-interactive --yes --skip-preview --event-log /tmp/p-it-fv-az1215--webserver--47088cae-events.json' in '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914'
      command.go:98: Invoke '/usr/local/bin/pulumi up --non-interactive --yes --skip-preview --event-log /tmp/p-it-fv-az1215--webserver--47088cae-events.json' failed: exit status 255
  Updating (p-it-fv-az1215--webserver--47088cae):

   +  pulumi:pulumi:Stack webserver-py-p-it-fv-az1215--webserver--47088cae creating (0s) 
  @ updating....
   +  pulumi:pulumi:Stack webserver-py-p-it-fv-az1215--webserver--47088cae creating (0s) warning: using pulumi-resource-aws from $PATH at /home/runner/work/pulumi-aws/pulumi-aws/bin/pulumi-resource-aws
  @ updating.....
   +  aws:ec2:DefaultSubnet py-web-default-subnet creating (0s) 
   +  aws:ec2:DefaultVpc py-web-default-vpc creating (0s) 
   +  aws:ec2:DefaultSubnet py-web-default-subnet created (0.63s) 
  @ updating....
   +  aws:ec2:DefaultVpc py-web-default-vpc created (1s) 
   +  aws:ec2:SecurityGroup py-web-secgrp creating (0s) 
  @ updating......
   +  aws:ec2:SecurityGroup py-web-secgrp created (2s) 
   +  aws:ec2:Instance web-server-www creating (0s) 
  @ updating....
   +  aws:ec2:Instance web-server-www creating (0s) error: 1 error occurred:
   +  aws:ec2:Instance web-server-www **creating failed** error: 1 error occurred:
   +  pulumi:pulumi:Stack webserver-py-p-it-fv-az1215--webserver--47088cae creating (7s) error: update failed
   +  pulumi:pulumi:Stack webserver-py-p-it-fv-az1215--webserver--47088cae **creating failed** 1 error; 1 warning
  Diagnostics:
    aws:ec2:Instance (web-server-www):
      error: 1 error occurred:
        * creating EC2 Instance: IdempotentParameterMismatch: Arguments on this idempotent request are inconsistent with arguments used in previous request(s).
        status code: 400, request id: 7541f889-859d-4188-bde1-bac4d196fa29

    pulumi:pulumi:Stack (webserver-py-p-it-fv-az1215--webserver--47088cae):
      warning: using pulumi-resource-aws from $PATH at /home/runner/work/pulumi-aws/pulumi-aws/bin/pulumi-resource-aws
      error: update failed

  Resources:
      + 4 created

  Duration: 8s

      command.go:118: Wrote output to /tmp/p-it-fv-az1215--webserver--47088cae-3617947914/command-output/pulumi-update-initial.20240531-164858.81ee5.log
      program.go:1461: Destroying stack
      command.go:46: **** Invoke '/usr/local/bin/pulumi destroy --non-interactive --yes --skip-preview' in '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914'
      command.go:118: Wrote output to /tmp/p-it-fv-az1215--webserver--47088cae-3617947914/command-output/pulumi-destroy.20240531-164901.7b2a8.log
      command.go:46: **** Invoke '/usr/local/bin/pulumi stack rm --yes' in '/tmp/p-it-fv-az1215--webserver--47088cae-3617947914'
      command.go:118: Wrote output to /tmp/p-it-fv-az1215--webserver--47088cae-3617947914/command-output/pulumi-stack-rm.20240531-164901.9575c.log
      program.go:852: 
            Error Trace:    /home/runner/go/pkg/mod/github.com/pulumi/pulumi/pkg/v3@v3.116.1/testing/integration/program.go:852
                                        /home/runner/work/pulumi-aws/pulumi-aws/examples/examples_py_test.go:33
            Error:          Received unexpected error:
                            running test preview, update, and edits: initial failure: [/usr/local/bin/pulumi up --non-interactive --yes --skip-preview --event-log /tmp/p-it-fv-az1215--webserver--47088cae-events.json] did not succeed after 1 tries
            Test:           TestAccWebserverPy/webserver-py
flostadler commented 3 months ago

Another one (https://github.com/pulumi/pulumi-aws/issues/4042):

TestAccWebserverPy/webserver-py (38.48s)
      program.go:1946: sample: /home/runner/work/pulumi-aws/pulumi-aws/examples/webserver-py
      program.go:1951: pulumi: /usr/local/bin/pulumi
      command.go:46: **** Invoke '/opt/hostedtoolcache/Python/3.11.8/x64/bin/python3 -m venv venv' in '/tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513'
      command.go:121: Command completed without output
      command.go:46: **** Invoke '/tmp/p-it-fv-az525-4-webserver--f0170b35-[378](https://github.com/pulumi/pulumi-aws/actions/runs/9417098457/job/25943117567#step:25:384)9953513/venv/bin/python -m pip install -r requirements.txt' in '/tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513'
      command.go:118: Wrote output to /tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513/command-output/virtualenv-pip-install.20240607-133032.4eba0.log
      command.go:46: **** Invoke '/tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513/venv/bin/python -m pip install -e /home/runner/work/pulumi-aws/pulumi-aws/sdk/python/bin' in '/tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513'
      command.go:118: Wrote output to /tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513/command-output/virtualenv-pip-install-package.20240607-133036.d4e79.log
      program.go:2096: projdir: /tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513
      program.go:1336: Initializing project (dir /tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513; stack p-it-fv-az525-4-webserver--f0170b35)
      command.go:46: **** Invoke '/usr/local/bin/pulumi login --cloud-url file:///tmp/TestAccWebserverPywebserver-py544441756/001' in '/tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513'
      command.go:118: Wrote output to /tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513/command-output/pulumi-login.20240607-133037.f4ae8.log
      command.go:46: **** Invoke '/usr/local/bin/pulumi stack init p-it-fv-az525-4-webserver--f0170b35' in '/tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513'
      command.go:118: Wrote output to /tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513/command-output/pulumi-stack-init.20240607-133037.b2e90.log
      command.go:46: **** Invoke '/usr/local/bin/pulumi config set-all --plaintext aws:region=us-west-2' in '/tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513'
      command.go:121: Command completed without output
      program.go:1503: Performing primary preview and update
      command.go:46: **** Invoke '/usr/local/bin/pulumi preview --non-interactive --diff' in '/tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513'
      command.go:118: Wrote output to /tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513/command-output/pulumi-preview-initial.20240607-133046.33573.log
      command.go:46: **** Invoke '/usr/local/bin/pulumi up --non-interactive --yes --skip-preview --event-log /tmp/p-it-fv-az525-4-webserver--f0170b35-events.json' in '/tmp/p-it-fv-az525-4-webserver--f0170b35-3789953513'
      command.go:98: Invoke '/usr/local/bin/pulumi up --non-interactive --yes --skip-preview --event-log /tmp/p-it-fv-az525-4-webserver--f0170b35-events.json' failed: exit status 255
  Updating (p-it-fv-az525-4-webserver--f0170b35):

  @ updating....
   +  pulumi:pulumi:Stack webserver-py-p-it-fv-az525-4-webserver--f0170b35 creating (0s) 
   +  pulumi:pulumi:Stack webserver-py-p-it-fv-az525-4-webserver--f0170b35 creating (0s) warning: using pulumi-resource-aws from $PATH at /home/runner/work/pulumi-aws/pulumi-aws/bin/pulumi-resource-aws
  @ updating.....
   +  aws:ec2:DefaultSubnet py-web-default-subnet creating (0s) 
   +  aws:ec2:DefaultVpc py-web-default-vpc creating (0s) 
   +  aws:ec2:DefaultSubnet py-web-default-subnet created (0.25s) 
   +  aws:ec2:DefaultVpc py-web-default-vpc created (0.83s) 
   +  aws:ec2:SecurityGroup py-web-secgrp creating (0s) 
  @ updating.....
   +  aws:ec2:SecurityGroup py-web-secgrp created (1s) 
   +  aws:ec2:Instance web-server-www creating (0s) 
  @ updating....
   +  aws:ec2:Instance web-server-www creating (0s) error: 1 error occurred:
   +  aws:ec2:Instance web-server-www **creating failed** error: 1 error occurred:
   +  pulumi:pulumi:Stack webserver-py-p-it-fv-az525-4-webserver--f0170b35 creating (5s) error: update failed
   +  pulumi:pulumi:Stack webserver-py-p-it-fv-az525-4-webserver--f0170b35 **creating failed** 1 error; 1 warning
  Diagnostics:
    pulumi:pulumi:Stack (webserver-py-p-it-fv-az525-4-webserver--f0170b35):
      warning: using pulumi-resource-aws from $PATH at /home/runner/work/pulumi-aws/pulumi-aws/bin/pulumi-resource-aws
      error: update failed

    aws:ec2:Instance (web-server-www):
      error: 1 error occurred:
        * creating EC2 Instance: IdempotentParameterMismatch: Arguments on this idempotent request are inconsistent with arguments used in previous request(s).
        status code: [400](https://github.com/pulumi/pulumi-aws/actions/runs/9417098457/job/25943117567#step:25:406), request id: b8d805a7-f1cc-4a31-a081-46c748a7aca7
t0yv0 commented 3 months ago

From the docs:

If you retry a successful request using the same client token, but one or more of the parameters are different, other than the Region or Availability Zone, the retry fails with an IdempotentParameterMismatch error.

Looks like the error comes from here:

https://github.com/hashicorp/terraform-provider-aws/blob/master/internal/service/ec2/ec2_instance.go#L1038

Wonder if anything in the request is changing between retries.

t0yv0 commented 2 months ago
    aws:ec2:Instance (web-server-www):
      error: 1 error occurred:
        * creating urn:pulumi:p-it-fv-az661-2-webserver--7c1a7af5::webserver-py::aws:ec2/instance:Instance::web-server-www: 1 error occurred:
        * waiting for EC2 Instance (i-05244dfefe655df71) create: timeout while waiting for state to become 'running' (last state: 'pending', timeout: 10m0s)

    pulumi:pulumi:Stack (webserver-py-p-it-fv-az661-2-webserver--7c1a7af5):
      warning: using pulumi-resource-aws from $PATH at /home/runner/work/pulumi-aws/pulumi-aws/bin/pulumi-resource-aws
      error: update failed

  Resources:
      + 4 created

Another release needs restarting.