Skip to content
Snippets Groups Projects

Add requests backoff mechanism

Merged Tomasz Maczukin requested to merge improvement/add-requests-backoff-mechanism into master
All threads resolved!

What does this MR do?

Adds a requests backoff mechanism, that makes handling 429 response more intelligent.

Why was this MR needed?

Please read #2377 (closed) for a reference

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

Closes #2377 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • assigned to @tmaczukin

  • Nick Thomas
  • Tomasz Maczukin resolved all discussions

    resolved all discussions

  • Tomasz Maczukin mentioned in issue #2429

    mentioned in issue #2429

  • Author Maintainer

    @nick.thomas

    I wonder if we should support the Retry-After header mentioned here: https://tools.ietf.org/html/rfc6585#section-4

    429 for Runners requests is currently sent only for /api/v4/jobs/request endpoint and can be send by GitLab Workhorse (in every GitLab installation which has configured requests queuing) and by HaProxy (in case of GitLab.com). AFAIR none of these is sending the Retry-After header. The idea to support of this header is good, but it will be not used at all at this moment. We can spend some time and implement it now or do this when (and if) we decide to use this address in our API. I would prefer to go with the second way.

    I've added fixes including your comments. Can you review again?

  • @tmaczukin the code looks good to me now, just a question about the approach.

    If you're confident in the timings and how this will stack up in real use, feel free to merge :thumbsup:

  • assigned to @tmaczukin

  • Tomasz Maczukin resolved all discussions

    resolved all discussions

  • Author Maintainer

    @nick.thomas Can you approve the MR?

  • mentioned in issue #2449 (closed)

  • Tomasz Maczukin resolved all discussions

    resolved all discussions

  • Author Maintainer

    @ayufan MR is updated

  • assigned to @ayufan

  • Tomasz Maczukin resolved all discussions

    resolved all discussions

  • Tomasz Maczukin changed milestone to %9.3

    changed milestone to %9.3

  • Author Maintainer

    @ayufan I've updated the MR.

  • assigned to @ayufan

  • Kamil Trzcińśki approved this merge request

    approved this merge request

  • Please register or sign in to reply
    Loading