Repository navigation
The nightly release publishes only after the Darling PostgreSQL tests pass - #4448
Merged
Merged
Conversation
… pass Moves every release-publishing step (the GitHub release, the linux tarball upload, the ghcr container push, cosign signing, the build provenance attestation) out of the build and linux jobs and into one new publish job that needs build, linux and the Darling PostgreSQL tests job (darling-pg) and runs only when all three succeed. build and linux keep building and now upload their outputs as workflow artifacts; publish downloads them and publishes exactly what those jobs built. Adds a workflow_dispatch publish boolean input (default true) so a diagnostic re-run can skip publishing. darling-pg's failure artifact now also collects the gated upgrade tests' own temp-cluster server logs, not just the fixed cluster's log. Refs #4336
erikdarlingdata
marked this pull request as ready for review
September 26, 2026 20:46
erikdarlingdata
deleted the
ci/n473-nightly-publish-waits-for-pg-tests
branch
September 26, 2026 20:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #4336. The 2026-09-26 nightly published its release although its Darling PostgreSQL tests failed.
Why
The 2026-09-26 nightly published a release while the Darling PostgreSQL tests job (
darling-pg) failed.darling-pgand the windowsbuildjob were siblings undercheck, so a reddarling-pgnever blockedbuild'sgh release createorlinux'sgh release upload/ghcr push — the release went out regardless of test result.What changes
.github/workflows/nightly.ymlonly.Before:
check→build(needs: check) publishes the windows artifacts, packs the Velopack Setup.exe, deletes and recreates thenightlyGitHub release, and uploads assets into it.darling-pg(needs: check) runs the gated live-PostgreSQL tests as a sibling ofbuild— its result has no effect on the release.linux(needs: [check, build]) publishes the linux tarball, uploads it into thenightlyrelease, and builds + pushes the ghcr container image, signs it, and attests it.After:
buildandlinuxkeep building everything they did before, but no longer talk to GitHub Releases or ghcr.builduploads the windows zips/Setup.exe/checksum file and the derived version string as workflow artifacts.linuxbuilds the linux tarball/checksum and the container image (viadocker save, notdocker push) and uploads those as workflow artifacts too.publishjob (needs: [build, linux, darling-pg]) runs only whenneeds.build.result == 'success' && needs.linux.result == 'success' && needs.darling-pg.result == 'success', downloads those artifacts, and does exactly whatbuild/linuxused to do: delete + recreate thenightlyrelease, upload the windows and linux assets into it, push the container image to ghcr, sign it with cosign, and attest the linux tarball.contents: write,packages: write,id-token: writeandattestations: writemoved from the workflow-levelpermissions:block (nowcontents: read) topublish's own block — no other job needs write access.workflow_dispatchboolean input,publish(defaulttrue), lets a manual re-run build and test without shipping a release;publish'sif:also requiresinputs.publish != falseon aworkflow_dispatchrun.darling-pg's existing failure artifact (darling-pg-failure,if: failure()) now also captures the gated upgrade tests' own temp-cluster server logs — those tests callDirectory.CreateTempSubdirectory("darling-pg17boot-"),"darling-managedconf-", etc. under the Windows per-user temp directory (%TEMP%), which is a different directory from the runner's own temp directory (RUNNER_TEMP/${{ runner.temp }}) that the upload step can reach. A new step,Collect the gated tests' own cluster logs, runs before the upload (if: failure()) and copies everylogfile,*.log, and any file under alog\orpg_log\directory beneath%TEMP%\darling-*intoRUNNER_TEMP\darling-cluster-logs\, preserving relative paths, skipping files over 50 MB, and printing a one-line count; the upload step's path list now points at${{ runner.temp }}/darling-cluster-logs/**instead of the old${{ runner.temp }}/darling-*/**globs, still withif-no-files-found: ignore.No code changed — workflow-only, and every literal string, project path and command the jobs run is unchanged from before, just relocated.
Test plan
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/nightly.yml'))"— parses clean.actionlint .github/workflows/nightly.yml— no new findings (two pre-existing shellcheck info-level hints in the untouchedcheckjob's "new commits" step, unrelated to this change).build → check,darling-pg → check,linux → [check, build],publish → [build, linux, darling-pg]— matches the intended graph.git grep -n "nightly.yml" -- '*.cs' '*.py'found the tests that parse this file's text:NightlyVersionInjectionTests,CiClusterWorkerSizingTests,CiClusterWorkerSizingLiveTests,LockedModeRestoreCoverageTests,ProductVersionDeclarationTests,ReadmeDerivedCountPinTests. None of them assert on job names,needs:, or step location — they pin thedotnet publish/docker buildcommand lines, the conf-append blocks, and locked-mode restore coverage, none of which this change touches. Ran on macOS (in-process xUnit v3 runner, WPF framework entry stripped from the runtimeconfig):NightlyVersionInjectionTests: 3/3 passed (still finds exactly onedocker buildline — in the newpublishjob — and every nightly publish still carries-p:Version=${{ steps.version.outputs.VERSION }}).CiClusterWorkerSizingTests,LockedModeRestoreCoverageTests,ProductVersionDeclarationTests,ReadmeDerivedCountPinTests: 60/60 passed together.dotnet build Darling/Darling.Tests/Darling.Tests.csproj -p:EnableWindowsTargeting=trueanddotnet build Lite.Tests/Lite.Tests.csproj -p:EnableWindowsTargeting=true: both 0 errors.CrossAppGuardCiGateTestsexists in this tree pinningnightly.yml's structure — agit grepfor it found nothing; the six tests above are the actual set that reads this file.publishgating decision, and the new failure-artifact globs cannot run on macOS (windows-only runner, real PostgreSQL runtimes). The next dispatched nightly proves the gate: adarling-pgfailure should leavepublishskipped and thenightlyrelease untouched, and a green run should publish exactly as before.Follow-up fixes (same PR, same file)
buildwritesgit rev-parse HEAD(the full SHA) to its own handoff file alongside the version string, uploaded in the samewindows-versionartifact.publishreads that file, uses the short form for the release notes' Commit line, and passes the full SHA togh release create ... --target <sha>— replacing--target devandgit rev-parse --short HEAD, both of which named whatever dev's tip was 20–60 minutes later, afterdarling-pgfinished.publishechoes the SHA it's using before creating the release.publishnow has its own concurrency group (nightly-publish,cancel-in-progress: false), so two close dispatches can no longer race on the same delete-then-create of thenightlyrelease.inputs.publishreads as an empty string on a scheduled dispatch, notfalse, so the gate is nowformat('{0}', inputs.publish) != 'false'instead of a bare!= falsecomparison; the threeneeds.X.result == 'success'terms are unchanged.windows-release-assets,windows-version,linux-release-assets,darling-container-image) now setretention-days: 3— these run nightly and cost about 450 MB/run with no reason to keep them past the next publish.darling-pg-failure's upload setsoverwrite: true, so re-running a faileddarling-pgjob doesn't collide with the first attempt's artifact name.linuxno longer waits onbuild. It reads no output ofbuild's beyond thecheckjob's shared stamp, and downloads no windows artifact, soneeds: [check, build]becameneeds: checkand the two jobs now run in parallel. The stale comments abovelinuxand abovedarling-pg's checkout step — both still describing the old shape wherebuilditself published the release andlinuxuploaded into it — are corrected to describe the currentpublishjob instead.linuxwrites its own derivedVERSIONintoreleases/linux-version.txt, included in thelinux-release-assetsartifact.publishreads it, compares it against the windows version it already reads fromwindows-version.txt, andexit 1with both values printed on a mismatch, before either the windows or linux assets are shipped.CHANGELOG entry
SECTION: None
ENTRY: None: CI-only change (nightly workflow job graph), no user-visible effect.