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

Intermittent/Non-Actionable Error in statuscake_uptime_check resource #195

Open
fishfacemcgee opened this issue Oct 23, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@fishfacemcgee
Copy link

Describe the bug
When attempting to run terraform plan in a workspace that manages some statuscake_uptime_check resources, we will intermittently get failures that cause the plan to hard error. However, there's no information in the error to suggest a cause, let alone a solution.

Error: failed to get uptime check with ID: undefined response type: failed to deserialise error response

To Reproduce

This is an intermittent error so I don't expect reproduction to be easy/likely. Best guess would be an intermittent outage in the Statuscake API itself and/or an unclear rate limit. The workspace manages 5 uptime checks.

Expected behaviour

Either no error, or an error that actually tells us what's wrong.

Screenshots

Screenshot 2024-10-23 at 2 08 41 PM

Additional context

These plans run in an HCP Terraform environment, so getting any additional diagnostic information may be difficult, if not impossible.

@fishfacemcgee fishfacemcgee added the bug Something isn't working label Oct 23, 2024
@fishfacemcgee
Copy link
Author

Looking at Statuscake's API docs, it appears especially likely that ratelimiting is the issue, in which case the problem is the Provider is not handling that properly.

@fishfacemcgee
Copy link
Author

fishfacemcgee commented Oct 23, 2024

As far as the errors being unable to be deserialized, it looks like StatusCakeDev/statuscake-go#37 may be related.

@fishfacemcgee
Copy link
Author

Poking around the docs more, I see that the rate limit side of this is a misconfiguration on my end. I wouldn't have expected to need to configure retry logic on the provider settings, but it's at least something the provider allows for, even if it's not automatic. That leaves the remaining issue that the provider is displaying non-actionable errors and/or the API is providing response data in a way the Go SDK cannot handle properly (and therefore can't pass along actionable information to the provider to give to us).

Can confirm that adding

  retries     = 2
  min_backoff = 5
  max_backoff = 10

to my statuscake provider block resolves the errors I was receiving, confirming they were rate limit based.

@mattjamesaus
Copy link

We're seeing this as well - even with the backoff etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants