Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
base: 6055039c8bd7^
Choose a base ref
...
head repository: NixOS/nix
compare: a898bfa8ac15
Choose a head ref
  • 2 commits
  • 18 files changed
  • 1 contributor

Commits on Dec 8, 2020

  1. Store metadata about drv outputs realisations

    For each known realisation, store:
    - its output
    - its output path
    
    This comes with a set of needed changes:
    
    - New `realisations` module declaring the types needed for describing
      these mappings
    - New `Store::registerDrvOutput` method registering all the needed informations
      about a derivation output (also replaces `LocalStore::linkDeriverToPath`)
    - new `Store::queryDrvOutputInfo` method to retrieve the informations for a
      derivations
    
    This introcudes some redundancy on the remote-store side between
    `wopQueryDerivationOutputMap` and `wopQueryDrvOutputInfo`.
    However we might need to keep both (regardless of backwards compat)
    because we sometimes need to get some infos for all the outputs of a
    derivation (where `wopQueryDerivationOutputMap` is handy), but all the
    stores can't implement it − because listing all the outputs of a
    derivation isn't really possible for binary caches where the server
    doesn't allow to list a directory.
    thufschmitt committed Dec 8, 2020
    Copy the full SHA
    6055039 View commit details
    Browse the repository at this point in the history
  2. Rework the db schema for derivation outputs

    Add a new table for tracking the derivation output mappings.
    
    We used to hijack the `DerivationOutputs` table for that, but (despite its
    name), it isn't a really good fit:
    
    - Its entries depend on the drv being a valid path, making it play badly with
      garbage collection and preventing us to copy a drv output without copying
      the whole drv closure too;
    - It dosen't guaranty that the output path exists;
    
    By using a different table, we can experiment with a different schema better
    suited for tracking the output mappings of CA derivations.
    (incidentally, this also fixes #4138)
    thufschmitt committed Dec 8, 2020
    Copy the full SHA
    a898bfa View commit details
    Browse the repository at this point in the history