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

CLOUDFLAREAPI: Fix flakey tests #1711

Closed
tlimoncelli opened this issue Aug 15, 2022 · 4 comments
Closed

CLOUDFLAREAPI: Fix flakey tests #1711

tlimoncelli opened this issue Aug 15, 2022 · 4 comments

Comments

@tlimoncelli
Copy link
Contributor

CC: @tresni

For some reason Cloudflare tests keep failing. It always starts at Test 34 or 39. When I run the same tests from my workstation they're find. It's just CircleCI

https://app.circleci.com/pipelines/github/StackExchange/dnscontrol/1335/workflows/407541cf-dcf9-416e-8aea-799e1505050d/jobs/10332

@tlimoncelli
Copy link
Contributor Author

I have a hunch that we're being rate-limited but the rate limit code in https://github.com/cloudflare/cloudflare-go/blob/master/cloudflare.go#L260 isn't working correctly.

Why would it set respErr without checking to see if err != nil?

@tlimoncelli tlimoncelli changed the title CLOUDFLAREAPI: Flakey tests CLOUDFLAREAPI: Fix flakey tests Aug 15, 2022
@tlimoncelli
Copy link
Contributor Author

Update:

Theory 1: This is a bug in cloudflare-go's retry handling.

I'm discussing this here: cloudflare/cloudflare-go#1041

Theory 2: We're just maxing out the number of retries.

@jacobbednarz suggested that this is a badly phrased error message and we're exceeding the # of permitted retries. The problem does go away if the number of retries is increased. That fix is here: #1713

@jacobbednarz
Copy link

i've updated the error message in cloudflare/cloudflare-go#1043 to make it clearer this is dying due to exhausting the number of retries.

an alternative here is to also space out the requests a little longer to prevent them from all landing within the 5m window. not ideal but possible. hit me up if you need an account rate limit bumped to assist here.

@tlimoncelli
Copy link
Contributor Author

Thanks, @jacobbednarz ! I appreciate the fast response. Yes, that error message should help a lot!

Best
Tom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants