Skip to content

V2 setup-dotnet ADR#171

Closed
vsafonkin wants to merge 12 commits intoactions:mainfrom
vsafonkin:v-vlsafo/adr-v2-doc
Closed

V2 setup-dotnet ADR#171
vsafonkin wants to merge 12 commits intoactions:mainfrom
vsafonkin:v-vlsafo/adr-v2-doc

Conversation

@vsafonkin
Copy link
Copy Markdown

@vsafonkin vsafonkin commented Feb 18, 2021

This PR outlines the basic proposals for the v2 version of setup-java.

Internal issue: 1807

Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Vladimir Safonkin added 2 commits February 19, 2021 09:19
Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Comment thread docs/adrs/v2-setup-dotnet.md Outdated
Status: Proposed

# Context
- GitHub-hosted Ubuntu and Windows runners have .NET versions pre-installed in system directories (Ubuntu:`/usr/share/dotnet`, Windows:`C:\Program Files\dotnet`), but the `v1` version of action installs .NET to user's directory (Ubuntu:`/home/runner/.dotnet`, Windows: `C:\Users\runneradmin\AppData\Local\Microsoft\dotnet`) for that runners. It means that action always download and install .NET version even if it is pre-installed and after using the action all pre-installed .NET versions are unavailable.
Copy link
Copy Markdown
Contributor

@maxim-lobanov maxim-lobanov May 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To summarize the current behavior for .NET team review

We have a bunch of .NET Core versions pre-installed on images. And the problem is that action works very inconsistent on different platforms.

  • Ubuntu:
    • Pre-installed location (where .NET is pre-installed): “/usr/share/dotnet”
    • Action installs to: “/home/runner/.dotnet”
  • Windows:
    • Pre-installed location:  “C:\Program Files\dotnet”
    • Action installs to “C:\Users\runneradmin\AppData\Local\Microsoft\dotnet”
  • MacOS:
    • Pre-installed location: “/Users/runner/.dotnet”
    • Action installs to “/Users/runner/.dotnet”
       

How it works currently on macOS

Pre-installed location and action location are the same. It means that if we have versions 2.1.x, 3.1.x and 5.0.x pre-installed on image and user will install 3.1 via action, installation will be skipped because version already exists. if customer runs dotnet --version it will report version 5.x if customer doesn't have global.json (because both 2.1, 3.1, 5.0 will be located in the same folder and dotnet will choose the latest one based on https://docs.microsoft.com/en-us/dotnet/core/versions/selection)

How it works currently on Windows / Ubuntu

Pre-installed location and action location are different. It means if we have versions 2.1.x, 3.1.x and 5.0.x pre-installed on image and user will install 3.1 via action, version 3.1 will be installed to the separate location and dotnet --version will report version 3.1 because it is the single version installed in that location.

Problems

  1. Behavior is inconsistent between platforms and it confuses users
  2. macOS users complain that dotnet still uses 5.x despite the fact that they invoked action with 3.1
  3. Windows / Ubuntu users complain that pre-installed .NET are not consumed and it is always installed that takes build time

In our understand, the correct behavior is on macOS right now.
The new versions should be installed in the same location like pre-installed. It is expected behavior that dotnet --version will point the latest one and we should just point customers to documentation.

@vsafonkin vsafonkin closed this Jun 21, 2021
@vsafonkin vsafonkin mentioned this pull request Jun 21, 2021
@vsafonkin vsafonkin mentioned this pull request Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants