Do not abort the run on one refused user write #83

Stängd
öppnade 2026-10-08 21:12:31 +00:00 av supernaut · 0 kommentarer
Ägare

What

setOrgCreate throws on any non-2xx. addUserToQuotaGroup throws on anything but 2xx or 409. Either one aborts the whole user loop.

Why

Users after the failing one, in Forgejo id order, are not reconciled that run. A permanent failure starves them for good. setOrgCreate also bypasses the unreachable-host check.

Failing case

A user is deleted between the list call and the PATCH. The run aborts with HTTP 404. A permanent 422 on one account does the same every run.

Fix

Return a status from setOrgCreate. Treat 404 as skip with a warning. Treat other refusals as warn, count, flag degraded under its own gauge, and continue. Keep the abort for status 0. Apply the same rule to the quota add.

Done when

  • A fake that refuses one user does not stop later users
  • The degraded gauge is raised on a refusal
  • Tests cover 404, 422 and status 0
## What `setOrgCreate` throws on any non-2xx. `addUserToQuotaGroup` throws on anything but 2xx or 409. Either one aborts the whole user loop. ## Why Users after the failing one, in Forgejo id order, are not reconciled that run. A permanent failure starves them for good. `setOrgCreate` also bypasses the unreachable-host check. ## Failing case A user is deleted between the list call and the PATCH. The run aborts with HTTP 404. A permanent 422 on one account does the same every run. ## Fix Return a status from `setOrgCreate`. Treat 404 as skip with a warning. Treat other refusals as warn, count, flag degraded under its own gauge, and continue. Keep the abort for status 0. Apply the same rule to the quota add. ## Done when - [ ] A fake that refuses one user does not stop later users - [ ] The degraded gauge is raised on a refusal - [ ] Tests cover 404, 422 and status 0
Logga in för att delta i denna konversation.
Ingen milstolpe
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-auth-reconciler#83
Ingen beskrivning angiven.