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

td/aws_connect_hours_of_operation #22375

Merged

Conversation

GlennChia
Copy link
Collaborator

@GlennChia GlennChia commented Dec 30, 2021

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

Description of changes

This PR makes 2 changes

  • Renames hours_of_operation_arn to just arn since the resource itself is already called aws_connect_hours_of_operation. Hence users just have to call aws_connect_hours_of_operation.example.arn to get the ARN instead of aws_connect_hours_of_operation.example.hours_of_operation_arn
  • Remove the timeouts which are unnecessary for this resource since timeouts were meant for the aws_connect_instance resource that has longer deployment time

Output from acceptance testing:

Test the resource:

$ make testacc TESTS=TestAccConnectHoursOfOperation_serial PKG=connect
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/connect/... -v -count 1 -parallel 20 -run='TestAccConnectHoursOfOperation_serial' -timeout 180m
=== RUN   TestAccConnectHoursOfOperation_serial
=== RUN   TestAccConnectHoursOfOperation_serial/basic
=== RUN   TestAccConnectHoursOfOperation_serial/disappears
--- PASS: TestAccConnectHoursOfOperation_serial (299.90s)
    --- PASS: TestAccConnectHoursOfOperation_serial/basic (190.13s)
    --- PASS: TestAccConnectHoursOfOperation_serial/disappears (109.78s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/connect    309.514s
...

Test the data source:

$ make testacc TESTS=TestAccConnectHoursOfOperationDataSource PKG=connect
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/connect/... -v -count 1 -parallel 20 -run='TestAccConnectHoursOfOperationDataSource' -timeout 180m
=== RUN   TestAccConnectHoursOfOperationDataSource_hoursOfOperationID
--- PASS: TestAccConnectHoursOfOperationDataSource_hoursOfOperationID (114.53s)
=== RUN   TestAccConnectHoursOfOperationDataSource_name
--- PASS: TestAccConnectHoursOfOperationDataSource_name (117.26s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/connect    242.203s
...

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/connect Issues and PRs that pertain to the connect service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. size/S Managed by automation to categorize the size of a PR. labels Dec 30, 2021
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Jan 1, 2022
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 12, 2022
Copy link
Collaborator

@AdamTylerLynch AdamTylerLynch left a comment

Choose a reason for hiding this comment

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

BREAKING CHANGE INCLUDED. @ewbankkit

LGTM 🚀

@ewbankkit ewbankkit added the breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. label Jan 24, 2022
@ewbankkit ewbankkit added this to the v4.0.0 milestone Jan 24, 2022
@ewbankkit ewbankkit changed the base branch from main to release/4.x January 24, 2022 18:05
@anGie44 anGie44 force-pushed the release/4.x branch 8 times, most recently from e1f74b5 to 585486e Compare January 31, 2022 20:08
@anGie44 anGie44 deleted the branch hashicorp:main January 31, 2022 23:00
@anGie44 anGie44 closed this Jan 31, 2022
@GlennChia
Copy link
Collaborator Author

GlennChia commented Feb 2, 2022

Is it possible to help re-open this PR and change the destination branch to main? Seems like the release/4.x branch is deleted. Thanks!

@anGie44 anGie44 reopened this Feb 2, 2022
@anGie44
Copy link
Contributor

anGie44 commented Feb 2, 2022

Hi @GlennChia , apologies for that! I've restored the release/4.x branch and will update the base branch

@anGie44 anGie44 changed the base branch from release/4.x to main February 2, 2022 15:23
@GlennChia
Copy link
Collaborator Author

Hi @anGie44 thanks for the assist! Since the release/4.x branch is restored, perhaps we can retain that as the destination branch? Since this contains a breaking change I think it was intended for the release/4.x branch. Thanks!

@anGie44
Copy link
Contributor

anGie44 commented Feb 2, 2022

Of course, was my mistake! Ahh so the changes that lived in release/4.x were merged in on monday, so we're using the main branch now to hold all the upcoming 4.0 changes. I restored the branch to help re-open this PR, i thought Github would just change the base branch automatically 😞 , but we don't plan to add any new content there as main will become the release branch for 4.0.

@anGie44
Copy link
Contributor

anGie44 commented Feb 2, 2022

@GlennChia since this PR renames the attribute, I believe we'll need to follow documented Best Practices , so this will need to be a deprecation + new attribute which can occur during any future minor release (or ship with 4.0), and then removal can occur in the v5.0 major release.

@anGie44 anGie44 added the technical-debt Addresses areas of the codebase that need refactoring or redesign. label Feb 3, 2022
@gdavison gdavison self-assigned this Feb 3, 2022
@GlennChia
Copy link
Collaborator Author

Thanks @anGie44. I've made the changes as per the guidance and re-ran the test case (I realised my test command could have been shorter since the prefix is shared by the resource and data source).

make testacc TESTARGS='-run=TestAccConnectHoursOfOperation_serial\|TestAccConnectHoursOfOperationDataSource' PKG=connect ACCTEST_PARALLELISM=1
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/connect/... -v -count 1 -parallel 1 -run=TestAccConnectHoursOfOperation_serial\|TestAccConnectHoursOfOperationDataSource -timeout 180m
=== RUN   TestAccConnectHoursOfOperationDataSource_hoursOfOperationID
--- PASS: TestAccConnectHoursOfOperationDataSource_hoursOfOperationID (178.91s)
=== RUN   TestAccConnectHoursOfOperationDataSource_name
--- PASS: TestAccConnectHoursOfOperationDataSource_name (124.06s)
=== RUN   TestAccConnectHoursOfOperation_serial
=== RUN   TestAccConnectHoursOfOperation_serial/basic
=== RUN   TestAccConnectHoursOfOperation_serial/disappears
--- PASS: TestAccConnectHoursOfOperation_serial (284.66s)
    --- PASS: TestAccConnectHoursOfOperation_serial/basic (166.21s)
    --- PASS: TestAccConnectHoursOfOperation_serial/disappears (118.44s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/connect    595.314s

Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

Looks good! 🚀

--- PASS: TestAccConnectHoursOfOperationDataSource_hoursOfOperationID (85.36s)
--- PASS: TestAccConnectHoursOfOperationDataSource_name (84.94s)
--- PASS: TestAccConnectHoursOfOperation_serial (186.11s)
--- PASS: TestAccConnectHoursOfOperation_serial/basic (101.68s)
--- PASS: TestAccConnectHoursOfOperation_serial/disappears (84.43s)

@gdavison gdavison merged commit c21db09 into hashicorp:main Feb 3, 2022
@GlennChia GlennChia deleted the td-aws_connect_hours_of_operation branch February 3, 2022 23:44
@github-actions
Copy link

This functionality has been released in v4.0.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. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2022
@justinretzolk justinretzolk added the partner Contribution from a partner. label May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. partner Contribution from a partner. service/connect Issues and PRs that pertain to the connect service. size/M Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign. 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.

None yet

6 participants