The extension continuously polls the endpoint no matter what, so it just instantly hits the rate limits I have set (7200 requests per hour). It doesn’t stop polling once it gets back error 429 either, so the extension does not work at all anymore.
Designs
Child items
0
Show closed items
GraphQL error: Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid | Cannot return null for non-nullable field Pipeline.iid
The issue persists across both our self hosted instance and the gitlab website.
The extension doesn’t say what endpoint it’s hitting, it just endlessly pops up new notifications saying “Gitlab Workflow: failed to perform your operation” and “429 - ‘retry later\n’”
Thanks for the explanation @massimeddu. I can see more than two requests happening every 5 seconds. When I put console.log into gitlab_service.fetch() I see every 5 seconds the following requests:
@viktomas For reference, I think the Web IDE is every 10 seconds, but it's also only making a single request not sending 5 requests every time. Reverting to the old timing makes sense, and I don't think we should make this user configurable based on some of our other non-configurable application limits.
I'm wondering if you've reached out to anyone from infrastructure to see what kind of abuse we're seeing to GitLab.com.
Hi @viktomas I suppose that reverting to old values is the right choice if you don't want to make them configurable. I guess a configurable option could be better, and I've actually implemented it in !54 (closed)!54 (diffs) (maybe we could set a default value and a minimum value for this setting that makes more sense !54 (diffs) ). Actually, if a user for some reason, opens a lot of instances of the extension, it could get a 429 error even with 30/60 seconds timeout. In those cases it could be useful to give to the user the option to increase the value. On the other hand, most of the users that use only one instance of the extension, can prefer to have a faster refresh over the pipeline status (10 seconds as WebIDE looks reasonable as minimum value to me).
Btw, on !54 (closed) using vscode git extension we have a way to mitigate this problem, triggering the updates related to current branch only when the branch is actually changed:
!54 (diffs)
Thanks for the suggestions @massimeddu, I went with the simplest fix (reverting to 30/60 timeout) to reduce the load on GitLab API for now.
Same as @phikai I would prefer not to make this configurable and instead, try to optimize in different ways (some of which you suggested and even implemented in !54 (closed)).
Actually, if a user for some reason, opens a lot of instances of the extension, it could get a 429 error even with 30/60 seconds timeout. In those cases it could be useful to give to the user the option to increase the value
We should only run the polling if the extension is active (the same way the official git extension does it). #212 (closed)
Btw, on !54 (closed) using vscode git extension we have a way to mitigate this problem, triggering the updates related to current branch only when the branch is actually changed: !54 (diffs)
But the pipeline status should be polled even when there is no branch change right?