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

Add DOTNET_ROOT #12

Merged
merged 3 commits into from
Aug 23, 2019
Merged

Add DOTNET_ROOT #12

merged 3 commits into from
Aug 23, 2019

Conversation

damccorm
Copy link
Contributor

@damccorm damccorm commented Aug 8, 2019

Fixes #11

@clairernovotny
Copy link

Does this work with SxS? It would need to point to the directory above the versioned directory, I believe. I'm not completely sure.

@damccorm
Copy link
Contributor Author

damccorm commented Aug 8, 2019

I think you're right. Updating

@clairernovotny
Copy link

clairernovotny commented Aug 8, 2019

Notice here, https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/DotNetCoreInstallerV1/dotnetcoreinstaller.ts#L15, it points to the a location on the agent's dotnet directory, not any version underneath.

Same thing for the toolPath here: https://github.com/actions/setup-dotnet/blob/master/src/installer.ts#L62. It looks like it's adding the versioned directory to the path, not the dotnet directory above it?

@damccorm
Copy link
Contributor Author

damccorm commented Aug 8, 2019

Yep. Also needs to happen even if we're pulling from the cache, so updating to do that as well

@damccorm
Copy link
Contributor Author

damccorm commented Aug 8, 2019

Should be right now

@clairernovotny
Copy link

toolPath is the non-versioned path? I couldn't tell from a quick skim

@damccorm
Copy link
Contributor Author

damccorm commented Aug 8, 2019

Ah no, didn't quite understand the ask. Sorry, bouncing between too many things right now, will drill into this now.

Right now, toolPath points to the directory that contains a specific version of dotnet (aka $RUNNER_TOOL_CACHE/dncs/<version>/<arch>)

I'll update to point to RUNNER_TOOL_CACHE/dncs instead, definitely is the right thing as you've suggested. Updating what we're adding to the path doesn't seem right to me though. I think we should keep that pointing to the versioned path so that dotnet <command> resolves to the correct version, and I don't quite understand why we would point that to the unversioned folder. Thoughts?

@clairernovotny
Copy link

clairernovotny commented Aug 8, 2019

I'm not an expert in this, but I thought there's supposed to be a muxer in the root that knows how to find the versioned dotnet underneath.

@richlander can you help triage? What's the correct behavior for SxS on a build agent?

@damccorm
Copy link
Contributor Author

My understanding is that you can do it that way, but I don't think we need to. I don't see any advantages to changing to this behavior, I'm open to doing it if there are though.

My inclination is also probably to finish this PR and address that in a separate follow up issue - does that seem fair?

@sburns
Copy link

sburns commented Aug 16, 2019

Hey y'all, I'm by no means a .Net developer, however I'm trying to get a C# lambda deployed via Actions. After setting up dotnet w/ this wonderful action and installing the lambda tools with dotnet tool install -g Amazon.Lambda.Tools, this log is emitted:

Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.

Subsequent steps die because they can't find dotnet-lambda. Is this related? If not, sorry for crashing your PR.

@damccorm
Copy link
Contributor Author

@sburns I think that's unrelated - see this issue https://github.com/dotnet/cli/issues/8368

It looks like Dotnet requires a new process to be started in order for installations to fully succeed (which is weird and seems like a bug on their end to me). We can't completely exit the process from the runner so I'm not sure there's much we can do about this.

With that said, I'm guessing that this workaround used in a different CI environment will probably work here as well?

@sburns
Copy link

sburns commented Aug 23, 2019

@damccorm thanks for the heads up! I worked around it by writing a local action that installs the lambda tools during the image build, was the easiest way I could find to get that new process.

@damccorm damccorm merged commit 1c11308 into master Aug 23, 2019
@damccorm damccorm deleted the dotnet_root branch August 23, 2019 14:38
@Silvenga Silvenga mentioned this pull request Aug 28, 2019
JSkimming added a commit to JSkimming/abioc that referenced this pull request Sep 20, 2019
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.

DOTNET_ROOT for Global Tools
4 participants