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

Allow retry logic in synthetics tests #428

Closed
wants to merge 1 commit into from

Conversation

s33dunda
Copy link

@s33dunda s33dunda commented Mar 3, 2020

This is a bit of a dupe of https://github.com/terraform-providers/terraform-provider-datadog/pull/425.
Allows for retry logic in synthetics checks.

However, this uses the terraform migration pattern as suggested here https://www.terraform.io/docs/extend/resources/state-migration.html

This way we can keep options without deprecating and/or breaking those upgrading.

@ghost ghost added the size/XL label Mar 3, 2020
@bendrucker
Copy link
Contributor

Also opened (and just closed) #426. This is great, first time seeing a state migrator in action!

@s33dunda
Copy link
Author

s33dunda commented Mar 6, 2020

@gzussa @jirikuncar I can't seem to get the tests to pass. However, if I use my personal api keys it passes:

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run=TestAccDatadogSynthetics* -timeout 120m
?   	github.com/terraform-providers/terraform-provider-datadog	[no test files]
=== RUN   TestAccDatadogSyntheticsAPITest_importBasic
=== PAUSE TestAccDatadogSyntheticsAPITest_importBasic
=== RUN   TestAccDatadogSyntheticsSSLTest_importBasic
=== PAUSE TestAccDatadogSyntheticsSSLTest_importBasic
=== RUN   TestAccDatadogSyntheticsBrowserTest_importBasic
=== PAUSE TestAccDatadogSyntheticsBrowserTest_importBasic
=== RUN   TestAccDatadogSyntheticsAPITest_Basic
--- PASS: TestAccDatadogSyntheticsAPITest_Basic (1.25s)
=== RUN   TestAccDatadogSyntheticsAPITest_Updated
--- PASS: TestAccDatadogSyntheticsAPITest_Updated (1.62s)
=== RUN   TestAccDatadogSyntheticsSSLTest_Basic
--- PASS: TestAccDatadogSyntheticsSSLTest_Basic (1.02s)
=== RUN   TestAccDatadogSyntheticsSSLTest_Updated
--- PASS: TestAccDatadogSyntheticsSSLTest_Updated (1.67s)
=== RUN   TestAccDatadogSyntheticsBrowserTest_Basic
--- PASS: TestAccDatadogSyntheticsBrowserTest_Basic (1.14s)
=== RUN   TestAccDatadogSyntheticsBrowserTest_Updated
--- PASS: TestAccDatadogSyntheticsBrowserTest_Updated (1.78s)
=== CONT  TestAccDatadogSyntheticsAPITest_importBasic
=== CONT  TestAccDatadogSyntheticsBrowserTest_importBasic
=== CONT  TestAccDatadogSyntheticsSSLTest_importBasic
--- PASS: TestAccDatadogSyntheticsAPITest_importBasic (1.08s)
--- PASS: TestAccDatadogSyntheticsSSLTest_importBasic (1.15s)
--- PASS: TestAccDatadogSyntheticsBrowserTest_importBasic (6.21s)
PASS
ok  	github.com/terraform-providers/terraform-provider-datadog/datadog	16.368s
?   	github.com/terraform-providers/terraform-provider-datadog/version	[no test files]

not really sure what the deal is here. :(

Any ideas?

@bendrucker
Copy link
Contributor

This is because there are recorded API requests/responses in cassettes/. Not sure what the plan is for updating those.

@lem2clide
Copy link

lem2clide commented Mar 10, 2020

This is a bit of a dupe of #425.
Allows for retry logic in synthetics checks.

However, this uses the terraform migration pattern as suggested here https://www.terraform.io/docs/extend/resources/state-migration.html

This way we can keep options without deprecating and/or breaking those upgrading.

I was not aware of the state-migration feature, I've updated the PR https://github.com/terraform-providers/terraform-provider-datadog/pull/425 to add StateUpgrader and an upgrade test, thanks for that great suggestion @s33dunda !

@bkabrda
Copy link
Contributor

bkabrda commented Mar 13, 2020

Hey @s33dunda, would you be ok with closing this PR and consolidating the effort in #425?

@s33dunda
Copy link
Author

@bkabrda whatever it takes to get have this available for all of us. Was there anything particular to keep from each PR?

@s33dunda s33dunda closed this Jun 17, 2020
@s33dunda s33dunda reopened this Jun 17, 2020
@therve
Copy link
Contributor

therve commented Aug 6, 2020

We added retry support in #619, let us know if it works for you.

@therve therve closed this Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants