From 4efd078977e5ea20e1104783efc324cba11690bc Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Sun, 11 Dec 2016 15:35:38 +0100 Subject: [PATCH 1/5] Only set buildMachinesFiles when nix.buildMachines is defined --- hydra-module.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hydra-module.nix b/hydra-module.nix index 276cb2ae..1bfb9a42 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -165,7 +165,7 @@ in buildMachinesFiles = mkOption { type = types.listOf types.path; - default = [ "/etc/nix/machines" ]; + default = optional (config.nix.buildMachines != []) "/etc/nix/machines"; example = [ "/etc/nix/machines" "/var/lib/hydra/provisioner/machines" ]; description = "List of files containing build machines."; }; From 919195b04f1ed4148e2e6b814741e259d2f1301c Mon Sep 17 00:00:00 2001 From: tobias pflug Date: Fri, 16 Aug 2019 16:03:01 +0200 Subject: [PATCH 2/5] Extend the jobset API response This adds the following (pre-existing) attributes to the jobset response: - nrtotal - lastcheckedtime - starttime - checkinterval - triggertime - fetcherrormsg - errortime --- src/lib/Hydra/Controller/API.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/API.pm b/src/lib/Hydra/Controller/API.pm index 45cecfea..1840d1e9 100644 --- a/src/lib/Hydra/Controller/API.pm +++ b/src/lib/Hydra/Controller/API.pm @@ -81,7 +81,13 @@ sub jobsetToHash { nrscheduled => $jobset->get_column("nrscheduled"), nrsucceeded => $jobset->get_column("nrsucceeded"), nrfailed => $jobset->get_column("nrfailed"), - nrtotal => $jobset->get_column("nrtotal") + nrtotal => $jobset->get_column("nrtotal"), + lastcheckedtime => $jobset->lastcheckedtime, + starttime => $jobset->starttime, + checkinterval => $jobset->checkinterval, + triggertime => $jobset->triggertime, + fetcherrormsg => $jobset->fetcherrormsg, + errortime => $jobset->errortime }; } From f10b2c2da8dbfba3338281aa9f39bb219ba7c2ea Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 19 Aug 2019 17:05:11 +0200 Subject: [PATCH 3/5] Update Hydra schema, otherwise hydra-notify will not work. --- src/lib/Hydra/Schema/Builds.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib/Hydra/Schema/Builds.pm b/src/lib/Hydra/Schema/Builds.pm index 1c80f710..35d9ab36 100644 --- a/src/lib/Hydra/Schema/Builds.pm +++ b/src/lib/Hydra/Schema/Builds.pm @@ -191,6 +191,11 @@ __PACKAGE__->table("Builds"); default_value: 0 is_nullable: 0 +=head2 notificationpendingsince + + data_type: 'integer' + is_nullable: 1 + =cut __PACKAGE__->add_columns( @@ -252,6 +257,8 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 1 }, "keep", { data_type => "integer", default_value => 0, is_nullable => 0 }, + "notificationpendingsince", + { data_type => "integer", is_nullable => 1 }, ); =head1 PRIMARY KEY @@ -537,8 +544,8 @@ __PACKAGE__->many_to_many( ); -# Created by DBIx::Class::Schema::Loader v0.07043 @ 2016-02-12 17:20:42 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/8aVtXu/+o0jmKHnSzwt+g +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-08-19 16:12:37 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VjYbAQwv4THW2VfWQ5ajYQ __PACKAGE__->has_many( "dependents", From c8983ca07602eaa21d640c5b473f699f59ed97d7 Mon Sep 17 00:00:00 2001 From: Antoine Eiche Date: Tue, 20 Aug 2019 11:07:43 +0200 Subject: [PATCH 4/5] Add `haserrormsg` boolean attribute to jobset API response This attribute allows to know if an error occurred or not: when an error occurs, errormsg is not an empty string. Note we can not use the errormsg attribute because it can be arbitrarily long and is excluded from the jobset API response. --- src/lib/Hydra/Controller/API.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/API.pm b/src/lib/Hydra/Controller/API.pm index 1840d1e9..8bb710e0 100644 --- a/src/lib/Hydra/Controller/API.pm +++ b/src/lib/Hydra/Controller/API.pm @@ -87,7 +87,8 @@ sub jobsetToHash { checkinterval => $jobset->checkinterval, triggertime => $jobset->triggertime, fetcherrormsg => $jobset->fetcherrormsg, - errortime => $jobset->errortime + errortime => $jobset->errortime, + haserrormsg => $jobset->errormsg eq "" ? JSON::false : JSON::true }; } From a9d744d2a3136d558b206131c729ff8216db78f4 Mon Sep 17 00:00:00 2001 From: Nikola Knezevic Date: Fri, 30 Aug 2019 11:54:56 +0200 Subject: [PATCH 5/5] Add Term::Size::Any This removes a supper annoying set of messages that polute the logs: Aug 30 09:00:30 xxx.compute.internal hydra-server[957]: Trouble trying to detect your terminal size, looking at $ENV{COLUMNS} Aug 30 09:00:30 xxx.compute.internal hydra-server[957]: Term::Size::Any is not installed, can't autodetect terminal column width --- release.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/release.nix b/release.nix index bdd9dae3..04fdc682 100644 --- a/release.nix +++ b/release.nix @@ -106,6 +106,7 @@ rec { SetScalar Starman SysHostnameLong + TermSizeAny TestMore TextDiff TextTable