-
Notifications
You must be signed in to change notification settings - Fork 397
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
NETLIFY: provider type netlify: cannot list zones to use the 'all' feature #2931
Comments
Ping @SphericalKat (the maintainer of this provider). |
@jauderho I don't remember exactly why it's disabled, but I'll investigate this. Thanks for the report! |
FYI: To enable this feature, complete the HTH |
Thanks for the help @tlimoncelli! I've created a PR that should close this: #2933 |
So this did not quite work as it looks like things break if there are multiple domains/sites.
So this works.
This does not work. |
@jauderho Interesting, I've been testing on a project with multiple sites, and it seems to work for me. The API spec for this particular route also mentions that the field I wonder if it'd be possible for you to call this route with your credentials, so I could check what exactly it's returning? |
Looks like "domain" is showing as null but "name" is available. These sites were inherited so I do not have the full context around how things were set up. For my personal account with a single entry that seems to be working, I get the following:
For the one with multiples that is not working:
|
Thanks for the response @jauderho I'm not sure what the ideal way to handle this scenario is, since sometimes the Do you have any suggestions as to how you'd like such a case handled? I was thinking, attempt to unmarshal to one type, and upon failure, try the other. |
FYI: I'm good with unmarshalling twice. You can get fancy and use json.RawMessage so that you're only doing a specific field twice, but I think that's going to be a lot of extra work for not much benefit. Either way, make sure to include comments so the next person looking at the code understands what's going on. |
@SphericalKat Sorry for the delay in response but I think the best fix is for Netlify to have predictable output from their API. I think your idea of unmarshal, test, unmarshal is probably the next best alternative. Else, it looks like you may want to select for the "name" field instead of the "domain" field until this gets fixed upstream. |
Describe the bug
I'm starting to test migrations with more providers and in this case, I want to move from Netlify to Cloudflare/BIND
To Reproduce
Steps to reproduce the behavior:
env $(cat .env) ~/go/bin/dnscontrol check-creds netlify
, I getprovider type netlify: cannot list zones to use the 'all' feature
Expected behavior
I'm expecting to get a list of DNS domains back but instead I get
provider type netlify: cannot list zones to use the 'all' feature
The Netlify API seems to show that this is possible: https://open-api.netlify.com/#tag/dnsZone/operation/getDnsZones
If I try with
env $(cat .env) ~/go/bin/dnscontrol get-zone --format=js netlify - domain.com
, I getailed GetZone gzr: json: cannot unmarshal object into Go struct field dnsZone.domain of type string
DNS Provider
The text was updated successfully, but these errors were encountered: