-
-
Notifications
You must be signed in to change notification settings - Fork 309
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 build against nix 2.7 #1171
Conversation
fix build after such commits as df552ff53e68dff8ca360adbdbea214ece1d08ee and e862833ec662c1bffbe31b9a229147de391e801a
auto localStore = state.store.dynamic_pointer_cast<LocalFSStore>(); | ||
auto drvPath = localStore->printStorePath(drv->requireDrvPath()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localStore
might be null
, please do not do this way.
auto localStore = state.store.dynamic_pointer_cast<LocalFSStore>(); | |
auto drvPath = localStore->printStorePath(drv->requireDrvPath()); | |
auto drvPath = state.store->printStorePath(drv->requireDrvPath()); |
@@ -201,7 +202,6 @@ static void worker( | |||
/* Register the derivation as a GC root. !!! This | |||
registers roots for jobs that we may have already | |||
done. */ | |||
auto localStore = state.store.dynamic_pointer_cast<LocalFSStore>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put back
@@ -210,7 +210,7 @@ static void worker( | |||
|
|||
nlohmann::json out; | |||
for (auto & j : outputs) | |||
out[j.first] = j.second; | |||
out[j.first] = localStore->printStorePath(j.second); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out[j.first] = localStore->printStorePath(j.second); | |
out[j.first] = state.store->printStorePath(j.second); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deployed to my own Hydra, seems to work fine 👍
@edolstra Feel comfortable merging this one? |
I feel like we should hold off on this, due to the recent issues with Hydra that maybe are connected to the bump to 2.6 (e.g. see the Infra and Infra alerts channels on Matrix, where this has been a ~hot topic). |
Oh, I didn't know about that. Bummer. Perhaps we need a way to disable non-blocking GC until the kinks are worked out? (Note, they could be Hydra side, e.g. a lack of temp roots, too.) Per #1166 I would say we need a staging branch for every version of Nix newer than the on on So we could revert 2,6 on master, but then revert the revert on |
@cole-h Do you have more info on those issues? |
I would prefer it if we can allow Hydra to build against 2.4 and up. We had to revert back to 2.4, because we were getting builds that kept hanging, which significantly disrupted our builds. |
@rbvermaa The Nix internals change too much for that to be possible at this time. But we could keep the branches tied to older Nix around afterwords. |
It seems surprising to me to not support the versions of nix that are provided in NixOS stable channel. |
@rbvermaa Hydra has always been built against a single version of Nix. The daemon protocol is meant to be interoperable, so other Nix versions for the builders will work. (And I have unmerged PRs to test that interoperability.) Hydra previously was pinned to random Nix versions. In recent months, The Nix it is pinned to is always stable version of Nix. This is definitely an improvement. |
Applied in #1188. |
Includes #1161 (@Ma27)
not particularly well tested, but builds and tests pass (I think)