rollForward: latestMajor installs the latest LTS SDK even when it is older than sdk.version
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- github-actions, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.2k
- Fork
- 579
- Merge trung bình
- 6 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của actions/setup-dotnet
-
bug needs triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 57/100
actions/setup-dotnet#807 · 1 reaction ·
-
feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
actions/setup-dotnet#801 · 1 bình luận · 1 reaction ·
-
feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
actions/setup-dotnet#778 · 3 bình luận · 1 reaction ·
-
feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
actions/setup-dotnet#701 · 3 bình luận ·
-
feature request
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 55/100
actions/setup-dotnet#659 · 1 bình luận · 2 reaction ·
Tất cả issue của actions/setup-dotnet
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🛠️ dette technique
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
betagouv/mon-entreprise#4752 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
franciscoBSalgueiro/en-croissant#1111 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area/providers type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#64845 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày