Add isChannel column and meta attribute.
This is to properly separate channels from regular jobs and also make sure that we can always iterate on them, no matter whether the build has failed. The reason why we were not able to do this until now was because we were iterating on the build products, and whenever some constituent of a channel job has failed, we didn't get a build output. So whenever there is a meta.isHydraChannel, we can now properly distinguish it from the other jobs. I still don't have any clue, why "make -C src/sql update-dbix" without *any* modifications tries to create additional schema definitions. But I've checked the md5sums of the existing schema definitions and they don't seem to match, so it seems that they already have been tampered with. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
a235de3ad7
commit
06b76ab275
|
@ -127,6 +127,7 @@ static void findJobsWrapped(EvalState & state, JSONObject & top,
|
|||
res.attr("schedulingPriority", drv.queryMetaInt("schedulingPriority", 100));
|
||||
res.attr("timeout", drv.queryMetaInt("timeout", 36000));
|
||||
res.attr("maxSilent", drv.queryMetaInt("maxSilent", 7200));
|
||||
res.attr("isChannel", drv.queryMetaBool("isHydraChannel", false));
|
||||
|
||||
/* If this is an aggregate, then get its constituents. */
|
||||
Bindings::iterator a = v.attrs->find(state.symbols.create("_hydraAggregate"));
|
||||
|
|
|
@ -448,6 +448,7 @@ sub checkBuild {
|
|||
, busy => 0
|
||||
, locker => ""
|
||||
, iscurrent => 1
|
||||
, ischannel => $buildInfo->{isChannel}
|
||||
});
|
||||
|
||||
$build->buildoutputs->create({ name => $_, path => $buildInfo->{outputs}->{$_} })
|
||||
|
|
|
@ -116,6 +116,12 @@ __PACKAGE__->table("Builds");
|
|||
default_value: 36000
|
||||
is_nullable: 1
|
||||
|
||||
=head2 ischannel
|
||||
|
||||
data_type: 'integer'
|
||||
default_value: 0
|
||||
is_nullable: 1
|
||||
|
||||
=head2 iscurrent
|
||||
|
||||
data_type: 'integer'
|
||||
|
@ -239,6 +245,8 @@ __PACKAGE__->add_columns(
|
|||
{ data_type => "integer", default_value => 3600, is_nullable => 1 },
|
||||
"timeout",
|
||||
{ data_type => "integer", default_value => 36000, is_nullable => 1 },
|
||||
"ischannel",
|
||||
{ data_type => "integer", default_value => 0, is_nullable => 1 },
|
||||
"iscurrent",
|
||||
{ data_type => "integer", default_value => 0, is_nullable => 1 },
|
||||
"nixexprinput",
|
||||
|
@ -558,8 +566,8 @@ __PACKAGE__->many_to_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-08-10 15:10:41
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rjifgnPtjY96MaQ7eiGzaA
|
||||
# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-09-10 17:34:23
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JRelp13Cyfi+QVxC92xuqQ
|
||||
|
||||
__PACKAGE__->has_many(
|
||||
"dependents",
|
||||
|
|
|
@ -157,6 +157,7 @@ create table Builds (
|
|||
maxsilent integer default 3600, -- meta.maxsilent
|
||||
timeout integer default 36000, -- meta.timeout
|
||||
|
||||
isChannel integer default 0, -- meta.isHydraChannel
|
||||
isCurrent integer default 0,
|
||||
|
||||
-- Copy of the nixExprInput/nixExprPath fields of the jobset that
|
||||
|
|
1
src/sql/upgrade-42.sql
Normal file
1
src/sql/upgrade-42.sql
Normal file
|
@ -0,0 +1 @@
|
|||
alter table Builds add column isChannel integer not null default 0;
|
Loading…
Reference in a new issue