-
Notifications
You must be signed in to change notification settings - Fork 30
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
storyblok push-components aborts with "Error: Too Many Requests" #64
Comments
Hi @eggnstone thanks to reporting the problem, could you check again ? We had an update on our API's If you test and the problem persist, please can you send me the current plan of the source and target spaces, to check if it's a limitation by the plan. I say this because this |
Yes, still happening with 3.25.1 But even if it's a limitation by the plan, the CLI should adjust to that and not abort with error. |
Thanks to confirm the problem, i will investigate that. |
Hello again my friend @eggnstone i added some changes and published the version 3.25.2, could you check to see if this version it's working ? |
Same error:
I always add
in push-components.js at line 169
|
Hi @eggnstone ,this error doesn't happen to me (I tried to push 500 components), I opened a PR draft could you take a look and try to use this approach and let me know if it works or not. If that doesn't work, I should go with your idea, I didn't go with it the first time because it can add a certain amount of time to push many components, but it's a solution. Thanks a lot for the help. |
I'm no JS expert but the PR looks to me like you are collecting the push results and then wait for them at the end, but because you await each result before adding it to the array, I don't see any difference. I don't see how this can address the "too many requests" which basically means "too many calls per second" because I am on a limited plan. Is there a way to determine the plan? Then based on that plan a delay could be added before each |
@ademarCardoso would you be open to accept a PR introducing exponential back-off? We're having the same issue (strangely with very few components, I counted 7). The space currently is on the community plan, that should be the easiest way to reproduce the issue because of it having the lowest rate limits. Screenshot |
After digging a bit deeper, I've found this official post concerning the management api rate limits. There it says
As this CLI tool is utilising the SDK, I now am left wondering if this is an upstream error? |
I think the issue lies in https://github.com/storyblok/storyblok-cli/blob/master/src/utils/api.js Proposed solutionmake |
@PhiFry yeah that'd make sense - however the |
@marcesengel The |
@PhiFry ah I see 🙌 do you think you could provide a quick PR so we can install the CLI from your fork instead of from |
@eggnstone @PhiFry I've created a fork (+ PR, see above) implementing @PhiFry's findings. Feel free to give it a try using |
Hi, Doesn't this fix (storyblok/storyblok-js-client#732) also fix the underlying issue here? If so, could you roll out a new version with the updated dependency? |
Hi @ademarCardoso, is there any chance this could be fixed? That way, Storyblok's enterprise customers that have to use SSO logins can use the official Storyblok CLI rather than a fork. Many thanks! |
Hi everyone! Thanks for sharing the details We recently merged #72 created by @marcesengel, which aims to mitigate the issue. Since v3.31.1 you shouldn't face this issue anymore, at least reaching the limit should be harder. If you still face this issue with that version please let us know. |
Hi all, I'm gonna close this as completed since it was released on v3.31.1, if you still encounter this issue please feel free to re-open. |
@christianzoppi @alvarosabu unfortunately we're still seeing this issue with We have a script that allows people to pull from a centralised space and push out to their own spaces. They enter their space ID from a readline prompt The centralised space is
However, we're still being met with the
In our implementation we catch any
|
Current behavior:
I'm uploading my components.json (with 21 components) to an existing space:
storyblok push-components --space 12345 components.json
After a few successful updates it reliably aborts like this:
Expected behavior:
Successful execution of the command without an error.
Steps to reproduce:
storyblok push-components --space 12345 components.json
Other information:
This is probably due to being on a limited plan where the API calls have a limited rate.
That rate should be adhered to or at least be made configurable.
Edit
storyblok-cli version: 3.25.0
It used to work with earlier version.
Edit2
It used to work with earlier versions like 3.24.1 where subtasks could fail, too, but it did not abort:
The text was updated successfully, but these errors were encountered: