Skip to content

hydra jobsetevals is sorted assending #18

Closed
@twhitehead

Description

@twhitehead

@edolstra Was trying to figure out why a script I wrote based on mirror-nixos-branch wasn't working. Finally tracked it down to the fact that that the jobsetevals attribute is sorted in ascending order.

This means that this code

my $evalId = $releaseInfo->{jobsetevals}->[0] or die;

references the oldest jobseteval and not the newest.

You can see this here via the following curl request to our hydra server. The official nixos one seems to rarely have more than one evaluation on tap, so this is harder to see (and catch) on it.

curl -LH "Accept: application/json" https://hydra.sharcnet.ca/job/ccpkgs/ccpkgs-17.09/tested/latest-finished
{"jobset":"ccpkgs-17.09"
,"id":125368
,"buildmetrics":{}
,"timestamp":1529286374
,"buildstatus":0
,"system":"x86_64-linux"
,"stoptime":1529532645
,"nixname":"ccpkgs-17.09"
,"releasename":null
,"buildoutputs":
  {"out":{"path":"/nix/store/xbkrm8jvd92w96skjjfs7140ib17yrib-ccpkgs-17.09"}}
,"starttime":1529532645
,"finished":1
,"project":"ccpkgs"
,"drvpath":"/nix/store/0lb0qv0wagxb7w3a9dbnq7qmjlwll93b-ccpkgs-17.09.drv"
,"jobsetevals":[101,107]
,"job":"tested"
,"priority":100
,"buildproducts":{}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions