Add add-mirrors endpoint on mirrorbrain
- Dominant language
- Python
- Stars
- 15
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
With our current mirrbrain configuration, there's no easy way to know which mirror holds a copy of a certain file. We used to rely on `?mirrorlist` endpoint because all our mirrors were able to serve all clients.
Now that it's not the case, `?mirrorlist` only lists the mirrors that can serve the client calling. That means it excludes all the `[region|country|as]-only` which doesn't match the calling client.
There is no other endpoint providing this information. Information is in the DB though.
Because it's **very useful** to have access to this information (and because we tend to forget that `?mirrorlist` is not reliable anymore and panic), we could create such an endpoint.
I didn't create this on mirrorbrain repo because the motive is purely ops-related but the simplest way to do it is probably to tweak the mod_mirrobrain to send it. Saves us the trouble of deployment and connecting to the DB (but it's in C).
Contributor guide
Research direction
Start by examining mod_mirrorbrain and the existing ?mirrorlist endpoint; determine how mirror data is read from the database and how region-, country-, and as-only mirrors are filtered. Define an endpoint that exposes all mirrors holding a requested file, then verify it includes mirrors excluded for the calling client.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100