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

resource/aws_ecs_service: Continue supporting replica deployment_minimum_healthy_percent = 0 and deployment_maximum_percent = 100 #6316

Merged
merged 1 commit into from
Nov 2, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Nov 1, 2018

This PR reverts some unexpected behaviors introduced by #6150 -- the defaults are safe to re-add as they match the API and previous resource schema.

Fixes #6315

Changes proposed in this pull request:

  • Cleanup handling of replica versus daemon in Create/Update
  • Add acceptance test for replica strategy with deployment minimum 0 and maximum 100
  • Switch TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum to resource.ParallelTest() to match other tests

Previously:

--- FAIL: TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred (8.16s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_ecs_service.test: 1 error occurred:
        	* aws_ecs_service.test: InvalidParameterException: Both maximumPercent and minimumHealthyPercent cannot be 100 as this will block deployments.

Output from acceptance testing:

--- PASS: TestAccAWSEcsService_withLaunchTypeFargate (248.39s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum (30.56s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints (15.64s)
--- PASS: TestAccAWSEcsService_disappears (20.72s)
--- PASS: TestAccAWSEcsService_withReplicaSchedulingStrategy (14.37s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategy (30.45s)
--- PASS: TestAccAWSEcsService_withUnnormalizedPlacementStrategy (30.86s)
--- PASS: TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred (30.93s)
--- PASS: TestAccAWSEcsService_basicImport (33.06s)
--- PASS: TestAccAWSEcsService_withFamilyAndRevision (36.79s)
--- PASS: TestAccAWSEcsService_withARN (38.20s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints_emptyExpression (40.93s)
--- PASS: TestAccAWSEcsService_withEcsClusterName (41.09s)
--- PASS: TestAccAWSEcsService_withDeploymentValues (41.43s)
--- PASS: TestAccAWSEcsService_withServiceRegistries_container (50.67s)
--- PASS: TestAccAWSEcsService_withServiceRegistries (52.10s)
--- PASS: TestAccAWSEcsService_withRenamedCluster (63.64s)
--- PASS: TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration (77.10s)
--- PASS: TestAccAWSEcsService_withPlacementStrategy (105.04s)
--- PASS: TestAccAWSEcsService_withIamRole (130.78s)
--- PASS: TestAccAWSEcsService_withLbChanges (218.96s)
--- PASS: TestAccAWSEcsService_withAlb (243.76s)
--- PASS: TestAccAWSEcsService_healthCheckGracePeriodSeconds (264.39s)

…mum_healthy_percent = 0

Previously:

```
--- FAIL: TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred (8.16s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_ecs_service.test: 1 error occurred:
        	* aws_ecs_service.test: InvalidParameterException: Both maximumPercent and minimumHealthyPercent cannot be 100 as this will block deployments.
```

Output from acceptance testing:

```
--- PASS: TestAccAWSEcsService_withLaunchTypeFargate (248.39s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum (30.56s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints (15.64s)
--- PASS: TestAccAWSEcsService_disappears (20.72s)
--- PASS: TestAccAWSEcsService_withReplicaSchedulingStrategy (14.37s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategy (30.45s)
--- PASS: TestAccAWSEcsService_withUnnormalizedPlacementStrategy (30.86s)
--- PASS: TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred (30.93s)
--- PASS: TestAccAWSEcsService_basicImport (33.06s)
--- PASS: TestAccAWSEcsService_withFamilyAndRevision (36.79s)
--- PASS: TestAccAWSEcsService_withARN (38.20s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints_emptyExpression (40.93s)
--- PASS: TestAccAWSEcsService_withEcsClusterName (41.09s)
--- PASS: TestAccAWSEcsService_withDeploymentValues (41.43s)
--- PASS: TestAccAWSEcsService_withServiceRegistries_container (50.67s)
--- PASS: TestAccAWSEcsService_withServiceRegistries (52.10s)
--- PASS: TestAccAWSEcsService_withRenamedCluster (63.64s)
--- PASS: TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration (77.10s)
--- PASS: TestAccAWSEcsService_withPlacementStrategy (105.04s)
--- PASS: TestAccAWSEcsService_withIamRole (130.78s)
--- PASS: TestAccAWSEcsService_withLbChanges (218.96s)
--- PASS: TestAccAWSEcsService_withAlb (243.76s)
--- PASS: TestAccAWSEcsService_healthCheckGracePeriodSeconds (264.39s)
```
@bflad bflad added bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/ecs Issues and PRs that pertain to the ecs service. labels Nov 1, 2018
@bflad bflad added this to the v1.43.0 milestone Nov 1, 2018
@bflad bflad requested a review from a team November 1, 2018 04:45
@ghost ghost added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 1, 2018
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

LGTM

@bflad bflad merged commit 77ef086 into master Nov 2, 2018
@bflad bflad deleted the b-aws_ecs_service-min-0 branch November 2, 2018 00:36
bflad added a commit that referenced this pull request Nov 2, 2018
@bflad
Copy link
Contributor Author

bflad commented Nov 7, 2018

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

@aodeniyide
Copy link

@bflad fantastic! Thank you for the quick release.

@ghost
Copy link

ghost commented Apr 2, 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 Apr 2, 2020
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. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/ecs Issues and PRs that pertain to the ecs service. size/M 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.

[regression in 1.42] aws_ecs_service min/max deployment percent error
3 participants