API Async breaking behavior - create zone, import dns happens async!

We’ve noticed that when you create a new zone, with option to import existing DNS, there’s a delay on the importing of those DNS records. The delay is not consistent, and can be anywhere from 2-60 seconds.

This creates a problem, because if we want to create a zone, then add DNS records, we have no way of knowing WHEN to add dns records, as we only want to add after import is done.

I really feel the import of DNS records should at least have an option to be synchronous, because the async method is just causing problems in a standard processing. I’d much rather wait for completion of zone creation than get a half-baked zone creation.

Furthermore, results seem inconsistent, but it appears that when we add records BEFORE you are done importing, NOTHING gets imported. I’m guessing maybe your import hits an error on “existing record” and drops out of its loop?

This really could all be solved by making the import of dns records synchronous and is far more appropriate logic. If a person wants the old behavior, they can choose NOT to import the dns records, and later trigger command to import them if they want.

The async behavior though is really illogical and introduces too many odd behaviors.

Thanks very much for sharing this feedback. I did some checking around and it turns out that there were some specific reasons the current implementation was chosen. Though I have relayed the feedback so that they may be able to find an alternative that satisfies your needs better as well.

https://discourse-cdn-sjc1.com/business5//discourse-cloud-file-legacy.s3-us-west-2.amazonaws.com/cloudflare/original/2X/9/99cb2f515700ac14306aadc383a29eaf23fef5d5.jpg

I’m sure the reason is the unreliable nature of checking DNS records against your master list, but since I can’t trigger a callback when you complete that process, and I can’t even poll a status - its breaking.

I’d personally much rather wait however long it takes, assuming the average time is no more than 30 secs.

Alternately, there should at least be a way to provide a callback so that your API can trigger dns record creation after import.

Worse case would be to provide a status that indicates its still pending record import - then we’ll have to poll against that.