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

align system retrieval with nix-build #1303

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/hydra-eval-jobs/hydra-eval-jobs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,14 @@ static void worker(

DrvInfo::Outputs outputs = drv->queryOutputs();

if (drv->querySystem() == "unknown")
throw EvalError("derivation must have a 'system' attribute");
auto drvContent = state.store->readDerivation(drv->requireDrvPath());
Copy link
Member

Choose a reason for hiding this comment

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

I'm concerned about how much IO this is going to introduce for a project like Nixpkgs.

Copy link
Member

Choose a reason for hiding this comment

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

I would expect them to still be in the page cache, but we could cache parsed derivations on the Nix side to save some context switches and a little bit of computation.

Copy link
Member

Choose a reason for hiding this comment

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

Also do we even need to return the system here? I have some doubts that we in fact do.


auto drvPath = state.store->printStorePath(drv->requireDrvPath());

nlohmann::json job;

job["nixName"] = drv->queryName();
job["system"] =drv->querySystem();
job["system"] = drvContent.platform;
job["drvPath"] = drvPath;
job["description"] = drv->queryMetaString("description");
job["license"] = queryMetaStrings(state, *drv, "license", "shortName");
Expand Down
Loading