From 5389e2f9f9f43b03d0115f94bdfc37b18ec4fd09 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Sun, 22 Nov 2026 06:06:42 +0000
Subject: [PATCH] Run MSI tests after the Maven build matrix (#1325)
---
.github/workflows/build.yml | 82 +----------------------------------------
1 files changed, 2 insertions(+), 80 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8fc0868..6de60e6 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1445,86 +1445,8 @@
rpm -e opendj
'
- # The gate both MSI jobs wait on. Deliberately not "needs: build-maven": that waits for
- # the whole matrix, whose ubuntu legs run for about two hours, so any push landing inside
- # that window cancels the run before those two-minute jobs have started - which is how the
- # MSI work reached its eighth review round with no completed run behind it. The only input
- # they have is the windows-latest-11 artifact, so wait for exactly that.
- #
- # On ubuntu, and in a job of its own, for two reasons. A waiter on windows-latest holds a
- # Windows runner from t=0 for the whole wait, competing for the capacity the leg it is
- # waiting for needs - in run 31578978374 the windows-latest-11 leg sat in the queue for 38
- # minutes while windows-latest-26 started within one. And the wait was duplicated
- # verbatim in both jobs, with a 45-minute budget measured from t=0 that covered the leg's
- # runtime but not its queue time: in that same run the artifact appeared at +52 minutes,
- # so both jobs would have failed a perfectly healthy build.
- wait-msi-artifact:
- runs-on: 'ubuntu-latest'
- # The queue is not this run's to bound: it is a property of the account's runner
- # capacity, which GitHub shares across every OS, and the leg has been seen sitting in it
- # for three hours. So the wall clock here is only the six-hour ceiling GitHub puts on a
- # job, less a margin; what gets a budget is the leg's own runtime, which is the part a
- # change under test can actually break.
- timeout-minutes: 350
- permissions:
- contents: read
- # Listing the run's artifacts and jobs, which the wait below polls.
- actions: read
- steps:
- - name: Wait for the Windows build artifact
- shell: bash
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- # Four times the longest the leg has taken to publish, and counted only from the
- # moment it has a runner. The budget this replaces ran from t=0 and so was spent on
- # the queue instead: in run 34318105667 the leg waited 178 minutes for a Windows
- # runner and published 14 minutes later, an hour after a 120-minute budget had
- # failed a build that was entirely healthy.
- budget=$(( 60 * 60 ))
- deadline=''
- while true; do
- # A transient API error is a reason to poll again, not to read "not published
- # yet" out of a listing that never arrived: the leg may already have published,
- # and the completion check below would then call a healthy build one that
- # finished without publishing.
- if ! artifacts=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/artifacts" \
- --jq '.artifacts[].name'); then
- sleep 30
- continue
- fi
- if grep -qx 'windows-latest-11' <<<"$artifacts"; then
- echo 'windows-latest-11 is available'
- exit 0
- fi
- if ! leg=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/jobs?per_page=100" \
- --jq '.jobs[] | select(.name | startswith("build-maven (windows-latest, 11)")) | "\(.status) \(.conclusion)"'); then
- sleep 30
- continue
- fi
- case "$leg" in
- # Stop waiting the moment the leg that would publish it has finished without
- # doing so, instead of sitting out the deadline.
- completed*)
- echo "the Windows build leg finished as '${leg#* }' without publishing windows-latest-11" >&2
- exit 1
- ;;
- # It has a runner, so from here on the wait is on the build rather than on the
- # queue. A queued leg is listed too, and with a started_at holding the time it
- # was queued - which is why this reads the status and not that.
- in_progress*)
- [ -n "$deadline" ] || deadline=$(( $(date +%s) + budget ))
- ;;
- esac
- if [ -n "$deadline" ] && [ "$(date +%s)" -ge "$deadline" ]; then
- echo 'the Windows build leg has been running for 60 minutes without publishing windows-latest-11' >&2
- exit 1
- fi
- sleep 30
- done
-
test-msi:
- needs: wait-msi-artifact
+ needs: build-maven
runs-on: 'windows-latest'
permissions:
contents: read
@@ -1720,7 +1642,7 @@
# instance data in place, stops the running service for the file replacement and leaves
# its registration alone, and that the upgraded server starts with the old data.
test-msi-upgrade:
- needs: wait-msi-artifact
+ needs: build-maven
runs-on: 'windows-latest'
permissions:
contents: read
--
Gitblit v1.10.0