Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
774cb52
fix: put temporary files into source root by default, not further out
fricklerhandwerk Feb 10, 2026
b990a25
chore: also garbage-collect failed evaluations
fricklerhandwerk Feb 10, 2026
e1856d5
chore: garbage-collect orphaned derivation metadata
fricklerhandwerk Feb 10, 2026
2aa82b7
Revert "perf: write `.drv` files to RAM during evaluation"
fricklerhandwerk Feb 11, 2026
d4e9e51
chore: remove dead code
fricklerhandwerk Feb 11, 2026
6ee9642
chore: don't spam logs with complete data structure
fricklerhandwerk Feb 11, 2026
0db0d8d
chore: more obvious name, log curiosities
fricklerhandwerk Feb 11, 2026
471af7f
feat: management command for triggering evaluations
fricklerhandwerk Feb 11, 2026
1950cc2
test: evaluated data actually shows up
fricklerhandwerk Feb 11, 2026
bb602b4
perf: bulk-insert licenses and maintainers
fricklerhandwerk Feb 11, 2026
c643c60
fix: remove GitHub name uniquness constraint
fricklerhandwerk Feb 11, 2026
e2eaf6a
test: prevent models and migrations to get out of sync
fricklerhandwerk Feb 11, 2026
5470d77
chore: Fix a typo when raising an error
Erethon Feb 11, 2026
dd42510
perf: drop derivation dependencies and outputs
fricklerhandwerk Feb 12, 2026
6236d32
perf: don't write `.drv` files
fricklerhandwerk Feb 13, 2026
2008867
test: maintainers get updated when ignoring/restoring package
fricklerhandwerk Feb 12, 2026
3223d22
refactor: move some business logic from view to model
fricklerhandwerk Feb 13, 2026
19226c2
feat: update maintainers from ignored packages in the view
fricklerhandwerk Feb 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions infra/staging.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
config,
pkgs,
lib,
...
}:
let
Expand All @@ -25,31 +24,6 @@ in
};
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];

# Given 16G RAM, this should be enough at the time of writing:
# - Postgres needs ~1.5G RAM
# - The application server needs <1G RAM
# - An evaluation of Nixpkgs peaks at 6-7G of RAM.
# - We run at most one instance of `nix-eval-jobs` concurrently.
# See `config.services.web-security-tracker.maxJobProcessors` to make sure.
# - We observe ~2M store paths in an active evaluation, taking ~5GB
# Adjust parameters (or get a bigger machine) if it doesn't work out.
systemd.mounts = [
{
what = "tmpfs";
where = "/tmp";
type = "tmpfs";
mountConfig.Options = lib.concatStringsSep "," [
"mode=1777"
"strictatime"
"rw"
"nosuid"
"nodev"
"size=37%"
"nr_inodes=4m"
];
}
];

systemd.network.networks."10-wan" = {
matchConfig.MACAddress = "96:00:03:d9:7c:85";
address = [
Expand Down
18 changes: 17 additions & 1 deletion nix/tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ pkgs.testers.runNixOSTest {
server.wait_for_unit("${application}-worker.service")
server.wait_for_unit("mock-channels.service")

with subtest("Check that no migrations were missed"):
server.succeed("wst-manage makemigrations --check --dry-run")

with subtest("Check that channel are fetched and evaluations enqueued"):
server.succeed("wst-manage fetch_all_channels")
${in-shell "succeed" ''
Expand Down Expand Up @@ -175,10 +178,23 @@ pkgs.testers.runNixOSTest {
${
# XXX(@fricklerhandwerk): We do this at the end since it takes a while and would otherwise stall the Django tests.
in-shell "wait_until_succeeds" ''
from shared.models import NixEvaluation
from shared.models import (
NixEvaluation,
NixDerivation,
NixDerivationMeta,
NixMaintainer,
NixLicense,
)
assert NixEvaluation.objects.filter(
state=NixEvaluation.EvaluationState.COMPLETED,
).count() == 3
for model, count in [
(NixDerivation, 3),
(NixDerivationMeta, 3),
(NixMaintainer, 1),
(NixLicense, 1),
]:
assert model.objects.count() == count, f"{model._meta.object_name}: expected {count}, got {model.objects.count()}"
''
}
'';
Expand Down
4 changes: 2 additions & 2 deletions src/project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ class AppSettings(BaseModel):
MAX_PARALLEL_EVALUATION = 3
# Where are the stderr of each `nix-eval-jobs` stored.
EVALUATION_LOGS_DIRECTORY: str = str(
Path(BASE_DIR / ".." / ".." / "nixpkgs-evaluation-logs").resolve()
Path(BASE_DIR / ".." / "nixpkgs-evaluation-logs").resolve()
)
CVE_CACHE_DIR: str = str(Path(BASE_DIR / ".." / ".." / "cve-cache").resolve())
CVE_CACHE_DIR: str = str(Path(BASE_DIR / ".." / "cve-cache").resolve())
# This can be tuned for your specific deployment,
# this is used to wait for an evaluation slot to be available
# It should be around the average evaluation time on your machine.
Expand Down
Loading
Loading