Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream NARs from the remote to the destination store #795

Merged
merged 9 commits into from Jul 28, 2020

Conversation

edolstra
Copy link
Member

This PR makes the processing of incoming NARs work in O(1) memory (excluding the NAR content listing). It also makes Hydra build against the current Nix master.

A few other changes:

  • Removed SHA-1 hashes from the BuildProducts table. Since we now need to compute hashes over all regular files inside a NAR (because we might not have seen hydra-build-products yet) it's expensive to have a hash type that's deprecated anyway.
  • Removed TokenServer and the nar_buffer_size setting.

Fixes #794.

Flake input changes:

* Updated 'nix': 'github:NixOS/nix/1ab9da915422405452118ebb17b88cdfc90b1e10' -> 'github:NixOS/nix/d7c0f094cbcfe1ae4ccc3d54baec00b66ccb1ed0'
SHA-1 is deprecated and it will be expensive to compute with the
streaming NAR handler.
Comment on lines 127 to 128
// FIXME: use Store::topoSortPaths().
StorePaths topoSortPaths(const std::map<StorePath, ValidPathInfo> & paths)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah! I was just about to generalize Store::topoSortPaths myself!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NixOS/nix#3864 is what I ended up using

@edolstra edolstra merged commit 858eb41 into master Jul 28, 2020
@edolstra edolstra deleted the no-nar-accessors branch July 28, 2020 13:04
thefloweringash added a commit to thefloweringash/nixos-org-configurations that referenced this pull request Nov 16, 2020
The upstream property memoryTokensInUse was removed by cbcf6359 [1] in
NixOS/hydra#795 [2].

[1]: NixOS/hydra@cbcf635
[2]: NixOS/hydra#795
@ajs124
Copy link
Member

ajs124 commented Nov 16, 2020

It seems like this broke nix-support/hydra-build-products if they reference another output.

@edolstra could you maybe have a look at #827?

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.

importPaths incompatibility with latest nix
4 participants