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

Rewrite TypeSet checks with new helpers [Part 2] #13831

Merged
merged 2 commits into from
Jun 25, 2020
Merged

Conversation

appilon
Copy link
Contributor

@appilon appilon commented Jun 18, 2020

These checks have been rewritten using the new helpers which avoids using set hashes. The helpers have somewhat exhaustive unit tests so the hope is this can be merged in chunks without waiting on acceptance tests.

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 #13556
Release note for CHANGELOG:

NONE

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@appilon appilon requested a review from a team June 18, 2020 21:23
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. service/apigateway Issues and PRs that pertain to the apigateway service. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. service/applicationautoscaling service/appmesh Issues and PRs that pertain to the appmesh service. service/autoscaling Issues and PRs that pertain to the autoscaling service. service/cloudformation Issues and PRs that pertain to the cloudformation service. service/eks Issues and PRs that pertain to the eks service. service/route53resolver Issues and PRs that pertain to the route53resolver service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jun 18, 2020
@appilon appilon changed the base branch from master to td-remove-set-checks-1 June 22, 2020 20:50
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.

LGTM just a comment below!

Output of acceptance tests:

--- PASS: TestAccAWSAutoScalingGroup_serviceLinkedRoleARN (45.57s)
--- PASS: TestAccAWSAutoScalingGroup_namePrefix (50.87s)
--- PASS: TestAccAWSCloudFormationStack_dataSource_basic (63.79s)
--- PASS: TestAccAWSCloudFormationStack_dataSource_yaml (64.86s)
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (81.03s)
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (83.89s)
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (96.93s)
--- PASS: TestAccAWSAutoScalingGroup_emptyAvailabilityZones (54.51s)
--- PASS: TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier (85.40s)
--- PASS: TestAccAWSAutoScalingGroup_MaxInstanceLifetime (142.28s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate (85.37s)
--- PASS: TestAccAWSAutoScalingGroup_LaunchTemplate_IAMInstanceProfile (70.57s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate_update (107.25s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandAllocationStrategy (84.03s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandPercentageAboveBaseCapacity (48.30s)
--- PASS: TestAccAWSAutoScalingGroup_TargetGroupArns (205.61s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotAllocationStrategy (58.57s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotInstancePools (46.24s)
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (223.71s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_UpdateToZeroOnDemandBaseCapacity (89.31s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy (139.47s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_LaunchTemplateName (43.27s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandBaseCapacity (115.21s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_Version (45.27s)
--- PASS: TestAccAWSAutoScalingGroup_tags (259.26s)
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (260.94s)
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (262.39s)
--- PASS: TestAccAWSAutoScalingGroup_launchTempPartitionNum (43.75s)
--- PASS: TestAccAWSAutoscalingPolicy_TargetTrack_Predefined (40.13s)
--- PASS: TestAccAWSAutoscalingPolicy_SimpleScalingStepAdjustment (47.55s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_InstanceType (81.03s)
--- PASS: TestAccAWSAutoScalingGroup_basic (291.94s)
--- PASS: TestAccAWSAutoScalingGroup_initialLifecycleHook (294.30s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotMaxPrice (112.68s)
--- PASS: TestAccAWSCloudFormationStackSet_disappears (12.00s)
--- SKIP: TestAccAWSCloudFormationStackSet_Parameters_Default (0.00s)
--- SKIP: TestAccAWSCloudFormationStackSet_Parameters_NoEcho (0.00s)
--- PASS: TestAccAWSCloudFormationStackSet_basic (13.83s)
--- PASS: TestAccAWSAutoscalingPolicy_basic (80.38s)
--- PASS: TestAccAWSAutoscalingPolicy_disappears (77.43s)
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (321.76s)
--- PASS: TestAccAWSCloudFormationStackSet_AdministrationRoleArn (28.78s)
--- PASS: TestAccAWSCloudFormationStackSet_Description (30.13s)
--- PASS: TestAccAWSCloudFormationStackSet_Name (25.93s)
--- PASS: TestAccAWSCloudFormationStackSet_ExecutionRoleName (29.51s)
--- PASS: TestAccAWSCloudFormationStackSet_TemplateBody (30.75s)
--- PASS: TestAccAWSAutoscalingPolicy_zerovalue (79.07s)
--- PASS: TestAccAWSCloudFormationStackSet_TemplateUrl (30.94s)
--- PASS: TestAccAWSAutoscalingPolicy_TargetTrack_Custom (95.15s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_WeightedCapacity (134.72s)
--- PASS: TestAccAWSCloudFormationStackSet_Tags (61.33s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_disappears (12.73s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (372.54s)
--- PASS: TestAccAWSCloudFormationStack_basic (59.42s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError (8.99s)
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (374.92s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError (9.17s)
--- PASS: TestAccAWSCloudFormationStackSet_Parameters (71.94s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_basic (32.81s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings (34.56s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError (8.64s)
--- PASS: TestAccAWSCloudFormationStack_yaml (59.30s)
--- PASS: TestAccAWSCloudFormationStack_withTransform (45.20s)
--- PASS: TestAccAWSCloudFormationStack_disappears (63.24s)
--- PASS: TestAccAWSCognitoIdentityPool_basic (15.83s)
--- PASS: TestAccAWSCloudFormationStack_allAttributes (61.49s)
--- PASS: TestAccAWSCognitoUserPoolClient_basic (12.04s)
--- PASS: TestAccAWSCloudFormationStack_defaultParams (68.72s)
--- SKIP: TestAccAWSCognitoUserPoolDomain_custom (0.00s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (11.81s)
--- PASS: TestAccAWSCognitoIdentityPool_supportedLoginProviders (23.08s)
--- PASS: TestAccAWSCognitoIdentityPool_cognitoIdentityProviders (23.17s)
--- PASS: TestAccAWSCognitoUserPoolClient_disappears (11.51s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_withYaml (66.23s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (18.84s)
--- PASS: TestAccAWSCognitoIdentityPool_samlProviderArns (28.37s)
--- PASS: TestAccAWSCognitoUserPoolClient_RefreshTokenValidity (20.92s)
--- PASS: TestAccAWSCognitoIdentityPool_tags (24.63s)
--- PASS: TestAccAWSCognitoUserPool_basic (12.59s)
--- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfigurationAndPasswordPolicy (12.28s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (21.27s)
--- PASS: TestAccAWSCognitoUserPoolDomain_basic (17.52s)
--- PASS: TestAccAWSCognitoUserPool_withEmailVerificationMessage (18.04s)
--- PASS: TestAccAWSCognitoUserPool_withDeviceConfiguration (19.01s)
--- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration (24.50s)
--- SKIP: TestAccAWSCognitoUserPool_withEmailConfiguration (0.00s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_noUpdate (87.04s)
--- PASS: TestAccAWSCognitoUserPool_withAdvancedSecurityMode (25.65s)
--- PASS: TestAccAWSCognitoUserPoolClient_analyticsConfig (36.05s)
--- PASS: TestAccAWSAutoScalingGroup_suspendingProcesses (428.22s)
--- PASS: TestAccAWSCognitoUserPool_SmsAuthenticationMessage (18.09s)
--- PASS: TestAccAWSCognitoUserPool_MfaConfiguration_SoftwareTokenMfaConfiguration (23.68s)
--- PASS: TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfigurationToSoftwareTokenMfaConfiguration (32.86s)
--- PASS: TestAccAWSCognitoUserPool_SmsVerificationMessage (18.19s)
--- PASS: TestAccAWSCognitoUserPool_withAliasAttributes (18.40s)
--- PASS: TestAccAWSCognitoUserPool_withPasswordPolicy (17.87s)
--- PASS: TestAccAWSCloudFormationStack_withParams (114.47s)
--- PASS: TestAccAWSCognitoUserPool_withUsernameConfiguration (17.28s)
--- PASS: TestAccAWSCognitoUserPool_withTags (24.15s)
--- PASS: TestAccAWSCognitoUserPool_withVerificationMessageTemplate (16.93s)
--- PASS: TestAccAWSCognitoUserPool_withSchemaAttributes (18.13s)
--- PASS: TestAccAWSCognitoUserPool_MfaConfiguration_SoftwareTokenMfaConfigurationToSmsConfiguration (37.81s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams (117.96s)
--- PASS: TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfigurationAndSoftwareTokenMfaConfiguration (45.93s)
--- PASS: TestAccAWSCognitoIdentityPool_addingNewProviderKeepsOldProvider (73.70s)
--- PASS: TestAccAWSCognitoUserPool_SmsConfiguration (48.44s)
--- PASS: TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfiguration (57.78s)
--- PASS: TestAccAWSCognitoUserPool_SmsConfiguration_ExternalId (49.35s)
--- PASS: TestAccAWSCognitoUserPool_SmsConfiguration_SnsCallerArn (53.22s)
--- PASS: TestAccAWSCognitoUserPool_withLambdaConfig (45.14s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer_ToTargetGroup (476.50s)
--- PASS: TestAccAWSCognitoUserPool_update (41.99s)
--- PASS: TestAccAWSAutoScalingGroup_LoadBalancers (630.46s)

Following tests failed but are known errors with error messages unrelated to these changes:

  • Account...should have '...-Execution' role with trust relationship to Role ...
--- FAIL: TestAccAWSCloudFormationStackSetInstance_RetainStack (39.10s)
--- FAIL: TestAccAWSCloudFormationStackSetInstance_basic (36.55s)
--- FAIL: TestAccAWSCloudFormationStackSetInstance_disappears (39.12s)
--- FAIL: TestAccAWSCloudFormationStackSetInstance_ParameterOverrides (48.42s)
--- FAIL: TestAccAWSCognitoIdentityPool_openidConnectProviderArns (14.21s)
--- FAIL: TestAccAWSCloudFormationStackSetInstance_disappears_StackSet (35.89s)

Comment on lines +1010 to 1012
// TODO: TypeSet hash
testAccCheckAWSAutoScalingGroupInitialLifecycleHookExists(
"aws_autoscaling_group.bar", "initial_lifecycle_hook.391359060.name"),
Copy link
Contributor

Choose a reason for hiding this comment

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

should we still keep DisableBinaryDriver: true, to be able to support this check for the time being?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we could, I will switch it back

Copy link
Contributor

Choose a reason for hiding this comment

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

oh ok! wasn't sure if it would cause problems while running the tests in the binary driver testing environment in TC

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the test would just error if we switched to V2 of the SDK today is all. DisableBinaryDriver is not an option for V2 of the SDK, but keeping it set to true is a good breadcrumb for me (even with the TODO)

"developer_only_attribute": "false",
"mutable": "false",
"name": "email",
"number_attribute_constraints.#": "0",
Copy link
Contributor

@anGie44 anGie44 Jun 25, 2020

Choose a reason for hiding this comment

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

👏 didn't know these count checks were supported !

Base automatically changed from td-remove-set-checks-1 to master June 25, 2020 19:31
@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 Jun 25, 2020
@appilon appilon merged commit ccc40d4 into master Jun 25, 2020
@appilon appilon deleted the td-remove-set-checks-2 branch June 25, 2020 19:52
@ghost
Copy link

ghost commented Jul 26, 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 Jul 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/apigateway Issues and PRs that pertain to the apigateway service. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. service/appmesh Issues and PRs that pertain to the appmesh service. service/autoscaling Issues and PRs that pertain to the autoscaling service. service/cloudformation Issues and PRs that pertain to the cloudformation service. service/eks Issues and PRs that pertain to the eks service. service/route53resolver Issues and PRs that pertain to the route53resolver 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.

2 participants