Commit graph

41 commits

Author SHA1 Message Date
caadb52f64
common: enhance user repository with validation
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic96bef36e3b4d1ea6b2db9752b26dd3a6a6a6964
2026-02-07 22:09:22 +03:00
a9e9599d5b
server: add OAuth2 authentication routes
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Icacb5359f4d05d53d4c1b60cc2c0f4f66a6a6964
2026-02-07 22:09:21 +03:00
2eae49f313
fc: initial pull request evaluation support
The migration adds PR support, models expose PR fields, webhooks handle
PR events, and tests validate it. To be honest the migrations are a bit
redundant at the moment, but I'd like to handle my old deployments so
it's nice(r) to have them. I *am* testing those on baremetal.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I02fb4540b62d3e8159ac18b9fa63be916a6a6964
2026-02-07 22:09:20 +03:00
1c18306822
various: eliminate redundant disk check; improve error handling
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I1f37cc60380790bc1bf11f143194ad116a6a6964
2026-02-05 23:05:02 +03:00
d620ec5454
fc-server: fix clippy warnings about manual clamp patterns
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5cc30a1f6f7444a7acd836430ad44a576a6a6964
2026-02-05 22:48:05 +03:00
4b375bc546
various: remove unused imports and parameters; fix clippy lints
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia7a4438e1aa73de2ea1bc6cdf26998f06a6a6964
2026-02-05 22:45:23 +03:00
dec4753567
fc-server: add (more) advanced search API
Basically, implements a multi-entity search functionality with filters
for projects, jobsets, evaluations and builds. Also fixes COUNT query to
apply same filters as main query, and fixes an offset mismatch in
response. Some integration tests have also been added, but chances are
we'll want to write VM tests for this.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Icdda77966a7218f54fd34b78bdc9b55c6a6a6964
2026-02-05 22:45:22 +03:00
b3125a89d8
fc-server: return INSUFFICIENT_STORAGE for disk space errors
Eugh. Need I explain this? We now return a HTTP 507 INSUFFICIENT_STORAGE
for disk space errors rather than letting it all go to shit. Some better
error handling for disk/IO errors. See previous commit also.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ieb6d6415ff8a7209590217933c6992796a6a6964
2026-02-05 22:45:21 +03:00
550603c4bb
fc-common: add disk space monitoring and error handling
Adds a `DiskSpace` error variant and an `is_disk_full()` helper
alongside a `check_disk_space()` util that uses libc's `statsfs` on
unix. FC now detects disk space errors and logs recovery instructions
if applicable.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia6d2c472219dc9d6eed6901dc733d7bb6a6a6964
2026-02-05 22:45:20 +03:00
e21ca49656
chore: bump dependencies; remove deprecated asakama_axum dep
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8d170814c450e293bff8a876cb2862bb6a6a6964
2026-02-05 22:45:19 +03:00
4d8564f56b
fc-server: restore dashboard routes; add extract_session middleware
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I91b71875b936ba2a1efbede1cb1ed4886a6a6964
2026-02-05 22:45:18 +03:00
f974e3dd16
fc-common: test user management fully
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Id144b7ba20283599437b0af86f8d716d6a6a6964
2026-02-05 22:45:15 +03:00
7a0645c123
fc-server: update login form to support username/password
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I42a7e0674a380896d12cf9ab82417d326a6a6964
2026-02-05 22:45:14 +03:00
b6287a2030
fc-server: add user management REST API endpoints
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I25545df3273967086f8473d3f92c30736a6a6964
2026-02-05 22:45:13 +03:00
37e4575ef7
fc-server: add dual authentication support; support user accs
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I3603e4b3cc8b5999fe1edafe8a38efb26a6a6964
2026-02-05 22:45:12 +03:00
f5c54b1e05
fc-common: implement user management repository layer
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I020c2fd3b061b5a671fe75d50048519f6a6a6964
2026-02-05 22:45:11 +03:00
1af7b5c82e
fc-common: add user management models and DTOs
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ieac472b29092b38be1d6c0af3173e8d26a6a6964
2026-02-05 22:45:10 +03:00
a3155f54e8
fc-common: validation and roles modules
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Idc4d0743153c77b4dd915a95a603680f6a6a6964
2026-02-05 22:45:09 +03:00
8d07063d3f
db: add migration 008 for user management tables
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I99349ba4b389b525d66d0109a66243736a6a6964
2026-02-05 22:45:08 +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
605b1a5181
crates/server: update tests for new jobset fields and routes
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I2841d60774da431db3e72c73d99392e16a6a6964
2026-02-02 02:45:19 +03:00
0782d891f1
crates/server: add project setup endpoint and update routes
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9087c90a3b81cfa6f148a8d0131e87796a6a6964
2026-02-02 01:49:38 +03:00
b4d3c9d501
crates/server: update templates with improved dashboard and styling
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I07f9de61588f61aae003f78c30fd6d326a6a6964
2026-02-02 01:49:35 +03:00
92153bf9aa
crates/server: enhance auth middleware and error responses
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I48a780779d884c4a7730347f920b91216a6a6964
2026-02-02 01:49:34 +03:00
000fb8994f
crates/server: add jobset input CRUD API routes
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic43064296a4a7eb5a7ee4f52529dae2f6a6a6964
2026-02-02 01:49:33 +03:00
c0df24c6e1
crates/queue-runner: add cache upload config and worker improvements
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I781a843b88a9b62b929a8d0407274bc86a6a6964
2026-02-02 01:49:32 +03:00
00a4dc8d37
crates/evaluator: add multi-branch evaluation support
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ida40acb8d093f7d7e387913681b767276a6a6964
2026-02-02 01:49:31 +03:00
095d107112
crates/common: update tests for new jobset fields
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8acc93cf9870926967258996fdcd37776a6a6964
2026-02-02 01:49:30 +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
2378ff6661
crates/common: update repos for weighted scheduling and jobset inputs
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I0fe2ceb20dc6692f3315185765ea80756a6a6964
2026-02-02 01:49:28 +03:00
4c5a99d554
crates/common: add branch and scheduling_shares to jobset models
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ie19897f5ffdfb44654891511ce669d806a6a6964
2026-02-02 01:49:27 +03:00
be9caa0b61
crates/common: add bootstrap, tracing_init, and nix_probe modules
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ifbc17b000a4fb4a10e05ac9405582a366a6a6964
2026-02-02 01:49:26 +03:00
9fd901bc7f
crates/common: add migration for multi-branch eval and scheduling shares
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I3f792d0e081da93adbcf60bff8570eed6a6a6964
2026-02-02 01:49:25 +03:00
235d3d38a6
crates/server: REST API routes; RBAC auth middleware; cookie sessions; dashboard
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5298a925bd9c11780e49d8b1c98eebd86a6a6964
2026-02-02 01:15:08 +03:00
44d1ee1d6b
queue-runner: semaphore-based worker pool with atomic build claiming
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ie3a8d343c3705200f0cac566227db54f6a6a6964
2026-02-02 01:15:07 +03:00
3fd40b7e07
crates/evaluator: eval loop with git polling and nix-eval-jobs integration
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I291a411b1b06cf821e09f3d5a61403196a6a6964
2026-02-02 01:15:06 +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
cbf16a7e63
common: add basic database tests; skip when DB unavailable
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I10be55f54495c07de19ed26a03c9596c6a6a6964
2026-02-02 01:15:02 +03:00
0e6d249e0f
common: initial database handling
Can be configured from the config file, and also using environment
options.

```toml
[database]
url = "postgresql://fc_ci:password@localhost/fc_ci"
max_connections = 20
min_connections = 5
connect_timeout = 30
idle_timeout = 600
max_lifetime = 1800
```

We'll want to support SQlite in the future, and better secret handling
for database credentials. For now, this is workable.

---

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I36b4c1306511052a2748ca9d5d3429366a6a6964
2026-02-02 01:15:01 +03:00
a4c3cd1517
meta: add database migrations; set up migration CLI
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I0cbc9798243134d36f788099ecc3ee5a6a6a6964
2026-02-02 01:15:00 +03:00
6203ea7f52
initial commit
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I79a875e75937ff6b3739ca36bfb0b2836a6a6964
2026-02-02 01:14:56 +03:00