-
Notifications
You must be signed in to change notification settings - Fork 7
Record builder host name in build provenance #341
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ nlohmann::json BuildProvenance::to_json() const | |
| {"type", "build"}, | ||
| {"drv", drvPath.to_string()}, | ||
| {"output", output}, | ||
| {"buildHost", buildHost}, | ||
| {"next", next ? next->to_json() : nlohmann::json(nullptr)}, | ||
| }; | ||
| } | ||
|
|
@@ -18,8 +19,12 @@ Provenance::Register registerBuildProvenance("build", [](nlohmann::json json) { | |
| std::shared_ptr<const Provenance> next; | ||
| if (auto p = optionalValueAt(obj, "next"); p && !p->is_null()) | ||
| next = Provenance::from_json(*p); | ||
| return make_ref<BuildProvenance>( | ||
| StorePath(getString(valueAt(obj, "drv"))), getString(valueAt(obj, "output")), next); | ||
| std::optional<std::string> buildHost; | ||
| if (auto p = optionalValueAt(obj, "buildHost")) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if it would also be a good idea to include the native architecture, if that's easy to get...
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related to that, we should probably record the |
||
| buildHost = p->get<std::optional<std::string>>(); | ||
| auto buildProv = make_ref<BuildProvenance>( | ||
| StorePath(getString(valueAt(obj, "drv"))), getString(valueAt(obj, "output")), buildHost, next); | ||
| return buildProv; | ||
| }); | ||
|
|
||
| nlohmann::json CopiedProvenance::to_json() const | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.