Visitar URL original
Explicity set installation path by jasoncouture · Pull Request #498 · actions/setup-dotnet · GitHub
Skip to content

Explicity set installation path - #498

Closed
jasoncouture wants to merge 1 commit into
actions:mainfrom
jasoncouture:main
Closed

jasoncouture wants to merge 1 commit into
actions:mainfrom
jasoncouture:main

Conversation

@jasoncouture

@jasoncouture jasoncouture commented Jan 13, 2024 •

Copy link
Copy Markdown

Description:
Github actions tool guidelines is to use the worker tool cache, instead of system-wide install path. Not doing so results in installation failures on self hosted runners.

A successful self-hosted runner run can be found here: https://github.com/jasoncouture/dhcpr/actions/runs/7509545156/job/20446802058

Related issue:
#360

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@jasoncouture
jasoncouture marked this pull request as ready for review January 13, 2024 01:41
@jasoncouture
jasoncouture requested a review from a team as a code owner January 13, 2024 01:41
@jasoncouture
jasoncouture marked this pull request as draft January 13, 2024 01:50
@jasoncouture
jasoncouture force-pushed the main branch 3 times, most recently from 5107a10 to 15d0f91 Compare January 13, 2024 02:00
Github actions tool guidelines, is to use the worker tool cache, instead of system-wide install path.
@v-priyagupta108

Copy link
Copy Markdown
Contributor

Hi @jasoncouture,
Thanks for this, and apologies for the long silence.

We've opened #785, which fixes the same permission failure differently. The difference is where .NET goes instead.

Here, getInstallDirectory() returns RUNNER_TOOL_CACHE/dotnet before the platform default. Since RUNNER_TOOL_CACHE is always set on hosted runners, that path always wins there, so the .NET preinstalled under /usr/share/dotnet would stop being used and get downloaded again on every run. As noted on #518, we'd rather not change the install location for everyone to fix a case that affects self-hosted and ARC runners.

#785 keeps the default at priority 2 and falls back to $HOME/.dotnet only when the default isn't writable, so behaviour is unchanged wherever it already works. It also helps self-hosted runners that don't set RUNNER_TOOL_CACHE.

Happy to reconsider if there's something we've missed.

@v-priyagupta108

Copy link
Copy Markdown
Contributor

#785 has now been merged, which addresses the same permission failure by falling back to $HOME/.dotnet when the default location isn't writable. Since that covers the underlying problem without changing the install location for runners where it already works, I'm closing this one as superseded.

Thanks for raising it and for the patience on the long review time. The original report in #360 is now resolved as a result of your pushing on this.

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