From 6f92e2d61d33dbca3b63921341309502be6a0bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 29 Apr 2024 11:22:37 +0100 Subject: lcitool: default unreleased distros to 'allow-failure: true' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In recent times we have increasingly been marking the unreleased distros (rawhide, tumbleweed, sid, etc) as 'allow-failure: true' in many projects. This reflects the fact that they all suffer from periods in time when packages are not reliably installable, or those that are installed are broken in some way. Rather than continue to mark individual projects, this adds an 'stable: true|false' field in the target yaml files, with all the unreleased distros being marked 'stable: false'. Any target with 'stable: false' will get 'allow-failure: true' set by default. The project's manifest.yml file can still override this setting it back to 'allow-failure: false', if a project really wants to treat an unreleased target as gating, though this is not recommended. Signed-off-by: Daniel P. Berrangé --- lcitool/facts/targets/alpine-edge.yml | 1 + lcitool/facts/targets/debian-sid.yml | 1 + lcitool/facts/targets/fedora-rawhide.yml | 1 + lcitool/facts/targets/freebsd-current.yml | 1 + lcitool/facts/targets/opensuse-tumbleweed.yml | 1 + lcitool/manifest.py | 2 +- tests/data/manifest/out/ci/gitlab/builds.yml | 8 ++++---- tests/data/manifest/out/ci/gitlab/containers.yml | 6 +++--- 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lcitool/facts/targets/alpine-edge.yml b/lcitool/facts/targets/alpine-edge.yml index 574f179..ede7975 100644 --- a/lcitool/facts/targets/alpine-edge.yml +++ b/lcitool/facts/targets/alpine-edge.yml @@ -2,6 +2,7 @@ os: name: 'Alpine' version: 'Edge' + stable: false packaging: format: 'apk' diff --git a/lcitool/facts/targets/debian-sid.yml b/lcitool/facts/targets/debian-sid.yml index 20ce9f7..c05b569 100644 --- a/lcitool/facts/targets/debian-sid.yml +++ b/lcitool/facts/targets/debian-sid.yml @@ -2,6 +2,7 @@ os: name: 'Debian' version: 'Sid' + stable: false packaging: format: 'deb' diff --git a/lcitool/facts/targets/fedora-rawhide.yml b/lcitool/facts/targets/fedora-rawhide.yml index ab11e15..5de110f 100644 --- a/lcitool/facts/targets/fedora-rawhide.yml +++ b/lcitool/facts/targets/fedora-rawhide.yml @@ -2,6 +2,7 @@ os: name: 'Fedora' version: 'Rawhide' + stable: false libosinfo_id: 'http://fedoraproject.org/fedora/rawhide' packaging: diff --git a/lcitool/facts/targets/freebsd-current.yml b/lcitool/facts/targets/freebsd-current.yml index c5f9c5a..99694f8 100644 --- a/lcitool/facts/targets/freebsd-current.yml +++ b/lcitool/facts/targets/freebsd-current.yml @@ -2,6 +2,7 @@ os: name: 'FreeBSD' version: 'Current' + stable: false packaging: format: 'pkg' diff --git a/lcitool/facts/targets/opensuse-tumbleweed.yml b/lcitool/facts/targets/opensuse-tumbleweed.yml index e230dde..9cb6908 100644 --- a/lcitool/facts/targets/opensuse-tumbleweed.yml +++ b/lcitool/facts/targets/opensuse-tumbleweed.yml @@ -2,6 +2,7 @@ os: name: 'OpenSUSE' version: 'Tumbleweed' + stable: false libosinfo_id: 'http://opensuse.org/opensuse/tumbleweed' packaging: diff --git a/lcitool/manifest.py b/lcitool/manifest.py index 238a99a..27866d3 100644 --- a/lcitool/manifest.py +++ b/lcitool/manifest.py @@ -119,7 +119,7 @@ class Manifest: if "arch" not in jobinfo: raise ValueError(f"target {target} job {idx} missing arch") jobinfo.setdefault("enabled", True) - jobinfo.setdefault("allow-failure", False) + jobinfo.setdefault("allow-failure", not facts["os"].get("stable", True)) jobinfo.setdefault("artifacts", None) jobinfo.setdefault("variables", {}) jobinfo.setdefault("suffix", "") diff --git a/tests/data/manifest/out/ci/gitlab/builds.yml b/tests/data/manifest/out/ci/gitlab/builds.yml index 54598d0..5ef8913 100644 --- a/tests/data/manifest/out/ci/gitlab/builds.yml +++ b/tests/data/manifest/out/ci/gitlab/builds.yml @@ -40,7 +40,7 @@ x86_64-fedora-rawhide-clang: needs: - job: x86_64-fedora-rawhide-container optional: true - allow_failure: false + allow_failure: true variables: CC: clang NAME: fedora-rawhide @@ -55,7 +55,7 @@ i686-debian-sid: needs: - job: i686-debian-sid-container optional: true - allow_failure: false + allow_failure: true variables: CROSS: i686 NAME: debian-sid @@ -85,7 +85,7 @@ mingw32-fedora-rawhide: needs: - job: mingw32-fedora-rawhide-container optional: true - allow_failure: false + allow_failure: true variables: CROSS: mingw32 NAME: fedora-rawhide @@ -97,7 +97,7 @@ mingw32-fedora-rawhide: x86_64-freebsd-current: extends: .cirrus_build_job needs: [] - allow_failure: false + allow_failure: true variables: CIRRUS_VM_IMAGE_NAME: freebsd-14-0-snap CIRRUS_VM_IMAGE_SELECTOR: image_family diff --git a/tests/data/manifest/out/ci/gitlab/containers.yml b/tests/data/manifest/out/ci/gitlab/containers.yml index b7b5b8d..a09704a 100644 --- a/tests/data/manifest/out/ci/gitlab/containers.yml +++ b/tests/data/manifest/out/ci/gitlab/containers.yml @@ -17,7 +17,7 @@ x86_64-debian-12-container: x86_64-fedora-rawhide-container: extends: .container_job - allow_failure: false + allow_failure: true variables: NAME: fedora-rawhide @@ -27,7 +27,7 @@ x86_64-fedora-rawhide-container: i686-debian-sid-container: extends: .container_job - allow_failure: false + allow_failure: true variables: NAME: debian-sid-cross-i686 @@ -42,6 +42,6 @@ ppc64le-debian-sid-container: mingw32-fedora-rawhide-container: extends: .container_job - allow_failure: false + allow_failure: true variables: NAME: fedora-rawhide-cross-mingw32 -- cgit v1.1