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_appmesh_route: Add support for retry policies #11660

Merged
merged 6 commits into from
Sep 29, 2020

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Jan 18, 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: #10075.
Relates: #14601.

Release note for CHANGELOG:

resource/aws_appmesh_route: Add `retry_policy` attribute to support App Mesh retry policies

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSAppmesh/Route'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route -timeout 120m
=== RUN   TestAccAWSAppmesh
=== RUN   TestAccAWSAppmesh/VirtualRouter
=== RUN   TestAccAWSAppmesh/VirtualRouter/basic
=== RUN   TestAccAWSAppmesh/VirtualRouter/tags
=== RUN   TestAccAWSAppmesh/Route
=== RUN   TestAccAWSAppmesh/Route/httpHeader
=== RUN   TestAccAWSAppmesh/Route/httpRetryPolicy
=== RUN   TestAccAWSAppmesh/Route/httpRoute
=== RUN   TestAccAWSAppmesh/Route/tcpRoute
=== RUN   TestAccAWSAppmesh/Route/routePriority
=== RUN   TestAccAWSAppmesh/Route/tags
--- PASS: TestAccAWSAppmesh (434.45s)
    --- PASS: TestAccAWSAppmesh/VirtualRouter (109.11s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/basic (45.09s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/tags (64.02s)
    --- PASS: TestAccAWSAppmesh/Route (325.34s)
        --- PASS: TestAccAWSAppmesh/Route/httpHeader (49.89s)
        --- PASS: TestAccAWSAppmesh/Route/httpRetryPolicy (50.95s)
        --- PASS: TestAccAWSAppmesh/Route/httpRoute (50.59s)
        --- PASS: TestAccAWSAppmesh/Route/tcpRoute (51.15s)
        --- PASS: TestAccAWSAppmesh/Route/routePriority (51.17s)
        --- PASS: TestAccAWSAppmesh/Route/tags (71.60s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	434.502s

Includes changes from #10402.

@ewbankkit ewbankkit requested a review from a team January 18, 2020 22:58
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/appmesh Issues and PRs that pertain to the appmesh service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Jan 18, 2020
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/XXL Managed by automation to categorize the size of a PR. labels Feb 20, 2020
@ewbankkit
Copy link
Contributor Author

Rebased to remove merge conflicts.
Re-ran acceptance tests:

% make testacc TEST=./aws TESTARGS='-run=TestAccAWSAppmesh/Route'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route -timeout 120m
=== RUN   TestAccAWSAppmesh
=== RUN   TestAccAWSAppmesh/Route
=== RUN   TestAccAWSAppmesh/Route/tags
=== RUN   TestAccAWSAppmesh/Route/httpHeader
=== RUN   TestAccAWSAppmesh/Route/httpRetryPolicy
=== RUN   TestAccAWSAppmesh/Route/httpRoute
=== RUN   TestAccAWSAppmesh/Route/tcpRoute
=== RUN   TestAccAWSAppmesh/Route/routePriority
=== RUN   TestAccAWSAppmesh/VirtualRouter
=== RUN   TestAccAWSAppmesh/VirtualRouter/basic
=== RUN   TestAccAWSAppmesh/VirtualRouter/tags
--- PASS: TestAccAWSAppmesh (445.43s)
    --- PASS: TestAccAWSAppmesh/Route (333.66s)
        --- PASS: TestAccAWSAppmesh/Route/tags (73.39s)
        --- PASS: TestAccAWSAppmesh/Route/httpHeader (51.38s)
        --- PASS: TestAccAWSAppmesh/Route/httpRetryPolicy (52.67s)
        --- PASS: TestAccAWSAppmesh/Route/httpRoute (52.26s)
        --- PASS: TestAccAWSAppmesh/Route/tcpRoute (52.30s)
        --- PASS: TestAccAWSAppmesh/Route/routePriority (51.66s)
    --- PASS: TestAccAWSAppmesh/VirtualRouter (111.77s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/basic (46.41s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/tags (65.36s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	446.634s

@ewbankkit
Copy link
Contributor Author

Rebased.
Re-ran acceptance tests:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSAppmesh/Route'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route -timeout 120m
=== RUN   TestAccAWSAppmesh
=== RUN   TestAccAWSAppmesh/Route
=== RUN   TestAccAWSAppmesh/Route/httpHeader
=== RUN   TestAccAWSAppmesh/Route/httpRetryPolicy
=== RUN   TestAccAWSAppmesh/Route/httpRoute
=== RUN   TestAccAWSAppmesh/Route/tcpRoute
=== RUN   TestAccAWSAppmesh/Route/routePriority
=== RUN   TestAccAWSAppmesh/Route/tags
=== RUN   TestAccAWSAppmesh/VirtualRouter
=== RUN   TestAccAWSAppmesh/VirtualRouter/basic
=== RUN   TestAccAWSAppmesh/VirtualRouter/tags
--- PASS: TestAccAWSAppmesh (430.75s)
    --- PASS: TestAccAWSAppmesh/Route (322.16s)
        --- PASS: TestAccAWSAppmesh/Route/httpHeader (50.67s)
        --- PASS: TestAccAWSAppmesh/Route/httpRetryPolicy (50.74s)
        --- PASS: TestAccAWSAppmesh/Route/httpRoute (49.51s)
        --- PASS: TestAccAWSAppmesh/Route/tcpRoute (49.95s)
        --- PASS: TestAccAWSAppmesh/Route/routePriority (50.31s)
        --- PASS: TestAccAWSAppmesh/Route/tags (70.99s)
    --- PASS: TestAccAWSAppmesh/VirtualRouter (108.59s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/basic (45.22s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/tags (63.37s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	430.797s

@ewbankkit

This comment has been minimized.

@ewbankkit
Copy link
Contributor Author

Rebased and removed unnecessary custom hash functions.
Re-ran acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAppmesh/Route/'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route/ -timeout 120m
=== RUN   TestAccAWSAppmesh
=== RUN   TestAccAWSAppmesh/Route
=== RUN   TestAccAWSAppmesh/Route/httpRoute
=== RUN   TestAccAWSAppmesh/Route/tcpRoute
=== RUN   TestAccAWSAppmesh/Route/routePriority
=== RUN   TestAccAWSAppmesh/Route/tags
=== RUN   TestAccAWSAppmesh/Route/httpHeader
=== RUN   TestAccAWSAppmesh/Route/httpRetryPolicy
=== RUN   TestAccAWSAppmesh/VirtualRouter
=== RUN   TestAccAWSAppmesh/VirtualRouter/basic
=== RUN   TestAccAWSAppmesh/VirtualRouter/tags
--- PASS: TestAccAWSAppmesh (440.07s)
    --- PASS: TestAccAWSAppmesh/Route (329.37s)
        --- PASS: TestAccAWSAppmesh/Route/httpRoute (50.93s)
        --- PASS: TestAccAWSAppmesh/Route/tcpRoute (52.49s)
        --- PASS: TestAccAWSAppmesh/Route/routePriority (52.43s)
        --- PASS: TestAccAWSAppmesh/Route/tags (71.69s)
        --- PASS: TestAccAWSAppmesh/Route/httpHeader (51.15s)
        --- PASS: TestAccAWSAppmesh/Route/httpRetryPolicy (50.66s)
    --- PASS: TestAccAWSAppmesh/VirtualRouter (110.70s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/basic (45.90s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/tags (64.81s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	440.128s

@ewbankkit
Copy link
Contributor Author

Rebased.
Re-ran acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAppmesh/Route/'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route/ -timeout 120m
=== RUN   TestAccAWSAppmesh
=== RUN   TestAccAWSAppmesh/Route
=== RUN   TestAccAWSAppmesh/Route/httpHeader
=== RUN   TestAccAWSAppmesh/Route/httpRetryPolicy
=== RUN   TestAccAWSAppmesh/Route/httpRoute
=== RUN   TestAccAWSAppmesh/Route/tcpRoute
=== RUN   TestAccAWSAppmesh/Route/routePriority
=== RUN   TestAccAWSAppmesh/Route/tags
=== RUN   TestAccAWSAppmesh/VirtualRouter
=== RUN   TestAccAWSAppmesh/VirtualRouter/basic
=== RUN   TestAccAWSAppmesh/VirtualRouter/tags
--- PASS: TestAccAWSAppmesh (475.74s)
    --- PASS: TestAccAWSAppmesh/Route (365.43s)
        --- PASS: TestAccAWSAppmesh/Route/httpHeader (50.77s)
        --- PASS: TestAccAWSAppmesh/Route/httpRetryPolicy (50.27s)
        --- PASS: TestAccAWSAppmesh/Route/httpRoute (70.72s)
        --- PASS: TestAccAWSAppmesh/Route/tcpRoute (70.46s)
        --- PASS: TestAccAWSAppmesh/Route/routePriority (50.92s)
        --- PASS: TestAccAWSAppmesh/Route/tags (72.28s)
    --- PASS: TestAccAWSAppmesh/VirtualRouter (110.31s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/basic (45.97s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/tags (64.34s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	475.789s

@ewbankkit
Copy link
Contributor Author

Rebased to remove merge conflict.
Re-ran acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAppmesh/Route/'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route/ -timeout 120m
=== RUN   TestAccAWSAppmesh
=== RUN   TestAccAWSAppmesh/Route
=== RUN   TestAccAWSAppmesh/Route/httpHeader
=== RUN   TestAccAWSAppmesh/Route/httpRetryPolicy
=== RUN   TestAccAWSAppmesh/Route/httpRoute
=== RUN   TestAccAWSAppmesh/Route/tcpRoute
=== RUN   TestAccAWSAppmesh/Route/routePriority
=== RUN   TestAccAWSAppmesh/Route/tags
=== RUN   TestAccAWSAppmesh/VirtualRouter
=== RUN   TestAccAWSAppmesh/VirtualRouter/basic
=== RUN   TestAccAWSAppmesh/VirtualRouter/tags
--- PASS: TestAccAWSAppmesh (477.10s)
    --- PASS: TestAccAWSAppmesh/Route (365.74s)
        --- PASS: TestAccAWSAppmesh/Route/httpHeader (51.37s)
        --- PASS: TestAccAWSAppmesh/Route/httpRetryPolicy (51.20s)
        --- PASS: TestAccAWSAppmesh/Route/httpRoute (69.49s)
        --- PASS: TestAccAWSAppmesh/Route/tcpRoute (70.81s)
        --- PASS: TestAccAWSAppmesh/Route/routePriority (51.94s)
        --- PASS: TestAccAWSAppmesh/Route/tags (70.92s)
    --- PASS: TestAccAWSAppmesh/VirtualRouter (111.36s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/basic (46.08s)
        --- PASS: TestAccAWSAppmesh/VirtualRouter/tags (65.27s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	477.164s

@ewbankkit
Copy link
Contributor Author

Rebased and migrated acceptance test and documentation syntax to TF 0.12.
Re-ran acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAppmesh/Route/'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route/ -timeout 120m
=== RUN   TestAccAWSAppmesh_serial
=== RUN   TestAccAWSAppmesh_serial/Route
=== RUN   TestAccAWSAppmesh_serial/Route/httpHeader
=== RUN   TestAccAWSAppmesh_serial/Route/httpRetryPolicy
=== RUN   TestAccAWSAppmesh_serial/Route/httpRoute
=== RUN   TestAccAWSAppmesh_serial/Route/tcpRoute
=== RUN   TestAccAWSAppmesh_serial/Route/routePriority
=== RUN   TestAccAWSAppmesh_serial/Route/tags
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter/tags
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter/basic
--- PASS: TestAccAWSAppmesh_serial (352.76s)
    --- PASS: TestAccAWSAppmesh_serial/Route (271.85s)
        --- PASS: TestAccAWSAppmesh_serial/Route/httpHeader (37.80s)
        --- PASS: TestAccAWSAppmesh_serial/Route/httpRetryPolicy (37.55s)
        --- PASS: TestAccAWSAppmesh_serial/Route/httpRoute (52.51s)
        --- PASS: TestAccAWSAppmesh_serial/Route/tcpRoute (52.73s)
        --- PASS: TestAccAWSAppmesh_serial/Route/routePriority (37.16s)
        --- PASS: TestAccAWSAppmesh_serial/Route/tags (54.10s)
    --- PASS: TestAccAWSAppmesh_serial/VirtualRouter (80.91s)
        --- PASS: TestAccAWSAppmesh_serial/VirtualRouter/tags (47.36s)
        --- PASS: TestAccAWSAppmesh_serial/VirtualRouter/basic (33.55s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	352.802s

Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAppmesh/Route/'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route/ -timeout 120m
=== RUN   TestAccAWSAppmesh_serial
=== RUN   TestAccAWSAppmesh_serial/Route
=== RUN   TestAccAWSAppmesh_serial/Route/httpHeader
=== RUN   TestAccAWSAppmesh_serial/Route/httpRetryPolicy
=== RUN   TestAccAWSAppmesh_serial/Route/httpRoute
=== RUN   TestAccAWSAppmesh_serial/Route/tcpRoute
=== RUN   TestAccAWSAppmesh_serial/Route/routePriority
=== RUN   TestAccAWSAppmesh_serial/Route/tags
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter/tags
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter/basic
--- PASS: TestAccAWSAppmesh_serial (352.76s)
    --- PASS: TestAccAWSAppmesh_serial/Route (271.85s)
        --- PASS: TestAccAWSAppmesh_serial/Route/httpHeader (37.80s)
        --- PASS: TestAccAWSAppmesh_serial/Route/httpRetryPolicy (37.55s)
        --- PASS: TestAccAWSAppmesh_serial/Route/httpRoute (52.51s)
        --- PASS: TestAccAWSAppmesh_serial/Route/tcpRoute (52.73s)
        --- PASS: TestAccAWSAppmesh_serial/Route/routePriority (37.16s)
        --- PASS: TestAccAWSAppmesh_serial/Route/tags (54.10s)
    --- PASS: TestAccAWSAppmesh_serial/VirtualRouter (80.91s)
        --- PASS: TestAccAWSAppmesh_serial/VirtualRouter/tags (47.36s)
        --- PASS: TestAccAWSAppmesh_serial/VirtualRouter/basic (33.55s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	352.802s
Copy link
Collaborator

@DrFaust92 DrFaust92 left a comment

Choose a reason for hiding this comment

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

LGTM

    --- PASS: TestAccAWSAppmesh_serial/VirtualRouter (199.63s)
        --- PASS: TestAccAWSAppmesh_serial/VirtualRouter/basic (81.46s)
        --- PASS: TestAccAWSAppmesh_serial/VirtualRouter/tags (118.17s)

wasnt able to run Route tests, getting

Error: error creating App Mesh virtual node: ConflictException: VirtualNode with name tf-acc-test-7197939696529239263 already exists with different clientRequestToken 4B53144C-2F10-4403-8D7B-9B37E8B9D657

but its probably an issue running tests from windows, i get these edge cases sometime..

@ewbankkit
Copy link
Contributor Author

@DrFaust92 Interesting. Does that error occur every time you run the tests? Are there any additional errors reported?

@DrFaust92
Copy link
Collaborator

Yes, my suspicious it that it doesn't randomize the name in windows when using acctest.randomwithprefix when they are in the same test (or calls are too close)

@ewbankkit
Copy link
Contributor Author

ewbankkit commented Sep 24, 2020

Yes, it seems that on Windows that the underlying golang time.Now().UnixNano() result can have relatively low precision: https://stackoverflow.com/questions/57285292/why-does-time-now-unixnano-returns-the-same-result-after-an-io-operation.

Copy link
Collaborator

@DrFaust92 DrFaust92 left a comment

Choose a reason for hiding this comment

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

LGTM

@breathingdust
Copy link
Member

LGTM! 🚀 Thanks @ewbankkit

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

make testacc TEST=./aws TESTARGS='-run=TestAccAWSAppmesh/Route'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/Route -timeout 120m
=== RUN   TestAccAWSAppmesh_serial
=== RUN   TestAccAWSAppmesh_serial/Route
=== RUN   TestAccAWSAppmesh_serial/Route/tcpRoute
=== RUN   TestAccAWSAppmesh_serial/Route/routePriority
=== RUN   TestAccAWSAppmesh_serial/Route/tags
=== RUN   TestAccAWSAppmesh_serial/Route/httpHeader
=== RUN   TestAccAWSAppmesh_serial/Route/httpRetryPolicy
=== RUN   TestAccAWSAppmesh_serial/Route/httpRoute
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter/basic
=== RUN   TestAccAWSAppmesh_serial/VirtualRouter/tags
--- PASS: TestAccAWSAppmesh_serial (275.96s)
    --- PASS: TestAccAWSAppmesh_serial/Route (211.99s)
        --- PASS: TestAccAWSAppmesh_serial/Route/tcpRoute (43.30s)
        --- PASS: TestAccAWSAppmesh_serial/Route/routePriority (27.73s)
        --- PASS: TestAccAWSAppmesh_serial/Route/tags (43.05s)
        --- PASS: TestAccAWSAppmesh_serial/Route/httpHeader (27.46s)
        --- PASS: TestAccAWSAppmesh_serial/Route/httpRetryPolicy (28.65s)
        --- PASS: TestAccAWSAppmesh_serial/Route/httpRoute (41.80s)
    --- PASS: TestAccAWSAppmesh_serial/VirtualRouter (63.97s)
        --- PASS: TestAccAWSAppmesh_serial/VirtualRouter/basic (26.40s)
        --- PASS: TestAccAWSAppmesh_serial/VirtualRouter/tags (37.58s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	277.397s

@breathingdust breathingdust added this to the v3.9.0 milestone Sep 29, 2020
@breathingdust breathingdust merged commit 562940f into hashicorp:master Sep 29, 2020
breathingdust added a commit that referenced this pull request Sep 29, 2020
@ewbankkit ewbankkit deleted the issue-10075 branch September 30, 2020 10:30
@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 Oct 30, 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 Oct 30, 2020
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. service/appmesh Issues and PRs that pertain to the appmesh 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.

AWS App Mesh retry policies
3 participants