rollForward: latestMajor installs the latest LTS SDK even when it is older than sdk.version
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- github-actions, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 1.2k
- フォーク
- 579
- 平均マージ
- 6日 4時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
actions/setup-dotnet のほかの issue
-
bug needs triage
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
actions/setup-dotnet#807 · リアクション 1 件 ·
-
feature request
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
actions/setup-dotnet#801 · コメント 1 件 · リアクション 1 件 ·
-
feature request
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
actions/setup-dotnet#778 · コメント 3 件 · リアクション 1 件 ·
-
feature request
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
actions/setup-dotnet#701 · コメント 3 件 ·
-
feature request
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
actions/setup-dotnet#659 · コメント 1 件 · リアクション 2 件 ·
actions/setup-dotnet の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 87/100
メンテナーはふだん 1 日以内に返信
-
🛠️ dette technique
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
betagouv/mon-entreprise#4752 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
franciscoBSalgueiro/en-croissant#1111 ·
メンテナーはふだん 2 日以内に返信
-
area/providers type/feature version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
anomalyco/opencode#64845 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信