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/aws_devopsguru(test): add service level pre-check #36724

Merged
merged 2 commits into from
Apr 5, 2024
Merged

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Apr 3, 2024

Description

This pre-check captures operation errors observed when calling DevOps Guru in certain non-commercial partitions, such as GovCloud.

Before:

Error: creating Amazon DevOps Guru Notification Channel: operation error DevOps Guru: AddNotificationChannel, https response error StatusCode: 0, RequestID: , request send failed, Put "https://devops-guru.us-gov-east-1.amazonaws.com/channels": dial tcp: lookup devops-guru.us-gov-east-1.amazonaws.com: no such host

See acceptance testing below for after.

Relations

Relates #17919
Relates #36694 (review)

References

Output from Acceptance Testing

GovCloud:

% make testacc PKG=devopsguru TESTS=TestAccDevOpsGuru_serial
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.21.8 test ./internal/service/devopsguru/... -v -count 1 -parallel 20 -run='TestAccDevOpsGuru_serial'  -timeout 360m
=== RUN   TestAccDevOpsGuru_serial
=== PAUSE TestAccDevOpsGuru_serial
=== CONT  TestAccDevOpsGuru_serial
    devopsguru_test.go:72: skipping acceptance testing: operation error DevOps Guru: DescribeAccountHealth, https response error StatusCode: 0, RequestID: , request send failed, Get "https://devops-guru.us-gov-east-1.amazonaws.com/accounts/health": dial tcp: lookup devops-guru.us-gov-east-1.amazonaws.com: no such host
--- SKIP: TestAccDevOpsGuru_serial (0.17s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/devopsguru 5.651s

Commercial:

% make testacc PKG=devopsguru TESTS=TestAccDevOpsGuru_serial
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.21.8 test ./internal/service/devopsguru/... -v -count 1 -parallel 20 -run='TestAccDevOpsGuru_serial'  -timeout 360m

--- PASS: TestAccDevOpsGuru_serial (222.18s)
    --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration (38.19s)
        --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration/basic (18.19s)
        --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration/kms (20.00s)
    --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig (20.63s)
        --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig/basic (11.15s)
        --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig/disappears (9.48s)
    --- PASS: TestAccDevOpsGuru_serial/NotificationChannel (38.04s)
        --- PASS: TestAccDevOpsGuru_serial/NotificationChannel/basic (13.16s)
        --- PASS: TestAccDevOpsGuru_serial/NotificationChannel/disappears (11.58s)
        --- PASS: TestAccDevOpsGuru_serial/NotificationChannel/filters (13.29s)
    --- PASS: TestAccDevOpsGuru_serial/NotificationChannelDataSource (11.37s)
        --- PASS: TestAccDevOpsGuru_serial/NotificationChannelDataSource/basic (11.37s)
    --- PASS: TestAccDevOpsGuru_serial/ResourceCollection (103.72s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/disappears (9.60s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/tags (11.27s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/tagsAllResources (11.38s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/basic (11.37s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/cloudformation (60.10s)
    --- PASS: TestAccDevOpsGuru_serial/ResourceCollectionDataSource (9.42s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollectionDataSource/basic (9.42s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/devopsguru 227.638s

Copy link

github-actions bot commented Apr 3, 2024

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/devopsguru Issues and PRs that pertain to the devopsguru service. size/S Managed by automation to categorize the size of a PR. labels Apr 3, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Apr 3, 2024
This pre-check captures operation errors observed when calling DevOps Guru in certain non-commercial partitions, such as GovCloud.

Before:

```
Error: creating Amazon DevOps Guru Notification Channel: operation error DevOps Guru: AddNotificationChannel, https response error StatusCode: 0, RequestID: , request send failed, Put "https://devops-guru.us-gov-east-1.amazonaws.com/channels": dial tcp: lookup devops-guru.us-gov-east-1.amazonaws.com: no such host
```

GovCloud:

```console
% make testacc PKG=devopsguru TESTS=TestAccDevOpsGuru_serial
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.21.8 test ./internal/service/devopsguru/... -v -count 1 -parallel 20 -run='TestAccDevOpsGuru_serial'  -timeout 360m
=== RUN   TestAccDevOpsGuru_serial
=== PAUSE TestAccDevOpsGuru_serial
=== CONT  TestAccDevOpsGuru_serial
    devopsguru_test.go:72: skipping acceptance testing: operation error DevOps Guru: DescribeAccountHealth, https response error StatusCode: 0, RequestID: , request send failed, Get "https://devops-guru.us-gov-east-1.amazonaws.com/accounts/health": dial tcp: lookup devops-guru.us-gov-east-1.amazonaws.com: no such host
--- SKIP: TestAccDevOpsGuru_serial (0.17s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/devopsguru 5.651s
```

Commercial:

```console
% make testacc PKG=devopsguru TESTS=TestAccDevOpsGuru_serial
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.21.8 test ./internal/service/devopsguru/... -v -count 1 -parallel 20 -run='TestAccDevOpsGuru_serial'  -timeout 360m

--- PASS: TestAccDevOpsGuru_serial (222.18s)
    --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration (38.19s)
        --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration/basic (18.19s)
        --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration/kms (20.00s)
    --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig (20.63s)
        --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig/basic (11.15s)
        --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig/disappears (9.48s)
    --- PASS: TestAccDevOpsGuru_serial/NotificationChannel (38.04s)
        --- PASS: TestAccDevOpsGuru_serial/NotificationChannel/basic (13.16s)
        --- PASS: TestAccDevOpsGuru_serial/NotificationChannel/disappears (11.58s)
        --- PASS: TestAccDevOpsGuru_serial/NotificationChannel/filters (13.29s)
    --- PASS: TestAccDevOpsGuru_serial/NotificationChannelDataSource (11.37s)
        --- PASS: TestAccDevOpsGuru_serial/NotificationChannelDataSource/basic (11.37s)
    --- PASS: TestAccDevOpsGuru_serial/ResourceCollection (103.72s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/disappears (9.60s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/tags (11.27s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/tagsAllResources (11.38s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/basic (11.37s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollection/cloudformation (60.10s)
    --- PASS: TestAccDevOpsGuru_serial/ResourceCollectionDataSource (9.42s)
        --- PASS: TestAccDevOpsGuru_serial/ResourceCollectionDataSource/basic (9.42s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/devopsguru 227.638s
```
Copy link

github-actions bot commented Apr 3, 2024

Thank you for your contribution! 🚀

A new usage of AWS SDK for Go V1 was detected. Please prefer AWS SDK for Go V2 for all net-new services. If this is an enhancement or bug fix to an existing AWS SDK Go V1 based resource, this comment can be safely ignored.

For additional information refer to the AWS SDK for Go Versions page in the contributor guide.

Adds the logic used in internal/sweep/awsv2 to the internal/acctest pre-check skipping function. Successfully tested with DevOpsGuru in GovCloud:

```console
% make testacc PKG=devopsguru TESTS=TestAccDevOpsGuru_serial
==> Checking that code complies with gofmt requirements...                                                                                                                           TF_ACC=1 go1.21.8 test ./internal/service/devopsguru/... -v -count 1 -parallel 20 -run='TestAccDevOpsGuru_serial'  -timeout 360m

--- PASS: TestAccDevOpsGuru_serial (0.12s)
    --- PASS: TestAccDevOpsGuru_serial/ResourceCollection (0.11s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/basic (0.11s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/cloudformation (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/disappears (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/tags (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/tagsAllResources (0.00s)
    --- PASS: TestAccDevOpsGuru_serial/ResourceCollectionDataSource (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollectionDataSource/basic (0.00s)
    --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ServiceIntegration/basic (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ServiceIntegration/kms (0.00s)
    --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/EventSourcesConfig/basic (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/EventSourcesConfig/disappears (0.00s)
    --- PASS: TestAccDevOpsGuru_serial/NotificationChannel (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/basic (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/disappears (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/filters (0.00s)
    --- PASS: TestAccDevOpsGuru_serial/NotificationChannelDataSource (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/NotificationChannelDataSource/basic (0.00s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/devopsguru 5.604s
```
@jar-b
Copy link
Member Author

jar-b commented Apr 5, 2024

GovCloud acceptance test results after switching the assertion to net.DNSError:

% make testacc PKG=devopsguru TESTS=TestAccDevOpsGuru_serial
==> Checking that code complies with gofmt requirements...                                                                                                                           TF_ACC=1 go1.21.8 test ./internal/service/devopsguru/... -v -count 1 -parallel 20 -run='TestAccDevOpsGuru_serial'  -timeout 360m

--- PASS: TestAccDevOpsGuru_serial (0.12s)
    --- PASS: TestAccDevOpsGuru_serial/ResourceCollection (0.11s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/basic (0.11s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/cloudformation (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/disappears (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/tags (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollection/tagsAllResources (0.00s)
    --- PASS: TestAccDevOpsGuru_serial/ResourceCollectionDataSource (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ResourceCollectionDataSource/basic (0.00s)
    --- PASS: TestAccDevOpsGuru_serial/ServiceIntegration (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ServiceIntegration/basic (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/ServiceIntegration/kms (0.00s)
    --- PASS: TestAccDevOpsGuru_serial/EventSourcesConfig (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/EventSourcesConfig/basic (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/EventSourcesConfig/disappears (0.00s)
    --- PASS: TestAccDevOpsGuru_serial/NotificationChannel (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/basic (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/disappears (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/NotificationChannel/filters (0.00s)
    --- PASS: TestAccDevOpsGuru_serial/NotificationChannelDataSource (0.00s)
        --- SKIP: TestAccDevOpsGuru_serial/NotificationChannelDataSource/basic (0.00s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/devopsguru 5.604s

@jar-b jar-b merged commit 565eb3a into main Apr 5, 2024
36 checks passed
@jar-b jar-b deleted the f-devopsguru-precheck branch April 5, 2024 20:09
@github-actions github-actions bot added this to the v5.45.0 milestone Apr 5, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Apr 11, 2024
Copy link

This functionality has been released in v5.45.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!

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 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/devopsguru Issues and PRs that pertain to the devopsguru service. size/S 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