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

fix remote build hook #4342

Merged
merged 3 commits into from Dec 9, 2020
Merged

fix remote build hook #4342

merged 3 commits into from Dec 9, 2020

Conversation

thufschmitt
Copy link
Member

Store the final drv outputs in memory when building remotely

The DerivationGoal has a variable storing the “final” derivation
output paths that is used (amongst other things) to fill the environment
for the post build hook. However this variable wasn't set when the
build-hook is used, causing a crash when both hooks are used together.

Fix this by setting this variable (from the informations in the db) after a run
of the post build hook.

Fix #4245 (with a proper test this time)
/cc @bjornfor

This reverts commit 1b1e076.

Using `queryPartialDerivationOutputMap` assumes that the derivation
exists locally which isn't the case for remote builders.
The `DerivationGoal` has a variable storing the “final” derivation
output paths that is used (amongst other things) to fill the environment
for the post build hook. However this variable wasn't set when the
build-hook is used, causing a crash when both hooks are used together.

Fix this by setting this variable (from the informations in the db) after a run
of the post build hook.
@edolstra edolstra merged commit 253571e into NixOS:master Dec 9, 2020
@edolstra edolstra deleted the fix-remote-build-hook branch December 9, 2020 11:40
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.

post-build-hook broken when using remote builders
2 participants