NixOS / hydra

Hydra, the Nix-based continuous build system
http://nixos.org/hydra
GNU General Public License v3.0
1.19k stars 304 forks source link

Make jobs unique #60

Open edolstra opened 11 years ago

edolstra commented 11 years ago

Currently a jobset evaluation can produce multiple builds with the same job name. This is bad because it means jobs don't really have a distinct identity.

This means many job-based comparisons in Hydra are very fuzzy: for instance, finding the last job status change is not well defined if there are multiple jobs with the same name. (E.g. in the previous eval, one "foo" build could have failed while the other succeeded. Then if in the current eval one fails and the other succeeds, we cannot really say if their status changed: they may have both flipped, or both stayed the same. We do use the system type to distinguish between builds, but that's very ad hoc.)

So we should make jobs unique in a jobset eval, i.e., within an eval there should be at most one build with a given job name.

Implementation / consequences:

edolstra commented 11 years ago

Some stats on the non-uniqueness of (job, system): there are only 431 jobset evaluations (out of 261549) that contain multiple builds with the same (job, system). Mostly gnu:libidn-master, ltsmin:ltsmin-trunk and strategoxt:stratego-libraries-trunk.

Generated using:

select project, jobset, id from jobsetevals e where hasnewbuilds = 1 and exists 
  (select 1 from builds b join jobsetevalmembers on b.id = build and eval = e.id 
   group by job, system having count(*) > 1);
shlevy commented 11 years ago

Maybe you explained this already, but how will Build output (same system) work? Require adding a separate jobset input for each supported system?

gilligan commented 4 years ago

@edolstra is this still relevant? You made various changes that contribute to this. Maybe you want to update the description with a list of items that would still have to be done to get this closed.

edolstra commented 4 years ago

Yes, it's still relevant.