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

#713 Support autoscaling on EMR #2877

Merged
merged 5 commits into from
Feb 15, 2018
Merged

#713 Support autoscaling on EMR #2877

merged 5 commits into from
Feb 15, 2018

Conversation

darrenhaken
Copy link
Contributor

@darrenhaken darrenhaken commented Jan 5, 2018

Can someone review this?

@darrenhaken
Copy link
Contributor Author

This links to #713

@darrenhaken darrenhaken changed the title [WIP] Add autoscaling policy on EMR instance groups #713 [WIP] #713 Add autoscaling policy on EMR instance groups Jan 5, 2018
@darrenhaken darrenhaken changed the title [WIP] #713 Add autoscaling policy on EMR instance groups #713 Add autoscaling policy on EMR instance groups Jan 5, 2018
@darrenhaken
Copy link
Contributor Author

I have added the docs now so it should be good to merge in

@darrenhaken darrenhaken changed the title #713 Add autoscaling policy on EMR instance groups #713 Support autoscaling EMR Jan 5, 2018
@darrenhaken darrenhaken changed the title #713 Support autoscaling EMR #713 Support autoscaling on EMR Jan 5, 2018
@jen20 jen20 added enhancement Requests to existing resources that expand the functionality or scope. service/emr Issues and PRs that pertain to the emr service. labels Jan 6, 2018
@darrenhaken
Copy link
Contributor Author

@jen20 any idea when this might get reviewed?

@bflad
Copy link
Contributor

bflad commented Jan 10, 2018

Hi @darrenhaken, thanks for your work here. Due to the fast moving nature of the AWS SDK versions, we tend to prefer vendor/dependency changes in a separate PR to prevent rebase issues like the conflicts now in this PR. Can you please rebase so it doesn't include any vendor changes? The master branch has v1.12.57 right now.

@darrenhaken
Copy link
Contributor Author

@bflad should be fixed now, can you review the PR?

@darrenhaken
Copy link
Contributor Author

@bflad has this been reviewed yet? I'd like to get cracking on another PR.

@darrenhaken
Copy link
Contributor Author

@bflad any update on this? It's been around a month now and we'd really like this feature.

@darrenhaken
Copy link
Contributor Author

darrenhaken commented Feb 9, 2018

Does anyone have an update on this? To go a month without any feedback doesn't fill me with motivation to keep contributing to TF 👎

@bflad
Copy link
Contributor

bflad commented Feb 9, 2018

Hi @darrenhaken, this is my fault for dropping the ball here as you've been explicitly asking me for an update (rightfully since I asked you to change something). I'm really sorry about that. 😢 We have a lot going on in this repository and this got shuffled in with the various other issue/PR notifications.

I will give an actual review of this later today.

@bflad bflad self-requested a review February 9, 2018 18:30
@bflad bflad added this to the v1.10.0 milestone Feb 9, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

One minor change and rebase with the latest documentation, then LGTM. Thanks for the contribution and sorry for the delayed review.

=== RUN   TestAccAWSEMRCluster_terminationProtected
--- PASS: TestAccAWSEMRCluster_terminationProtected (387.41s)
=== RUN   TestAccAWSEMRCluster_bootstrap_ordering
--- PASS: TestAccAWSEMRCluster_bootstrap_ordering (432.28s)
=== RUN   TestAccAWSEMRCluster_security_config
--- PASS: TestAccAWSEMRCluster_security_config (442.92s)
=== RUN   TestAccAWSEMRCluster_basic
--- PASS: TestAccAWSEMRCluster_basic (525.40s)
=== RUN   TestAccAWSEMRCluster_instance_group
--- PASS: TestAccAWSEMRCluster_instance_group (532.58s)
=== RUN   TestAccAWSEMRCluster_custom_ami_id
--- PASS: TestAccAWSEMRCluster_custom_ami_id (623.71s)
=== RUN   TestAccAWSEMRCluster_s3Logging
--- PASS: TestAccAWSEMRCluster_s3Logging (634.92s)
=== RUN   TestAccAWSEMRCluster_visibleToAllUsers
--- PASS: TestAccAWSEMRCluster_visibleToAllUsers (773.45s)
=== RUN   TestAccAWSEMRCluster_root_volume_size
--- PASS: TestAccAWSEMRCluster_root_volume_size (969.56s)
=== RUN   TestAccAWSEMRCluster_tags
--- PASS: TestAccAWSEMRCluster_tags (1011.22s)

"autoscaling_policy": {
Type: schema.TypeString,
Optional: true,
DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs,
Copy link
Contributor

Choose a reason for hiding this comment

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

Despite the naming, suppressEquivalentAwsPolicyDiffs is currently only for IAM-type policy documents. In this case we'll likely be looking for this combination of attribute handlers:

DiffSuppressFunc: suppressEquivalentJsonDiffs,
ValidateFunc: validateJsonString,
StateFunc: func(v interface{}) string {
	json, _ := structure.NormalizeJsonString(v)
	return json
},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll make the change now

@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Feb 13, 2018
Copy link
Contributor Author

@darrenhaken darrenhaken left a comment

Choose a reason for hiding this comment

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

This should be resolved now, can you review it for me? I'll work on my next PR once we have this one through 👍

"autoscaling_policy": {
Type: schema.TypeString,
Optional: true,
DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll make the change now

@bflad
Copy link
Contributor

bflad commented Feb 13, 2018

Almost! make test is currently failing, https://travis-ci.org/terraform-providers/terraform-provider-aws/builds/340856573:

$ make test
==> Checking that code complies with gofmt requirements...
go test ./... -timeout=30s -parallel=4
# github.com/terraform-providers/terraform-provider-aws/aws
aws/resource_aws_emr_cluster.go:18:2: imported and not used: "github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/structure"
aws/resource_aws_emr_cluster.go:183:26: undefined: normalizeJsonString
# github.com/terraform-providers/terraform-provider-aws/aws
aws/resource_aws_emr_cluster.go:18:2: imported and not used: "github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/structure"
aws/resource_aws_emr_cluster.go:183:26: undefined: normalizeJsonString
make: *** [test] Error 2

Some of the active contributors/maintainers here like using goimports to automatically manage imports on file save. It has integrations with most editors. 😄

@darrenhaken
Copy link
Contributor Author

darrenhaken commented Feb 13, 2018

@bflad oops! Thanks for the tip on goimports.

It all looks to be passing now, can you review?

@bflad
Copy link
Contributor

bflad commented Feb 15, 2018

LGTM 🚀

Tests passed: 10
=== RUN   TestAccAWSEMRCluster_basic
--- PASS: TestAccAWSEMRCluster_basic (450.84s)
=== RUN   TestAccAWSEMRCluster_instance_group
--- PASS: TestAccAWSEMRCluster_instance_group (473.68s)
=== RUN   TestAccAWSEMRCluster_terminationProtected
--- PASS: TestAccAWSEMRCluster_terminationProtected (480.30s)
=== RUN   TestAccAWSEMRCluster_bootstrap_ordering
--- PASS: TestAccAWSEMRCluster_bootstrap_ordering (491.71s)
=== RUN   TestAccAWSEMRCluster_security_config
--- PASS: TestAccAWSEMRCluster_security_config (492.46s)
=== RUN   TestAccAWSEMRCluster_custom_ami_id
--- PASS: TestAccAWSEMRCluster_custom_ami_id (576.59s)
=== RUN   TestAccAWSEMRCluster_s3Logging
--- PASS: TestAccAWSEMRCluster_s3Logging (644.34s)
=== RUN   TestAccAWSEMRCluster_tags
--- PASS: TestAccAWSEMRCluster_tags (818.61s)
=== RUN   TestAccAWSEMRCluster_root_volume_size
--- PASS: TestAccAWSEMRCluster_root_volume_size (862.40s)
=== RUN   TestAccAWSEMRCluster_visibleToAllUsers
--- PASS: TestAccAWSEMRCluster_visibleToAllUsers (996.15s)

@bflad bflad merged commit 04efc1d into hashicorp:master Feb 15, 2018
bflad added a commit that referenced this pull request Feb 15, 2018
@bflad
Copy link
Contributor

bflad commented Feb 27, 2018

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

@ghost
Copy link

ghost commented Apr 7, 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 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/emr Issues and PRs that pertain to the emr service. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants