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

Updates ECS capacity providers #11279

Merged
merged 2 commits into from
Dec 13, 2019
Merged

Conversation

gdavison
Copy link
Contributor

A handful of updates to the ECS cluster capacity provider feature.

  • Removes ordering from capacity_providers on cluster.
  • Allows more than one default_capacity_provider_strategy entry on cluster.
  • Allows retry on cluster deletion when update is in progress.
  • Adds tests for multiple capacity providers and capacity provider strategies

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 #11151

Release note for CHANGELOG:

NONE

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWS\(EcsCluster\|EcsService\)_'

--- PASS: TestAccAWSEcsCapacityProvider_ManagedScalingPartial (42.92s)
--- PASS: TestAccAWSEcsCapacityProvider_basic (52.06s)
--- PASS: TestAccAWSEcsCapacityProvider_ManagedScaling (53.15s)
--- PASS: TestAccAWSEcsCapacityProvider_Tags (87.74s)
--- PASS: TestAccAWSEcsCluster_disappears (13.17s)
--- PASS: TestAccAWSEcsCluster_basic (16.83s)
--- PASS: TestAccAWSEcsCluster_containerInsights (37.46s)
--- PASS: TestAccAWSEcsCluster_Tags (40.02s)
--- PASS: TestAccAWSEcsCluster_CapacityProviders (41.82s)
--- PASS: TestAccAWSEcsCluster_CapacityProvidersUpdate (45.30s)
--- PASS: TestAccAWSEcsCluster_SingleCapacityProvider (81.06s)
--- PASS: TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration (90.58s)
--- PASS: TestAccAWSEcsService_withFamilyAndRevision (74.65s)
--- PASS: TestAccAWSEcsService_withDeploymentValues (52.48s)
--- PASS: TestAccAWSEcsService_withLaunchTypeFargateAndPlatformVersion (127.47s)
--- PASS: TestAccAWSEcsService_withLaunchTypeFargate (136.79s)
--- PASS: TestAccAWSEcsService_disappears (62.31s)
--- PASS: TestAccAWSEcsService_withMultipleCapacityProviderStrategies (97.07s)
--- PASS: TestAccAWSEcsService_withRenamedCluster (142.38s)
--- PASS: TestAccAWSEcsService_basicImport (66.47s)
--- PASS: TestAccAWSEcsService_withUnnormalizedPlacementStrategy (72.07s)
--- PASS: TestAccAWSEcsService_withServiceRegistries_container (172.25s)
--- PASS: TestAccAWSEcsService_withServiceRegistries (172.26s)
--- PASS: TestAccAWSEcsService_withCapacityProviderStrategy (174.16s)
--- PASS: TestAccAWSEcsService_withIamRole (135.06s)
--- PASS: TestAccAWSEcsService_withLbChanges (229.95s)
--- PASS: TestAccAWSEcsService_withPlacementStrategy (240.13s)
--- PASS: TestAccAWSEcsService_withAlb (260.14s)
--- PASS: TestAccAWSEcsService_withDeploymentController_Type_CodeDeploy (196.20s)
--- PASS: TestAccAWSEcsService_withMultipleTargetGroups (261.46s)
--- PASS: TestAccAWSEcsService_healthCheckGracePeriodSeconds (262.02s)
--- PASS: TestAccAWSEcsService_Tags (59.62s)
--- PASS: TestAccAWSEcsService_ManagedTags (64.34s)
--- PASS: TestAccAWSEcsService_PropagateTags (194.36s)

* Removes ordering from `capacity_providers` on cluster.
* Allows more than one `default_capacity_provider_strategy` entry on cluster.
* Allows retry on cluster deletion when update is in progress.
* Adds tests for multiple capacity providers and capacity provider strategies
@gdavison gdavison requested a review from a team December 13, 2019 07:48
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/ecs Issues and PRs that pertain to the ecs service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 13, 2019
@ryndaniels ryndaniels removed the needs-triage Waiting for first response or review from a maintainer. label Dec 13, 2019
Copy link
Contributor

@ryndaniels ryndaniels left a comment

Choose a reason for hiding this comment

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

LGTM from 👀 , however I keep seeing this test failure which you didn't get locally, probably worth looking into:

--- FAIL: TestAccAWSEcsCluster_CapacityProvidersUpdate (26.05s)
    testing.go:635: Step 2 error: errors during apply:
        
        Error: error changing ECS cluster capacity provider settings (arn:aws:ecs:us-west-2:*******:cluster/tf-acc-test-1227245030962262513): ClientException: Cluster was not ACTIVE.
        	status code: 400, request id: b6cf25c3-7d49-4fad-876d-387b2c2a688b

Test output:

--- PASS: TestAccAWSEcsCapacityProvider_ManagedScalingPartial (38.33s)
--- PASS: TestAccAWSEcsCapacityProvider_ManagedScaling (39.32s)
--- PASS: TestAccAWSEcsCapacityProvider_basic (39.43s)
--- PASS: TestAccAWSEcsCapacityProvider_Tags (44.90s)

--- PASS: TestAccAWSEcsCluster_disappears (7.58s)
--- PASS: TestAccAWSEcsCluster_basic (9.86s)
--- PASS: TestAccAWSEcsCluster_containerInsights (17.52s)
--- PASS: TestAccAWSEcsCluster_Tags (18.80s)
--- FAIL: TestAccAWSEcsCluster_CapacityProvidersUpdate (27.46s)
--- PASS: TestAccAWSEcsCluster_CapacityProviders (28.75s)
--- PASS: TestAccAWSEcsCluster_SingleCapacityProvider (45.63s)

--- PASS: TestAccAWSEcsService_withIamRole (31.74s)
--- PASS: TestAccAWSEcsService_withLbChanges (51.11s)
--- PASS: TestAccAWSEcsService_disappears (56.25s)
--- PASS: TestAccAWSEcsService_withEcsClusterName (61.93s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints_emptyExpression (70.16s)
--- PASS: TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred (72.09s)
--- PASS: TestAccAWSEcsService_withDeploymentValues (72.33s)
--- PASS: TestAccAWSEcsService_basicImport (73.16s)
--- PASS: TestAccAWSEcsService_withARN (77.21s)
--- PASS: TestAccAWSEcsService_withFamilyAndRevision (77.34s)
--- PASS: TestAccAWSEcsService_withUnnormalizedPlacementStrategy (82.20s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints (83.05s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategy (32.70s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum (42.63s)
--- PASS: TestAccAWSEcsService_withRenamedCluster (112.97s)
--- PASS: TestAccAWSEcsService_withMultipleCapacityProviderStrategies (119.79s)
--- PASS: TestAccAWSEcsService_withReplicaSchedulingStrategy (62.67s)
--- PASS: TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration (83.41s)
--- PASS: TestAccAWSEcsService_withLaunchTypeFargate (109.60s)
--- PASS: TestAccAWSEcsService_ManagedTags (72.66s)
--- PASS: TestAccAWSEcsService_withLaunchTypeFargateAndPlatformVersion (100.53s)
--- PASS: TestAccAWSEcsService_Tags (74.90s)
--- PASS: TestAccAWSEcsService_withCapacityProviderStrategy (177.41s)
--- PASS: TestAccAWSEcsService_withServiceRegistries (132.03s)
--- PASS: TestAccAWSEcsService_withServiceRegistries_container (131.72s)
--- PASS: TestAccAWSEcsService_withPlacementStrategy (232.59s)
--- PASS: TestAccAWSEcsService_PropagateTags (153.99s)
--- PASS: TestAccAWSEcsService_withAlb (239.11s)
--- PASS: TestAccAWSEcsService_withMultipleTargetGroups (261.28s)
--- PASS: TestAccAWSEcsService_withDeploymentController_Type_CodeDeploy (269.26s)
--- PASS: TestAccAWSEcsService_healthCheckGracePeriodSeconds (427.39s)

aws/resource_aws_ecs_cluster_test.go Outdated Show resolved Hide resolved
aws/resource_aws_ecs_cluster_test.go Outdated Show resolved Hide resolved
@ghost ghost added size/L Managed by automation to categorize the size of a PR. and removed size/XL Managed by automation to categorize the size of a PR. labels Dec 13, 2019
@gdavison gdavison merged commit 043f34d into master Dec 13, 2019
@gdavison gdavison deleted the f-ecs-capacity-provider-updates branch December 13, 2019 18:55
@gdavison gdavison added this to the v2.42.0 milestone Dec 13, 2019
@ghost
Copy link

ghost commented Dec 13, 2019

This has been released in version 2.42.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 for triage. Thanks!

@ghost
Copy link

ghost commented Mar 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/ecs Issues and PRs that pertain to the ecs service. size/L 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.

3 participants