Skip to content

repo-updater: Sync rate limiter before service

Warren Gifford requested to merge rs/switch-sync-order into main

Created by: ryanslade

When a new service is added then syncing the service first means we won't have a rate limiter in place yet. When we first attempt to make an API call we'll lazily add a default infinite limiter.

In theory the rate limit sync should replace it shortly afterwards but we're seeing cases of infinite limiters in production and this is one area that could be the culprit.

We have a 15 second timeout when performing the initial sync so what may be happening in production is that the initial sync takes longer than 15 seconds in some cases so the sync fails and we don't get to the point in the code where we sync the rate limiter.

Test plan

Tested locally

Merge request reports

Loading