Giter VIP home page Giter VIP logo

Comments (11)

adamdecaf avatar adamdecaf commented on September 24, 2024 2

Awesome! I released 1.2.0 which has binaries to download

https://github.com/adamdecaf/terraform-provider-namecheap/releases/tag/1.2.0

Let me know if you have other issues, but thanks for the help on this!

from terraform-provider-namecheap.

adamdecaf avatar adamdecaf commented on September 24, 2024

Makes sense. I pushed off a backoff aware client until it was needed. Do you know if they return a header regarding the rate limit?

We can look to see if there are better calls to minimize the requests too.

from terraform-provider-namecheap.

adamdecaf avatar adamdecaf commented on September 24, 2024

Regarding a retry/backoff aware http.Client I'd recommend using https://github.com/hashicorp/go-retryablehttp - thoughts? We should be able to hook in a Backoff func to scrape the XML or a header value.

from terraform-provider-namecheap.

OGProgrammer avatar OGProgrammer commented on September 24, 2024

This is very much an RPC style API... response is a 200 even on error. No rate limiting headers in the response before or during a throttle. Not sure if we should ask support about what the limits are because I don't see anything in the docs. That library looks good, maybe if we see ApiResponse Status="ERROR" with the Error # 500000 then we start backing off a bit. I'm going to take a look if there are examples out there of retryablehttp being used in a tf provider.

The response we can parse:

<ApiResponse Status="ERROR">
<Errors>
<Error Number="500000">Too many requests</Error>
</Errors>

from terraform-provider-namecheap.

adamdecaf avatar adamdecaf commented on September 24, 2024

I think matching on <ApiResponse Status="ERROR"> to backoff would be a good solution.

from terraform-provider-namecheap.

OGProgrammer avatar OGProgrammer commented on September 24, 2024

If we also figure out what the response is when the ip isn't whitelisted, perhaps we can provide better feedback on that. Right now if you are on a new ip, you get back namecheap_record.example-com: namecheap_record.example-com: Couldn't find namecheap record: Could not find the record which could be confusing for a dev seeing this and not realizing it is whitelist ip related.

from terraform-provider-namecheap.

OGProgrammer avatar OGProgrammer commented on September 24, 2024

Yo @adamdecaf , got around to fixing this. Checkout the PR #11

Looks like it is working well thus far. Appreciate your feedback, wondering a bit about the mutexes and if I messed anything up there.

from terraform-provider-namecheap.

adamdecaf avatar adamdecaf commented on September 24, 2024

@OGProgrammer Can you try out master? It worked for me to create a record, so I hope the retries work for you also! If so I'll make a proper release.

from terraform-provider-namecheap.

OGProgrammer avatar OGProgrammer commented on September 24, 2024

Tested master and it so slowww. I think you need to double check whats up with your branch. The branch I have hotfix/rateThrottling is blazing fast, and master seems to cause issues where namecheap returns some error. If you could pass the error up somehow through the namecheap go depenedency then we could get more visibility maybe?

Not sure what the issue is but I'm sticking with my branch in the meantime.

from terraform-provider-namecheap.

adamdecaf avatar adamdecaf commented on September 24, 2024

@OGProgrammer Whoops. I've fixed that in bab5a37. It works for me to create a record in 6-9s and delete one in ~6s. Hope it's fast for you too now!

from terraform-provider-namecheap.

OGProgrammer avatar OGProgrammer commented on September 24, 2024

Looks good now!

from terraform-provider-namecheap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.