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
Stop violating not null constraint #811
Stop violating not null constraint #811
Conversation
- Document the fields - Default most fields - Mostly validate fields - Allow rich values for `enabled` and `type` - Print all errors instead of only the first This also includes NixOS#811
src/lib/Hydra/Helper/AddBuilds.pm
Outdated
@@ -57,7 +57,7 @@ sub updateDeclarativeJobset { | |||
name => $name, | |||
type => $data->{type} | |||
}; | |||
$row->{emailresponsible} = $data->{emailresponsible} if defined $data->{emailresponsible}; | |||
$row->{emailresponsible} = $data->{emailresponsible} or 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be // 0
? I think or
binds very weakly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that doesn't matter, does it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't it parse as ($row->{emailresponsible} = $data->{emailresponsible}) or 0;
? I could be wrong.
NixOS/hydra#811 This is currently wedging our Hydra.
NixOS/hydra#811 This is currently wedging our Hydra.
@edolstra Fixed and rebased |
8213574
to
cb39225
Compare
Fixes this error: ERROR: failed to process declarative jobset test:inputs, DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR: null value in column "emailoverride" violates not-null constraint
cb39225
to
bd0ab9a
Compare
Fixes this error:
ERROR: failed to process declarative jobset test:inputs,
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st
execute failed: ERROR: null value in column "emailoverride" violates
not-null constraint
cc @basvandijk