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

hydra jobsetevals is sorted assending #18

Open
twhitehead opened this issue Jun 29, 2018 · 1 comment
Open

hydra jobsetevals is sorted assending #18

twhitehead opened this issue Jun 29, 2018 · 1 comment

Comments

@twhitehead
Copy link

@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":{}
}
twhitehead added a commit to twhitehead/nixos-channel-scripts that referenced this issue Jun 29, 2018
@edolstra
Copy link
Member

Hm, tricky. I think selecting the oldest one may actually be better because it's stable (we won't create a new release if the release job didn't change). For the NixOS/Nixpkgs jobsets, we ensure that the release job changes on every commit by including the revision in the release job's name attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants