Commit graph

14 commits

Author SHA1 Message Date
92844d302e
fc-common: properly implement GitHub API rate limiting; cleanup
More or less mimics Hydra's `GithubStatus.pm` adaptive throttling:

- Log rate limit status when remaining <= 2000
- Sleep when remaining <= 1000

Adaptive delay spreads requests over reset window. Rate limits are
extracted from *every response* for better accuracy. Accuracy is
*critical* because the primary failure is to get rate limited more
often due to miscalculation.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I3b1fa444c937715c604002d71510bcf76a6a6964
2026-02-28 23:58:41 +03:00
4050de5b4e
fc-common: GitHub rate limit state extraction
Extract `X-RateLimit-*` headers from responses and calculate an adaptive
delay. Minimum delay is 1 seconds to prevent division by 0.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ib35b0d0e720098e2c68ced88a8821c7b6a6a6964
2026-02-28 23:58:40 +03:00
85a43c8ca0
fc-common: add commit status lifecycle notifications
Helpers for sending forge status updates when builds are created and
claimed.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Iddca8b33fc31a9e23968752ef112e0d26a6a6964
2026-02-28 17:37:58 +03:00
a127f3f62c
treewide: address all clippy lints
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5cf55cc4cb558c3f9f764c71224e87176a6a6964
2026-02-28 17:37:53 +03:00
21446c6dcb
fc-queue-runner: implement persistent notification retry queue with exponential backoff
Adds a `notification_tasks` table and a background worker to (hopefully
reliably) deliver webhooks, git status updates, and e-mail notifications
with automatic retry on transient failures.

This was one of the critical gaps, finally done.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I794967c66958658c4d8aed40793d67f96a6a6964
2026-02-28 12:18:18 +03:00
e7425e0abf
fc-common: consolidate database migrations; simplify
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia808d76241cec6e8760d87443bb0dc976a6a6964
2026-02-28 12:18:13 +03:00
5b7648220c
fc-common: update notifications to handle all BuildStatus variants
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I99db557ae204f3a4ffec6be70386ecc16a6a6964
2026-02-16 13:02:24 +03:00
f7081317ee
various: reuse HTTP client; eliminate intermediate string allocations; add tests
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I18b89e1aae78a400a89c9d89423ce1da6a6a6964
2026-02-15 23:37:52 +03:00
3a03cf7b3e
treewide: format with nightly rustfmt; auto-fix Clippy lints
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: If4fd0511087dbaa65afc56a34d7c2f166a6a6964
2026-02-08 22:23:28 +03:00
73919f2f9e
treewide: format with nightly rustfmt; auto-fix Clippy lints
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I15d9215ab506b37954468d99746098326a6a6964
2026-02-08 22:23:20 +03:00
8c1968c863
common: improve notifications system
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I084bb95a4eb79d5a15f7c062c112124c6a6a6964
2026-02-07 22:09:23 +03:00
c306383d27
chore: format with updated rustfmt and taplo rules
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ie9ef5fc421fa20071946cf1073f7920c6a6a6964
2026-02-05 22:45:06 +03:00
a52c61556a
crates/common: enhance notifications and GC roots handling
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8a19eeda480672f8f22adbafb3039db66a6a6964
2026-02-02 01:49:29 +03:00
1b12be3f8a
crates: production models and repo layer
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Iceb76724c09eaca7ca5d823010db76776a6a6964
2026-02-02 01:15:05 +03:00