Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/hydra
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 014e5aa10db2
Choose a base ref
...
head repository: NixOS/hydra
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c8fa7ffc126e
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Dec 29, 2018

  1. hydra-eval-jobs: fix maintainer resolution

    Some time ago the data structure for maintainer descriptions in
    `nixpkgs` changed from a simple attr set with maintainer emails as
    values to an attribute set where the maintainer' nick is associated to
    an attribute set with email, GitHub handle and full name.
    
    Hydra can either parse a Nix list or fetches `shortName` from the
    associated attribute set (which is used for `meta.licenses` as each
    value in it contains a `shortName`). This behavior needs to be
    replicated for maintainers to retrieve the emails for `hydra-notify`.
    
    This change is backwards-compatible since `queryMetaStrings` is still
    able to understand lists, so old versions of `nixpkgs` or packages using
    the old maintainer data structure remain usable.
    Ma27 committed Dec 29, 2018
    Copy the full SHA
    aa87e7a View commit details

Commits on Mar 17, 2019

  1. Merge pull request #629 from Ma27/fix-maintainer-notifications

    hydra-eval-jobs: fix maintainer resolution
    grahamc authored Mar 17, 2019
    Copy the full SHA
    c8fa7ff View commit details
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/hydra-eval-jobs/hydra-eval-jobs.cc
8 changes: 4 additions & 4 deletions src/hydra-eval-jobs/hydra-eval-jobs.cc
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ static void findJobs(EvalState & state, JSONObject & top,
Bindings & autoArgs, Value & v, const string & attrPath);


static string queryMetaStrings(EvalState & state, DrvInfo & drv, const string & name)
static string queryMetaStrings(EvalState & state, DrvInfo & drv, const string & name, const string & subAttribute)
{
Strings res;
std::function<void(Value & v)> rec;
@@ -42,7 +42,7 @@ static string queryMetaStrings(EvalState & state, DrvInfo & drv, const string &
for (unsigned int n = 0; n < v.listSize(); ++n)
rec(*v.listElems()[n]);
else if (v.type == tAttrs) {
auto a = v.attrs->find(state.symbols.create("shortName"));
auto a = v.attrs->find(state.symbols.create(subAttribute));
if (a != v.attrs->end())
res.push_back(state.forceString(*a->value));
}
@@ -117,9 +117,9 @@ static void findJobsWrapped(EvalState & state, JSONObject & top,
res.attr("system", drv->querySystem());
res.attr("drvPath", drvPath = drv->queryDrvPath());
res.attr("description", drv->queryMetaString("description"));
res.attr("license", queryMetaStrings(state, *drv, "license"));
res.attr("license", queryMetaStrings(state, *drv, "license", "shortName"));
res.attr("homepage", drv->queryMetaString("homepage"));
res.attr("maintainers", queryMetaStrings(state, *drv, "maintainers"));
res.attr("maintainers", queryMetaStrings(state, *drv, "maintainers", "email"));
res.attr("schedulingPriority", drv->queryMetaInt("schedulingPriority", 100));
res.attr("timeout", drv->queryMetaInt("timeout", 36000));
res.attr("maxSilent", drv->queryMetaInt("maxSilent", 7200));