-
Notifications
You must be signed in to change notification settings - Fork 347
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
Set DOTNET_CLI_HOME to a repo-local path #5402
Comments
Running this test build where I set the variable to the build workspace directory: https://dev.azure.com/dnceng/internal/_build/results?buildId=724637&view=results |
Ahh, forgot that arcade doesn't have a linux build leg. Will test this in arcade-validation instead. |
PR to set this during CI: #5775 |
My fix doesn't work for docker containers that are started during the build, as oposed as having the entire leg running inside a container. Reopening. |
Made a better fix, which sets the variable to the root of the repo during CI in #5805 |
Reopening and putting in the backlog. This change was the source for #5813 , but since it has the context I'm reactivating this one. The latest arcade validation builds were failing to resolve nuget v3 paths, reverting just this change unblocked them, as shown in this build |
I believe the change is still the correct change, and whoever picks this up next can investigate why this fails runtime's build. My guess is that Runtime is doing something weird and they should react to the change, rather than not making it. |
Okay I figured out why this change broke runtime. The build uses a NuGetAuthenticate task (https://github.com/microsoft/azure-pipelines-tasks/blob/d925deb300d85a09f8ed2d5d8a16f74cdb6fa8c5/Tasks/NuGetAuthenticateV0/main.ts#L16) to authenticate to private azure feeds. That task installs the credential provider into the $HOME directory, if we then set DOTNET_CLI_HOME to something else, that credential provider is lost and the restore can't use private feeds. I think we just.... can't set DOTNET_CLI_HOME, unless we want to copy the plugins from $HOME into the new location at the same time. |
Thanks @alexperovich . I think at this point let's drop it out of FR (remove epic and labels) so we can make sure there's consensus on "won't fix-ing" tomorrow at triage? |
Yea, thats probably good. |
Great finding, thanks Alex. Should we fix https://github.com/microsoft/azure-pipelines-tasks/blob/69bdf79bd5d624cf5f8733cd25636df5008f7cf2/Tasks/Common/artifacts-common/credentialProviderUtils.ts#L96 to respect the environment variable and not blindly read from the hardcoded location? cc @nkolev92 |
Filed issue with azure pipelines: microsoft/azure-pipelines-tasks#13375 |
Triage: For Helix, a Big Improvement would be to recycle machines for every build (hosted pool does this). |
I'm all for better isolation between CI builds – it really makes everything so much simpler – but dotnet/runtime#34994 is a local build problem and is waiting for the resolution of this issue. |
This issue points to a local build problem, you are right. But we would still see the issue if we wouldn't have disable repo tools being restored in CI temporarily: dotnet/runtime@97d1f96. So this still very much applies and needs to be fixed. |
This was previously disabled due to dotnet/sdk#10938 and its continuation issue dotnet/arcade#5402 But things might be better now?
By default, the CLI will use a user-specific folder for a few things, including first run sentinels and global tool information. The folder can be overridden with the DOTNET_CLI_HOME environment variable. Arcade should set this variable to a repo-local path, to avoid different builds (ie on CI machines or build servers) sharing this folder. While we should generally keep compatibility, that may not always be true between interim preview builds.
This has broken builds at least twice:
The text was updated successfully, but these errors were encountered: