diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 13543c02..b5390504 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -286,19 +286,17 @@ jobs: # Load, slow-client, shutdown, pool and resource bounds. Last, after every other heavy job of the # run, so the bounds are measured on a runner that is not building something else. + # + # Last by position, not by `needs`. This Gitea (1.27) decides a job's `if` on the server once the + # jobs it needs finish, and it left this job Blocked in every run it reached: 2.5 days on a manual + # run (63), and on every push, where the nightly jobs it waited for are skipped (79). A throwaway + # workflow started by hand reproduced it with nothing else in it (2026-11-11, three variants): + # every job with both `needs` and `if` stayed Blocked, whatever the `if` said and whether or not + # the jobs it needed had passed. A job without `needs` is queued when the run starts, and the one + # runner (capacity 1) takes a run's jobs in the order they were created, which is their order in + # this file. A second runner would let this job overlap the others; it would still run. performance: - needs: - - main - - integration - - build-logic - - configuration-cache - - jpa-postgresql - - httpclient-transport - - redis-topology - - fileserver-nfs-ambiguity - - notification-chaos - - compose-smoke - if: ${{ !cancelled() && github.event_name != 'push' }} + if: ${{ github.event_name != 'push' }} runs-on: ubuntu-latest timeout-minutes: 120 steps: diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 99f1b740..f879ade4 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -235,10 +235,14 @@ jobs: # Signs the pushed digest with the release key pair and verifies the signature before the release # counts as done, so a signature a cluster would reject fails here rather than at admission. A job # of its own, so the private key exists only in a job that checks nothing out and builds nothing. + # + # The tag condition is on each step, not on the job. This Gitea (1.27) leaves a job that has both + # `needs` and `if` Blocked (main.yml `performance` says how that was found), so a manual run never + # finished: the job waited forever. With no job `if` it starts after app-image-release, and on a + # manual run every step is skipped. app-image-signing: needs: - app-image-release - if: ${{ github.ref_type == 'tag' }} runs-on: ubuntu-latest timeout-minutes: 30 env: @@ -248,6 +252,7 @@ jobs: # lines of the official v3.1.3 cosign_checksums.txt. The checksum file is fetched again and must # still carry the pinned line, so a re-published asset fails the job. - name: Install pinned cosign + if: ${{ github.ref_type == 'tag' }} run: | set -euo pipefail readonly COSIGN_VERSION='3.1.3' @@ -271,6 +276,7 @@ jobs: chmod 0755 "${install_dir}/cosign" echo "${install_dir}" >> "${GITHUB_PATH}" - name: Sign the image digest and verify the signature + if: ${{ github.ref_type == 'tag' }} env: PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} diff --git a/build.gradle b/build.gradle index ed0fee65..47aa92ac 100644 --- a/build.gradle +++ b/build.gradle @@ -248,7 +248,7 @@ strictLaneStages { stage ':integrationCheck', workflow: 'main.yml', event: 'push', filter: 'branches: [main]', job: 'integration', options: '--continue' stage ':performanceCheck', workflow: 'main.yml', event: 'schedule', job: 'performance', options: '--continue', - condition: '${{ !cancelled() && github.event_name != \'push\' }}' + condition: '${{ github.event_name != \'push\' }}' stage ':releaseCheck', workflow: 'release.yml', event: 'push', filter: 'tags: ["v*"]', job: 'release' } diff --git a/src/bootstrap/app/src/test/java/dev/caskeleton/bootstrap/contract/DeveloperExperienceContractTest.java b/src/bootstrap/app/src/test/java/dev/caskeleton/bootstrap/contract/DeveloperExperienceContractTest.java index 92dda415..c12a565a 100644 --- a/src/bootstrap/app/src/test/java/dev/caskeleton/bootstrap/contract/DeveloperExperienceContractTest.java +++ b/src/bootstrap/app/src/test/java/dev/caskeleton/bootstrap/contract/DeveloperExperienceContractTest.java @@ -321,7 +321,15 @@ class DeveloperExperienceContractTest { assertThat(jobsWithTheKey).containsExactly("app-image-signing"); Map signing = requireMap(jobs, "app-image-signing"); assertThat(requireStringList(signing, "needs")).containsExactly("app-image-release"); - assertThat(requireString(signing, "if")).contains("github.ref_type == 'tag'"); + assertThat(signing.containsKey("if")) + .as("a job with both needs and if never leaves Blocked on this Gitea") + .isFalse(); + assertThat(requireList(signing, "steps")) + .as("every step runs only for a tag") + .allSatisfy( + step -> + assertThat(String.valueOf(((Map) step).get("if"))) + .contains("github.ref_type == 'tag'")); String script = String.join( "\n",