Repository navigation
fix(build): pin the SDK to a version CI has, and derive it in one place - #68
Merged
Merged
Conversation
a54f6f9 set global.json to 10.0.302 with rollForward disable. The runners carry 10.0.109, 10.0.201, 10.0.204 and 10.0.301, so every job now fails restore with "A compatible .NET SDK was not found" and master is red. Pin back to 10.0.201, which the runners have and which the package fingerprints in docs/preview{1,2}-package-pin.md are recorded against. The deeper problem is that the pin and the workflows stated the SDK separately and could disagree. That has now bitten twice in opposite directions: abfe0fc deleted global.json so the muxer silently chose the newest SDK while the workflows still declared 10.0.201, and a54f6f9 pinned a version the workflows never install. Every setup-dotnet now reads global-json-file, so there is one statement of the SDK version and no second place for it to drift. Note for anyone hitting this from a machine without 10.0.201: rollForward is disable, so install it rather than bumping the pin -- `dotnet-install --version 10.0.201`. Moving to a 10.0.3xx band also needs #62 resolved first: that band is where the generator's duplicate project instances start colliding, which is what made CI red before #61.
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.
master is currently red. Every
protocol-testsjob onc785cae6fails at restore:a54f6f9asetglobal.jsonto10.0.302withrollForward: disable. The runners carry10.0.109,10.0.201,10.0.204and10.0.301— not10.0.302— and.github/workflows/protocol-tests.ymlstill askedsetup-dotnetfor10.0.201, so nothing on themachine satisfied the pin.
What this changes
global.jsonback to10.0.201. The runners have it, and it is the version the payloadfingerprints in
docs/preview1-package-pin.mdanddocs/preview2-package-pin.mdare recordedagainst.
setup-dotnetstep now usesglobal-json-file: global.jsoninstead of restating aversion.
Why the second half matters more than the first
The pin and the workflows each stated the SDK independently, so they could disagree — and have now
done so twice, in opposite directions:
abfe0fcbglobal.json; workflows still said10.0.20110.0.301); the generator's duplicate project instances began colliding and CI went red (fixed by #61)a54f6f9a10.0.302; workflows still said10.0.201Restoring the pin alone would fix today's symptom and leave the mechanism in place for a third
occurrence. With
global-json-filethere is one statement of the version and no second place for itto drift.
For whoever hits this locally
rollForwardisdisable, so a machine whose default is10.0.302will not build. Install thepinned SDK rather than bumping the pin:
That friction is real, and the durable fix is to make a newer band safe rather than to widen the
pin: #62 must be resolved before moving to
10.0.3xx, because that band is exactly where thegenerator's duplicate project instances collide. Bumping the pin without it re-creates the failure
#61 fixed.
Verification
The failure is environmental to the runner image, so CI on this PR is the meaningful check — a green
protocol-testshere demonstrates both that the pinned SDK resolves and thatglobal-json-filesupplies it correctly.