From 20f2dc74dc2bc81cff74cce501c38d423348e3b1 Mon Sep 17 00:00:00 2001 From: Mina Maher Date: Wed, 29 Jul 2026 09:26:58 -0400 Subject: [PATCH] ci(release): treat OBS "finished" as build-complete, not busy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The trigger-obs gate failed on v0.3.7 despite every build succeeding. The wait loop counted "finished" as a non-terminal state, but in OBS that means the build is done and only repository publishing remains — which is asynchronous and can lag arbitrarily. Timeline from the v0.3.7 run: the rebuild was correctly detected as started, went "building" -> "finished" at ~4 minutes, then sat at "finished" for the remaining 31 until MAX_WAIT expired and failed the release. Publish latency is not a build failure. Drop "finished" from is_busy so the gate answers the question it exists to answer — did THIS release build on OBS — and log a note that the download repo may still lag. "signing" stays busy: it is normally seconds and reaching it already implies success. --- .github/workflows/release.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2880daae..5a9a943b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -298,8 +298,18 @@ jobs: # Non-terminal state codes per OBS: wait until none of these # appear in the result set. + # + # "finished" is deliberately NOT treated as busy. This gate answers + # "did THIS release build on OBS?", and at "finished" the build is + # done — what remains is repository publishing, which is asynchronous + # and can lag for a long time. On v0.3.7 the package reached + # "finished" after ~4 minutes and stayed there for the remaining 31, + # timing the job out and failing an otherwise successful release. + # Publish latency is not a build failure. ("signing" is still treated + # as busy: it is normally seconds, and reaching it already implies a + # successful build.) is_busy() { - echo "$1" | grep -qE ']+code="(building|blocked|scheduled|dispatching|finished|unknown|signing)"' + echo "$1" | grep -qE ']+code="(building|blocked|scheduled|dispatching|unknown|signing)"' } # Right after the trigger POST, OBS has not yet re-dispatched the @@ -384,6 +394,10 @@ jobs: echo "::error::One or more OBS builds failed." exit 1 fi + if echo "$xml" | grep -qE ']+package="logitune"[^>]*code="finished"'; then + echo "note: build finished; repository publishing may still be in" + echo " progress, so the download repo can lag by a few minutes." + fi if [ "$elapsed" -ge "$MAX_WAIT" ]; then echo "::error::Timed out waiting for OBS builds to settle after ${MAX_WAIT}s." exit 1