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: 27b5ff354eb8
Choose a base ref
...
head repository: NixOS/nix
compare: f2f60bf5d6c9
Choose a head ref
  • 4 commits
  • 18 files changed
  • 2 contributors

Commits on Dec 11, 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::queryRealisation` method to retrieve the informations for a
      derivations
    
    This introcudes some redundancy on the remote-store side between
    `wopQueryDerivationOutputMap` and `wopQueryRealisation`.
    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 11, 2020
    Copy the full SHA
    58cdab6 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 11, 2020
    Copy the full SHA
    3ac9d74 View commit details
    Browse the repository at this point in the history
  3. Store the realisations as JSON in the binary cache

    Fix #4332
    thufschmitt authored and Théophane Hufschmitt committed Dec 11, 2020
    Copy the full SHA
    8914e01 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2020

  1. Merge pull request #4330 from NixOS/ca/properly-store-outputs

    Properly store the outputs of CA derivations − take 2
    edolstra committed Dec 14, 2020
    Copy the full SHA
    f2f60bf View commit details
    Browse the repository at this point in the history