Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script crashes when rollForward feature is set to latestMinor #448

Open
4 tasks done
nZeus opened this issue Aug 15, 2023 · 2 comments · May be fixed by #538
Open
4 tasks done

Script crashes when rollForward feature is set to latestMinor #448

nZeus opened this issue Aug 15, 2023 · 2 comments · May be fixed by #538
Labels
feature request New feature or request to improve the current logic

Comments

@nZeus
Copy link

nZeus commented Aug 15, 2023

Description:
When rollForward is set to latestMinor and sdk.version is set to 7.0.0, I expect the script to use the latest installed version of .NET SDK (https://learn.microsoft.com/en-us/dotnet/core/tools/global-json).
But instead the script crashes with Failed to install dotnet error:

Run actions/setup-dotnet@v3
  
/home/runner/work/_actions/actions/setup-dotnet/v3/externals/install-dotnet.sh --version 7.0.0
dotnet-install: Attempting to download using primary link https://dotnetcli.azureedge.net/dotnet/Sdk/7.0.0/dotnet-sdk-7.0.0-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://dotnetcli.azureedge.net/dotnet/Sdk/7.0.0/dotnet-sdk-7.0.0-linux-x64.tar.gz' is not available.
dotnet-install: Attempting to download using primary link https://dotnetbuilds.azureedge.net/public/Sdk/7.0.0/dotnet-sdk-7.0.0-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://dotnetbuilds.azureedge.net/public/Sdk/7.0.0/dotnet-sdk-7.0.0-linux-x64.tar.gz' is not available.
dotnet_install: Error: Could not find `.NET Core SDK` with version = 7.0.0
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
Error: Failed to install dotnet, exit code: 1. dotnet_install: Error: Could not find `.NET Core SDK` with version = 7.0.0
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support

Task version:
Specify the task version

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted

Repro steps:

  • ubuntu-22.04 runner (with pre-installed .NET SDK 7.0.306)
  • global.json:
{
  "sdk": {
    "version": "7.0.0",
    "rollForward": "latestMinor"
  }
}

Expected behavior:
The script should use the highest installed minor version of .NET SDK

Actual behavior:
An error: Failed to install dotnet, exit code: 1. dotnet_install: Error: Could not find '.NET Core SDK' with version = 7.0.0

@nZeus nZeus added bug Something isn't working needs triage labels Aug 15, 2023
@nikolai-laevskii
Copy link
Contributor

Thank you for the detailed description of the issue! We will investigate it and come back with an update.

@IvanZosimov
Copy link
Contributor

Hi, @nZeus 👋 Unfortunately, the setup-dotnet currently supports only one rollForward option - latestFeature. I'm going to transform this bug report to the feature request.

@IvanZosimov IvanZosimov added feature request New feature or request to improve the current logic and removed bug Something isn't working labels Aug 23, 2023
@IvanZosimov IvanZosimov removed their assignment Aug 24, 2023
danielcweber added a commit to Gremlinq/ExRam.Gremlinq that referenced this issue Oct 5, 2023
…o, GitHub actions only supports the latestFeature option (see actions/setup-dotnet#448)
@js6pak js6pak linked a pull request Jul 20, 2024 that will close this issue
2 tasks
MattKotsenas added a commit to rjmurillo/moq.analyzers that referenced this issue Aug 1, 2024
Update .NET SDK to the latest released version and disable
`rollForward`.

Updates to the .NET SDK feature band can introduce new / updated
analyzers (for instance, 8.0.400 adds
[IDE0320](dotnet/roslyn#73012)). As a result,
updating the feature band isn't "safe" to do from a build
reproducibility perspective. It will also conflict with #166.

That means the roll forward options available to us are:

- `patch`
- `latestPatch`
- `disable`

However, GitHub Actions don't support these options (tracked by
actions/setup-dotnet#448). Thus, the only
`rollForward` strategy that currently does the same thing locally and in
CI is `disabled`.

Once 448 is fixed, we can / should probably switch to `latestPatch`
(tracked by #171).

This 'gotcha' is also added to the SquiggleCop documentation
[here](https://github.com/MattKotsenas/SquiggleCop?tab=readme-ov-file#common-sources-of-baseline-mismatches).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants