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

Revert "change arg back to a TypeSet since it supports multiple values and order doesn't matter" #21404

Merged
merged 4 commits into from
Nov 11, 2021

Conversation

sylr
Copy link
Contributor

@sylr sylr commented Oct 20, 2021

This reverts commit eff2775.

Fixes #21203.
Relates #20532.

Original PR stated that the order of instance types did not matter but it absolutely does.

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/eks Issues and PRs that pertain to the eks service. size/XS Managed by automation to categorize the size of a PR. labels Oct 20, 2021
…s and order doesn't matter"

This reverts commit eff2775.
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 22, 2021
@sylr
Copy link
Contributor Author

sylr commented Nov 3, 2021

@ewbankkit could you please review this ?

@ewbankkit
Copy link
Contributor

The CloudFormation Resource Schema definition for AWS::EKS::Nodegroup contains

    "InstanceTypes": {
      "type": "array",
      "uniqueItems": false,
      "items": {
        "type": "string"
      }
    },

and as the default value of insertionOrder is true, the instance_types attribute should be TypeList.

@basert
Copy link

basert commented Nov 3, 2021

I think thats exactly what this MR tries to solve. It was changed to TypeSet in a previous release, this is the revert back to TypeList again.

@ewbankkit
Copy link
Contributor

Will wait for @anGie44 to take a look before merging.

@anGie44 anGie44 self-assigned this Nov 8, 2021
@anGie44 anGie44 added regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. bug Addresses a defect in current functionality. and removed enhancement Requests to existing resources that expand the functionality or scope. labels Nov 8, 2021
@anGie44 anGie44 added this to the v3.65.0 milestone Nov 10, 2021
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix @sylr 🚀 ! Preemptively approving while the acceptance tests finish running on our side.

@anGie44
Copy link
Contributor

anGie44 commented Nov 10, 2021

Just a heads up: i've come across a test failure pertaining to the order of instance_types configured vs. returned from the API (will investigate shortly)

------- Stdout: -------
=== RUN   TestAccEKSNodeGroup_InstanceTypes_multiple
=== PAUSE TestAccEKSNodeGroup_InstanceTypes_multiple
=== CONT  TestAccEKSNodeGroup_InstanceTypes_multiple
    node_group_test.go:285: Step 1/2 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        An execution plan has been generated and is shown below.
        Resource actions are indicated with the following symbols:
        -/+ destroy and then create replacement
        
        Terraform will perform the following actions:
        
          # aws_eks_node_group.test must be replaced
        -/+ resource "aws_eks_node_group" "test" {
              ~ ami_type               = "AL2_x86_64" -> (known after apply)
              ~ arn                    = "arn:aws:eks:us-west-2:*******:nodegroup/tf-acc-test-7522170719420147764/tf-acc-test-7522170719420147764/64be8539-e106-834b-23e2-55faaba1e52e" -> (known after apply)
              ~ capacity_type          = "ON_DEMAND" -> (known after apply)
              ~ disk_size              = 20 -> (known after apply)
              ~ id                     = "tf-acc-test-7522170719420147764:tf-acc-test-7522170719420147764" -> (known after apply)
              ~ instance_types         = [
                  - "t2.medium",
                    "t3.large",
                    "t3.medium",
                  + "t2.medium",
                    "t2.large",
                ]
              + node_group_name_prefix = (known after apply)
              ~ release_version        = "1.21.4-20211013" -> (known after apply)
              ~ resources              = [
                  - {
                      - autoscaling_groups              = [
                          - {
                              - name = "eks-tf-acc-test-7522170719420147764-64be8539-e106-834b-23e2-55faaba1e52e"
                            },
                        ]
                      - remote_access_security_group_id = ""
                    },
                ] -> (known after apply)
              ~ status                 = "ACTIVE" -> (known after apply)
              ~ tags_all               = {} -> (known after apply)
              ~ version                = "1.21" -> (known after apply)
                # (4 unchanged attributes hidden)
        
        
              ~ update_config {
                  ~ max_unavailable            = 1 -> (known after apply)
                  ~ max_unavailable_percentage = 0 -> (known after apply)
                }
                # (1 unchanged block hidden)
            }
        
        Plan: 1 to add, 0 to change, 1 to destroy.
    testing_new.go:70: Error running post-test destroy, there may be dangling resources: exit status 1
        
        Error: Error deleting VPC: DependencyViolation: The vpc 'vpc-0f0d760e484a322a4' has dependencies and cannot be deleted.
        	status code: 400, request id: 58925730-e376-40ea-86c7-01347bf2e1bc
        
        
--- FAIL: TestAccEKSNodeGroup_InstanceTypes_multiple (1534.42s)

@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/S Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Nov 11, 2021
@anGie44
Copy link
Contributor

anGie44 commented Nov 11, 2021

Confirming test is now passing with change:

--- PASS: TestAccEKSNodeGroup_InstanceTypes_multiple (1292.25s)

@anGie44 anGie44 merged commit cac775e into hashicorp:main Nov 11, 2021
@github-actions
Copy link

This functionality has been released in v3.65.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/eks Issues and PRs that pertain to the eks service. size/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_eks_node_group.instance_types not respecting order for instance_types
5 participants