Comments (11)
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.
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.
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.
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.
I think matching on <ApiResponse Status="ERROR">
to backoff would be a good solution.
from terraform-provider-namecheap.
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.
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.
@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.
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.
@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.
Looks good now!
from terraform-provider-namecheap.
Related Issues (20)
- [ATTENTION] Complete project refactoring HOT 22
- NameCheap Whitelisted IPs HOT 5
- Domain name not found with FreeDNS domain HOT 10
- Allow IPs for Terraform Cloud HOT 10
- Provider 2.0.0+ Import? HOT 4
- OVERWRITE Mode does not warn about removing manual records HOT 1
- Whitelist IPs for known CICD providers HOT 5
- Terraform import record with nameservers incorrectly setting mode to "IMPORT" HOT 2
- Nameserver array missing trailing dot HOT 2
- User not found HOT 1
- FreeDNS subdomain records are all incorrectly going to the root domain HOT 1
- Provider warning for missing api_key, api_user, and user_name even when using NAMECHEAP_* environment variables HOT 1
- Error if CAA 'iodef' record defined HOT 5
- Ability to update the domain contact record information HOT 1
- Namecheap Provider not using provided API Credentials on initialization in .tf file HOT 1
- Feature request: `namecheap_nameserver` resource to register new nameservers HOT 3
- Support for dnssec HOT 5
- Add support for email redirect rules HOT 1
- unable to create sample dns record. HOT 1
- VPS support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-namecheap.