Skip to content

queue-runner: persist resolved drv paths in the database#1698

Draft
Ericson2314 wants to merge 1 commit into
NixOS:masterfrom
obsidiansystems:ca-resolve-two-phase-db
Draft

queue-runner: persist resolved drv paths in the database#1698
Ericson2314 wants to merge 1 commit into
NixOS:masterfrom
obsidiansystems:ca-resolve-two-phase-db

Conversation

@Ericson2314
Copy link
Copy Markdown
Member

Replace the in-memory resolved_drv_map with a resolvedDrvPath column on BuildSteps (migration upgrade-86). The resolve_drv_output_chains SQL query now joins through this column to follow unresolved → resolved chains when looking up outputs, so the mapping survives restarts.

try_resolve no longer needs the in-memory map or the depth-1 resolve_drv_output loop; the recursive SQL handles resolution transparently. A step with status = 13 (Resolved) always has a non-null resolvedDrvPath (enforced by a check constraint), and the query uses it to look up outputs from the resolved drv's successful buildstep instead.

@Ericson2314 Ericson2314 force-pushed the ca-resolve-two-phase-db branch 3 times, most recently from 9158a08 to ef8a9a7 Compare May 6, 2026 17:16
@Ericson2314 Ericson2314 force-pushed the ca-resolve-two-phase-db branch 2 times, most recently from 2fe0b92 to 7d6d001 Compare May 14, 2026 18:49
Replace the in-memory `resolved_drv_map` with a `resolvedDrvPath`
column on `BuildSteps` (migration upgrade-86). The
`resolve_drv_output_chains` SQL query now joins through this column to
follow unresolved → resolved chains when looking up outputs, so the
mapping survives restarts.

`try_resolve` no longer needs the in-memory map or the depth-1
`resolve_drv_output` loop; the recursive SQL handles resolution
transparently. A step with `status = 13` (`Resolved`) always has a
non-null `resolvedDrvPath` (enforced by a check constraint), and the
query uses it to look up outputs from the resolved drv's successful
buildstep instead.
@Ericson2314 Ericson2314 force-pushed the ca-resolve-two-phase-db branch from 7d6d001 to a05f13f Compare May 15, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant