Repository navigation
Release: run the full CI before publishing, and a nightly full run - #132
Merged
Merged
Conversation
) dotnet.yml becomes a reusable workflow. release.yml calls it in a `ci` job that `verify` needs, so every lane, SQL Server included, runs on the tagged commit and its `CI` gate decides before anything is packed or approved. The Trusted Publishing split (verify -> publish -> release) is unchanged. dotnet.yml's concurrency group gains a prefix so a caller's group can never equal it. nightly.yml calls dotnet.yml on the default branch every night and dispatches it on each release line that exists (release/5.x after the cut), waiting for the result. A failure opens or comments on a "Nightly CI failed" issue. The SDK is pinned by global.json (10.0.400, latestPatch). The integration jobs record the image digests they used. The consumer smoke test holds EF Core Design to 10.* and builds with the repository's global.json. ReleaseWiringConventionTests holds that publish depends on the full CI; CiInputConventionTests holds the SDK pin and the nightly's report. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Closes #111
Stacked on #129 (#110). It needs the
CIgate, so that a skipped or cancelled lane also stops a release. Merge #129 first. Until then this PR targetschore/110-ci-gate, sodotnet.ymldoes not run on it. The proof runs below were dispatched instead.Problem
release.yml'sverifyjob ran its own build and tests and trusted that the tagged commit had passed every PR check. That trust fails for a tag on a commit whose push run failed, and once lanes can be skipped (#112). Some CI inputs also change without any diff: the SDK (dotnet-version: 10.0.x), thepostgres:18,postgres:16andmssql/server:2022-latestimages, and the smoke test's nuget.org restore. Nothing runs CI unless something is pushed, and a fixes-onlyrelease/5.xwill see weeks without a push.Change
dotnet.ymlgainson: workflow_call. Its concurrency group gets adotnet-prefix. In a called workflowgithub.workflowis the caller's name, so without the prefix the group could equal the caller's own and the two would deadlock. Each integration job now writes the digests of the container images it used to its job summary.release.ymlgains acijob (uses: ./.github/workflows/dotnet.yml,contents: read).verifyneeds it, so every lane runs on the tagged commit, SQL Server included, and theCIgate decides before anything is packed or approved. The Trusted Publishing structure is unchanged:verify→publish(id-token: write,nugetenvironment) →release(contents: write). No job holds both permissions.verifykeeps its own test step, so the artifact published is the artifact tested.nightly.yml(new) runs at 03:17 UTC and on demand.default-branchcallsdotnet.yml.release-linesdispatchesdotnet.ymlon each branch inRELEASE_LINESthat exists. That isrelease/5.x, skipped with a notice until the cut. Each branch is tested by its own workflow and SDK; after the cut that matters, becausemainmoves to .NET 11. The job waits on the run id the dispatch API returns (return_run_details).reportneeds both, runsalways(), and on any result exceptsuccessopens an issue titled "Nightly CI failed" (chore,area/release), or comments on the open one.global.json(new):10.0.400,rollForward: latestPatch,allowPrerelease: false. Every job that checks out the repository sets up .NET from it.publishkeepsdotnet-version, since it has no checkout and only pushes.test/consumer-smoke-test.sh: copiesglobal.jsoninto the throwaway directory, because the consumer projects live outside the repository where the file does not reach. It also restoresMicrosoft.EntityFrameworkCore.Designas10.*, asdotnet-efalready was.ReleaseWiringConventionTests:publishmust depend throughneedson a job that callsdotnet.yml,dotnet.ymlmust keepworkflow_call, and noif:on that path may use a status function.CiInputConventionTests(new): the SDK pin, and the nightly's schedule, call and report.CLAUDE.mddescribes all of this.No changelog line: nothing a consumer receives changes.
Decisions
release/5.xhavegithub-actions[bot]as their actor, so their failures email nobody. An issue reaches whoever watches the repository, stays open until someone acts, and collects one comment per failed night instead of a new issue each time.10.0.400+latestPatch. This is the band CI already ran (10.0.xresolved to 10.0.402), and your local 10.0.402 satisfies it. Patches, including security fixes, arrive on their own. A new feature band changes the compiler and NuGet, so it needs a PR that editsglobal.json. The 4xx band is .NET 10's last and is serviced to EOL, so the pin should hold for the life of the 5.x line. One side effect: inside the repository, a machine with only the 11.0 RC SDK no longer builds with it.postgres:18,postgres:16and2022-latestfloat within their version on purpose, as a consumer's server does. A digest pin would need an update path, and Dependabot'sdockerecosystem cannot read an image name in C#. Without one, a pin would freeze the tests on a server nobody runs. The nightly catches a new image within a day, and the recorded digests show what changed against the last green run.Microsoft.EntityFrameworkCore.Design. The day EF Core 11 ships, nuget.org's latest becomes a net11.0 package, which this net10.0 consumer refuses. That would have brokenrelease/5.x's smoke test with no diff.release.ymlruns the full CI itself.Tests
Proof runs (the proof branches are deleted afterwards):
CI / …lanes run (Test, PostgreSQL 18, SQL Server 2022, Consumer, Pack, gate) beforeVerify and pack.Verify and packsuccess;PublishandGitHub releaseskipped (dry run).exit 1CI / CIfailure →Verify and pack,PublishandGitHub releaseall skippedrelease/5.xskipped with a notice. The dispatched run on the seeded branch (run) failed,Release linesfailed, andReport a failureopened #130 (closed as a proof)release/5.xskipped; the dispatched run on this branch (run) green;Report a failuresucceeded without opening an issueGuards: each seed below fails its test, and every one was restored afterwards.
ReleaseWiringConventionTests:needs: ciremoved fromverify; thecijob removed;always() &&added topublish's condition;if: ${{ !cancelled() }}added toverify;workflow_callremoved fromdotnet.yml.CiInputConventionTests: one lane back ondotnet-version: 10.0.x;rollForward: latestFeature;reportwithoutalways();release-linesmissing fromreport's needs; nightly no longer callingdotnet.yml.Unit suite: 495 passed.
consumer-smoke-test.shpassed locally with the pinned SDK (10.0.402) and the10.*Design reference.🤖 Generated with Claude Code