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

r/glue_partition - add new resource #12547

Merged
merged 16 commits into from
Oct 1, 2020

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Mar 26, 2020

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

Closes #3878

Release note for CHANGELOG:

resource_aws_glue_partition: add new resource

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSGluePartition_'
--- PASS: TestAccAWSGluePartition_basic (65.18s)
--- PASS: TestAccAWSGluePartition_parameters (166.56s)
--- PASS: TestAccAWSGluePartition_disappears (52.11s)
--- PASS: TestAccAWSGluePartition_multipleValues (66.00s)

@DrFaust92 DrFaust92 requested a review from a team March 26, 2020 22:52
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. size/XL Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. service/glue Issues and PRs that pertain to the glue service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Mar 26, 2020
@DrFaust92 DrFaust92 changed the title [WIP]r/glue_partition - add new resource r/glue_partition - add new resource Apr 27, 2020
@DrFaust92 DrFaust92 changed the title r/glue_partition - add new resource [wip]r/glue_partition - add new resource May 19, 2020
@DrFaust92 DrFaust92 changed the title [wip]r/glue_partition - add new resource [WIP]r/glue_partition - add new resource May 19, 2020
@ghost ghost added the documentation Introduces or discusses updates to documentation. label May 19, 2020
@DrFaust92 DrFaust92 changed the title [WIP]r/glue_partition - add new resource r/glue_partition - add new resource May 19, 2020
@DrFaust92 DrFaust92 added the new-resource Introduces a new resource. label May 22, 2020
@DrFaust92 DrFaust92 removed the needs-triage Waiting for first response or review from a maintainer. label Aug 23, 2020
@DrFaust92
Copy link
Collaborator Author

rebased and tested

return fmt.Errorf("error creating Glue Partition: %w", err)
}

d.SetId(fmt.Sprintf("%s:%s:%s:%s", catalogID, dbName, tableName, stringifyAwsGluePartition(values)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a create Glue partition ID function to parallel readAwsGluePartitionID.
There is also now precedent in moving these ID create/read functions to an internal/service package.
See e.g. aws/internal/service/ec2/id.go.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done.

Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM.

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSGluePartition_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGluePartition_ -timeout 120m
=== RUN   TestAccAWSGluePartition_basic
=== PAUSE TestAccAWSGluePartition_basic
=== RUN   TestAccAWSGluePartition_disappears
=== PAUSE TestAccAWSGluePartition_disappears
=== CONT  TestAccAWSGluePartition_basic
=== CONT  TestAccAWSGluePartition_disappears
    resource_aws_glue_partition_test.go:48: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSGluePartition_disappears (19.76s)
--- PASS: TestAccAWSGluePartition_basic (22.14s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	22.181s

@DrFaust92
Copy link
Collaborator Author

Rebased and revised tests a bit:

--- PASS: TestAccAWSGluePartition_basic (65.18s)
--- PASS: TestAccAWSGluePartition_parameters (166.56s)
--- PASS: TestAccAWSGluePartition_disappears (52.11s)
--- PASS: TestAccAWSGluePartition_multipleValues (66.00s)

Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM.

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSGluePartition_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGluePartition_ -timeout 120m
=== RUN   TestAccAWSGluePartition_basic
=== PAUSE TestAccAWSGluePartition_basic
=== RUN   TestAccAWSGluePartition_multipleValues
=== PAUSE TestAccAWSGluePartition_multipleValues
=== RUN   TestAccAWSGluePartition_parameters
=== PAUSE TestAccAWSGluePartition_parameters
=== RUN   TestAccAWSGluePartition_disappears
=== PAUSE TestAccAWSGluePartition_disappears
=== CONT  TestAccAWSGluePartition_basic
=== CONT  TestAccAWSGluePartition_disappears
=== CONT  TestAccAWSGluePartition_parameters
=== CONT  TestAccAWSGluePartition_multipleValues
=== CONT  TestAccAWSGluePartition_disappears
    resource_aws_glue_partition_test.go:126: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSGluePartition_disappears (26.79s)
--- PASS: TestAccAWSGluePartition_basic (30.38s)
--- PASS: TestAccAWSGluePartition_multipleValues (30.49s)
--- PASS: TestAccAWSGluePartition_parameters (59.75s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	59.790s

@breathingdust
Copy link
Member

LGTM! 🚀 Thanks @DrFaust92

Verified Acceptance Tests in Commercial (us-west-2)

make testacc TEST=./aws TESTARGS='-run=TestAccAWSGluePartition_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGluePartition_ -timeout 120m
=== RUN   TestAccAWSGluePartition_basic
=== PAUSE TestAccAWSGluePartition_basic
=== RUN   TestAccAWSGluePartition_multipleValues
=== PAUSE TestAccAWSGluePartition_multipleValues
=== RUN   TestAccAWSGluePartition_parameters
=== PAUSE TestAccAWSGluePartition_parameters
=== RUN   TestAccAWSGluePartition_disappears
=== PAUSE TestAccAWSGluePartition_disappears
=== CONT  TestAccAWSGluePartition_basic
=== CONT  TestAccAWSGluePartition_disappears
=== CONT  TestAccAWSGluePartition_multipleValues
=== CONT  TestAccAWSGluePartition_parameters
2020/10/01 11:46:14 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
=== CONT  TestAccAWSGluePartition_disappears
    resource_aws_glue_partition_test.go:126: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSGluePartition_disappears (16.69s)
--- PASS: TestAccAWSGluePartition_multipleValues (18.92s)
--- PASS: TestAccAWSGluePartition_basic (18.93s)
--- PASS: TestAccAWSGluePartition_parameters (43.35s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	45.203s

Verified Acceptance Tests in GovCloud (us-gov-west-1)

make testacc TEST=./aws TESTARGS='-run=TestAccAWSGluePartition_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSGluePartition_ -timeout 120m
=== RUN   TestAccAWSGluePartition_basic
=== PAUSE TestAccAWSGluePartition_basic
=== RUN   TestAccAWSGluePartition_multipleValues
=== PAUSE TestAccAWSGluePartition_multipleValues
=== RUN   TestAccAWSGluePartition_parameters
=== PAUSE TestAccAWSGluePartition_parameters
=== RUN   TestAccAWSGluePartition_disappears
=== PAUSE TestAccAWSGluePartition_disappears
=== CONT  TestAccAWSGluePartition_basic
=== CONT  TestAccAWSGluePartition_disappears
=== CONT  TestAccAWSGluePartition_multipleValues
=== CONT  TestAccAWSGluePartition_parameters
=== CONT  TestAccAWSGluePartition_disappears
    resource_aws_glue_partition_test.go:126: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSGluePartition_disappears (15.30s)
--- PASS: TestAccAWSGluePartition_basic (15.83s)
--- PASS: TestAccAWSGluePartition_multipleValues (15.97s)
--- PASS: TestAccAWSGluePartition_parameters (34.31s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	35.986s

@breathingdust breathingdust added this to the v3.9.0 milestone Oct 1, 2020
@breathingdust breathingdust merged commit 15c30c8 into hashicorp:master Oct 1, 2020
breathingdust added a commit that referenced this pull request Oct 1, 2020
@ghost
Copy link

ghost commented Oct 2, 2020

This has been released in version 3.9.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 Nov 1, 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 as resolved and limited conversation to collaborators Nov 1, 2020
@DrFaust92 DrFaust92 deleted the r/glue_part branch February 12, 2022 12:53
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. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/glue Issues and PRs that pertain to the glue service. size/XL 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.

Feature Request: Resource for managing AWS Glue Partitions
3 participants