queue-runner: persist resolved drv paths in the database#1698
Draft
Ericson2314 wants to merge 1 commit into
Draft
queue-runner: persist resolved drv paths in the database#1698Ericson2314 wants to merge 1 commit into
Ericson2314 wants to merge 1 commit into
Conversation
9158a08 to
ef8a9a7
Compare
2fe0b92 to
7d6d001
Compare
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.
7d6d001 to
a05f13f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the in-memory
resolved_drv_mapwith aresolvedDrvPathcolumn onBuildSteps(migration upgrade-86). Theresolve_drv_output_chainsSQL query now joins through this column to follow unresolved → resolved chains when looking up outputs, so the mapping survives restarts.try_resolveno longer needs the in-memory map or the depth-1resolve_drv_outputloop; the recursive SQL handles resolution transparently. A step withstatus = 13(Resolved) always has a non-nullresolvedDrvPath(enforced by a check constraint), and the query uses it to look up outputs from the resolved drv's successful buildstep instead.