rollForward: latestMajor installs the latest LTS SDK even when it is older than sdk.version
Maintainers usually reply within 7 days
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- github-actions, typescript
Research direction
Start at getVersionFromGlobalJson and createChannelArgument, then trace how minimumVersion is used when selecting or installing an SDK; the issue describes the failing latestMajor path. Reproduce with the provided global.json and workflow on an Ubuntu runner, then check relevant tests for global.json and channel selection. Done when the selected SDK satisfies the declared minimum and the step cannot succeed after installing an incompatible SDK.
Written by the indexing model from the issue text.
Description
Description:
With rollForward: "latestMajor", getVersionFromGlobalJson clears the version (case 'latestMajor': version = ''), and createChannelArgument then resolves the empty version to --channel LTS. The declared sdk.version is kept only as minimumVersion, which filters already-installed SDKs but is never checked against what gets downloaded. When the required SDK belongs to a newer STS release, the action installs an older LTS SDK that does not satisfy global.json, and the step still succeeds.
dotnet-channel: STS cannot work around it: it only applies when dotnet-version: latest, and the version taken from global.json is empty, so the channel is ignored with a warning.
Task version:
v6.1.0
Platform:
- Ubuntu
- macOS
- Windows
(Observed on Ubuntu; the code path is platform-independent.)
Runner type:
- Hosted
- Self-hosted
Repro steps:
global.json:
{
"sdk": {
"version": "11.0.100",
"rollForward": "latestMajor",
"allowPrerelease": false
}
}
Workflow step:
- uses: actions/setup-dotnet@v6
with:
global-json-file: global.json
Expected behavior:
The newest SDK that satisfies global.json: at least 11.0.100, or the newest active release if that is higher, matching how the dotnet host resolves latestMajor.
Actual behavior:
The SDK step resolves to the LTS channel and installs 10.0.x, below the declared sdk.version:
/__w/_actions/actions/setup-dotnet/v6/externals/install-dotnet.sh --skip-non-versioned-files --channel LTS
dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.404/dotnet-sdk-10.0.404-linux-x64.tar.gz
...
dotnet-install: Installed version is 10.0.404
dotnet-install: Installation finished successfully.
The step succeeds, so the mismatch only surfaces later, when the build cannot find an SDK that satisfies global.json.
Suggested fix:
For latestMajor, pick the newest active channel in the releases index whose version is at least minimumVersion, rather than always using LTS; or fail when the installed SDK is older than minimumVersion.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 579
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from actions/setup-dotnet
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 68/100
actions/setup-dotnet#801 · 1 comment · 1 reaction ·
Maintainers usually reply within 7 days
-
feature request
Difficulty 5/5 Over a week Newbie friendliness 45/100
actions/setup-dotnet#778 · 3 comments · 1 reaction ·
Maintainers usually reply within 7 days
-
feature request
Difficulty 5/5 Over a week Newbie friendliness 25/100
actions/setup-dotnet#701 · 3 comments ·
Maintainers usually reply within 7 days
-
feature request
Difficulty 1/5 Under an hour Newbie friendliness 55/100
actions/setup-dotnet#659 · 1 comment · 2 reactions ·
Maintainers usually reply within 7 days
-
feature request
Difficulty 4/5 3-5 days Newbie friendliness 38/100
actions/setup-dotnet#543 · 5 comments · 2 reactions ·
Maintainers usually reply within 7 days
All issues in actions/setup-dotnet
Similar issues
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysPossibly taken @pcbeingused333 claimed this today. OpenBug db: d1-sqlite Payload OSS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19766 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
device-management-toolkit/sample-web-ui#3711 ·
Maintainers usually reply within 1 day
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
elastic/kibana#306401 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
agentes-chat/agentes-chat#927 ·
Maintainers usually reply within 1 day
-
Closing a pinned tab jumps to the Tabs section instead of the next open pinned tabPossibly taken @seenimohamed claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ardia-browser/ardia#2769 ·
Maintainers usually reply within 1 day