drv-in-db: port nix's derivation tables to postgres + standalone daemon#1668
Open
amaanq wants to merge 2 commits intoNixOS:masterfrom
Open
drv-in-db: port nix's derivation tables to postgres + standalone daemon#1668amaanq wants to merge 2 commits intoNixOS:masterfrom
amaanq wants to merge 2 commits intoNixOS:masterfrom
Conversation
This is a direct port of the 6 normalized tables from https://github.com/NixOS/nix/tree/drv-in-db, adapted for Postgres: `jsonb_typeof` instead of `json_type`, native `text[]` for args, boolean `hasStructuredAttrs`, and serial PK since hydra has no `ValidPaths` table.
This commit adds a separate crate/exe that sits between the evaluator and the real nix daemon. It speaks the daemon protocol, proxies reads through to the host store, and when a .drv lands via add_to_store_nar it parses the ATerm and fans the result out into the 6 drv-in-db tables.
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.
Summary
The first commit is a direct port of the 6 normalized tables from NixOS/nix's
drv-in-dbbranch, and is adapted for Postgres:
jsonb_typeofinstead ofjson_type, nativetext[]for args, boolean
hasStructuredAttrs, and serial PK since hydra has noValidPathstable.The second commit adds a separate crate/exe that sits between the evaluator
and the real nix daemon. It speaks the daemon protocol, proxies reads
through to the host store, and when a .drv lands via add_to_store_nar
it parses the ATerm and fans the result out into the 6 drv-in-db tables.