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

BUG: Errors while listing zones do not propagate through the system (#2474) #3216

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

hmoffatt
Copy link
Contributor

If an error occurred listing zones (eg invalid credentials), the preview/push commands didn't return an error code.

@hmoffatt
Copy link
Contributor Author

Also discovered that CLOUDFLAREAPI caches an empty zone list if the fetch fails.

@tlimoncelli
Copy link
Contributor

Good catch!

CC @tresni for approval.

@hmoffatt
Copy link
Contributor Author

I notice that the CLOUDNS code fetches the domain list in NewCloudns in order to validate the credentials, while NewCloudflare does not. That validation runs earlier so Cloudns already exits nicely with an error if the credentials are wrong, while CLOUDFLARE ends up trying all the domains with the same error.

@tlimoncelli
Copy link
Contributor

Providers shouldn't generate any network traffic just at initialization time. I guess I missed that when I reviewed ClouDNS.

We should probably add a .CheckCreds() method or something. But so far nobody has complained not getting an error until the first domain of that provider.

@hmoffatt
Copy link
Contributor Author

I've pushed another change for CLOUDNS to delay fetching the domain list.

@tlimoncelli tlimoncelli changed the title Fix errors not propagating when listing zones (#2474) BUG: Errors while listing zones do not propagating to other systems (#2474) Dec 6, 2024
@tlimoncelli tlimoncelli changed the title BUG: Errors while listing zones do not propagating to other systems (#2474) BUG: Errors while listing zones do not propagate to other systems (#2474) Dec 6, 2024
@tlimoncelli tlimoncelli changed the title BUG: Errors while listing zones do not propagate to other systems (#2474) BUG: Errors while listing zones do not propagate through the system (#2474) Dec 6, 2024
@tlimoncelli tlimoncelli merged commit 9bb9f16 into StackExchange:main Dec 6, 2024
@tlimoncelli
Copy link
Contributor

Thanks for fixing this!!!

@hmoffatt hmoffatt deleted the fix-listzones-errors branch December 13, 2024 03:15
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

Successfully merging this pull request may close these issues.

2 participants