From 5569c48121eb41bb97720de2ef8624d26681e1d1 Mon Sep 17 00:00:00 2001 From: Emanuele Aina <emanuele.aina@collabora.com> Date: Mon, 16 May 2022 17:02:43 +0200 Subject: [PATCH] HACK: Skip OBS scanning by default The OBS 2.10 update made things sensibly slower, causing timeouts in the packaging-data-fetch-obs job. Disable it for now. Set `SKIP_OBS` to `no` to run the job again. See https://phabricator.apertis.org/T8880 Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com> --- .gitlab-ci.yml | 11 +++++++++++ bin/packaging-check-invariants | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 146320e..e9acffc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,6 +18,13 @@ variables: For instance use `*` to process all updates, `dash` to only process `pkg/dash`. Leave it empty to not trigger any update. value: "" + SKIP_OBS: + description: | + The OBS 2.10 update made things sensibly slower, causing timeouts in the + packaging-data-fetch-obs job. Disable it for now. + See https://phabricator.apertis.org/T8880 + value: "yes" + stages: - lint @@ -214,6 +221,8 @@ packaging-data-fetch-obs: paths: - packaging-data-obs.yaml rules: + - if: $SKIP_OBS == "yes" + when: never - if: $TRIGGER_FROM_JOB when: never - if: $CI_PIPELINE_SOURCE != "merge_request_event" @@ -263,6 +272,8 @@ packaging-check-invariants: python3-gitlab python3-yaml script: + - | + test "$SKIP_OBS" = yes && touch packaging-data-obs.yaml - ./bin/yaml-merge --input packaging-data-downstream.yaml --input packaging-data-sources-upstream.yaml diff --git a/bin/packaging-check-invariants b/bin/packaging-check-invariants index 2ff49e0..24a90e6 100755 --- a/bin/packaging-check-invariants +++ b/bin/packaging-check-invariants @@ -2,6 +2,7 @@ import argparse import logging +import os import debian.debian_support import yaml @@ -558,6 +559,10 @@ class Error(Exception): pass +def hack_skip_obs(): + return os.environ.get("SKIP_OBS") != "yes" + + def is_stable_channel(channel): if channel.endswith("pre"): return False @@ -906,7 +911,7 @@ class InvariantChecker: logging.debug( f"Checking if {package.name} branch {branch}/{source.component} is in {obsproject}" ) - if obsproject not in package.get("obs", {}): + if obsproject not in package.get("obs", {}) and not hack_skip_obs(): self.error( package.name, Report.OBS_PACKAGE_MISSING_BUT_ON_APT, -- GitLab