From 6cdbec053abab30914b7d5cf03be1036dc799d12 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 6 Dec 2019 09:51:25 +0100 Subject: lib/mysql-functions: 1 day after the first build failure, still unbuilt dependencies get ignored - we need to move on --- bin/get-assignment | 2 +- lib/mysql-functions | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/bin/get-assignment b/bin/get-assignment index 6eaa5d9..f2930c4 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -200,7 +200,7 @@ while [ -s "${work_dir}/forced-package-builds.${slave}" ]; do fi done -# a package with [all dependencies met or which is part of a loop] +# a package with [all dependencies met (or unsuccessfully built) or which is part of a loop] # and which is currently not being built, ordered by: # 1: we requested it # 2: tool chain priority diff --git a/lib/mysql-functions b/lib/mysql-functions index 97f3c88..0fbd84e 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -1027,7 +1027,8 @@ mysql_cleanup() { } # mysql_query_has_pending_dependencies builder-architecture.id `build_assignment`.`id` -# print a mysql query giving whether dependencies are pending +# print a mysql query giving whether dependencies are pending (unsuccessfully built +# dependencies do not count after 1 day) mysql_query_has_pending_dependencies() { # we have pending dependencies ... printf 'EXISTS (' @@ -1059,6 +1060,18 @@ mysql_query_has_pending_dependencies() { mysql_join_binary_packages_binary_packages_in_repositories 'dep_bp' 'dep_bpir' printf ' AND `dep_bpir`.`repository`=%s' \ "${repository_ids__any_build_list}" + mysql_join_binary_packages_build_assignments 'dep_bp' 'dep_ba' + # ignore dependencies which are broken >=1 day + printf ' AND (' + printf 'NOT EXISTS (' + printf 'SELECT 1' + printf ' FROM `failed_builds`' + printf ' WHERE `failed_builds`.`date`<=ADDTIME(NOW(),"-1 00:00:00")' + printf ' AND `failed_builds`.`build_assignment`=`dep_ba`.`id`' + printf ')' + # haskell-* is a hopeless case in this regard + printf ' OR `binary_packages`.`name` LIKE "haskell-%%"' + printf ')' printf ' JOIN `architecture_compatibilities`' printf ' ON `architecture_compatibilities`.`built_for`=`dep_bp`.`architecture`' printf ' AND `architecture_compatibilities`.`fully_compatible`' -- cgit v1.2.3