hydra/src
Ismaël Bouya 339a09f2e4
Fix check in jobsets
The current check happening in jobsets is incorrect.
The wanted constraint is stated as follow :
- If type is 0 (legacy), then the flake field should be null, and
  both nixExprInput and nixExprPath should be non-null
- If type is 1 (flake), then the flake field should be non-null, and
  both nixExprInput and nixExprPath should be null

The current version will not catch (i.e. it will accept) situations
where you have for instance :
type = 1, nixExprPath null, nixExprInput non-null, flake non-null

This commit fixes that.

I split(ted) that into two constraints, to make it more readable and
easier to extend if a new type appears in the future.

The complete query could be instead :
( type = 0
  AND nixExprInput IS NOT NULL AND nixExprPath IS NOT NULL AND flake IS NULL )
OR ( type = 1
  AND nixExprInput IS NULL AND nixExprPath IS NULL AND flake IS NOT NULL )

(but an "OR" cannot be split, hence the other formulation)
2021-02-03 22:14:53 +01:00
..
hydra-eval-jobs Update for Nix Value::type API changes 2020-12-29 17:25:51 -06:00
hydra-evaluator hydra-evaluator: clean up names, clean up & / * spacing 2021-01-28 09:15:19 -05:00
hydra-queue-runner Update for receiveContents taking string_view 2020-12-26 11:23:26 +00:00
lib Merge pull request #855 from grahamc/jobsetevals-fixups 2021-02-02 11:04:18 -05:00
libhydra Fix build 2020-07-08 12:50:02 +02:00
root Move evaluation errors from evaluations to EvaluationErrors, a new table 2021-02-01 21:33:14 -05:00
script Move evaluation errors from evaluations to EvaluationErrors, a new table 2021-02-01 21:33:14 -05:00
sql Fix check in jobsets 2021-02-03 22:14:53 +01:00
ttf Add font for the captcha 2013-03-04 12:16:13 +01:00
Makefile.am Revert "hydra-eval-jobs -> nix eval-hydra-jobs" 2020-02-19 20:36:52 +01:00
Makefile.PL * Move everything up one directory. 2009-03-05 13:41:57 +00:00