dotnet / dotnet/sdk

`dotnetup` should handle transient network issue ` Error: nodename nor servname provided, or not known (builds.dotnet.microsoft.com:443)`

Open
#55,171 0 comments 0 reactions 0 assignees View on GitHub
Area-dotnetup untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Prerequisites

- [x] I have read the [dotnetup documentation](https://github.com/dotnet/sdk/tree/release/dnup/documentation/general/dotnetup).
- [x] I have searched for [existing dotnetup issues](https://github.com/dotnet/sdk/issues?q=is%3Aissue%20state%3Aopen%20label%3Adotnetup).
- [x] I have searched for [existing dotnetup discussions](https://github.com/dotnet/sdk/discussions/categories/dotnetup).

### Issue type

Bug report

### Description

Several tests all at once in a single CI run failed. https://dev.azure.com/dnceng-public/public/_build/results?buildId=1496107&view=logs&jobId=68f2ee65-ec18-580c-7ed2-d0a4cae11481&j=68f2ee65-ec18-580c-7ed2-d0a4cae11481&t=89557a5d-cf8b-5204-5db5-1c689223a1e8 This only occurred so far on the amd64 mac. It seems likely transient as the change for get-dotnetup scripts seems unrelated to this problem.

Many tests passed, so it also seems like a transient network problem that we should probably handle better.

```
total: 1094
failed: 7
succeeded: 1059
skipped: 28
duration: 5m 36s 735ms
```

```
failed RuntimeInstall ("9.0",Runtime) (134ms)
Test method Microsoft.DotNet.Tools.Dotnetup.Tests.InstallEndToEndTests.RuntimeInstall threw exception:
FluentAssertions.Execution.AssertionFailedException: Expected exitCode to be 0 because dotnetup exited with code 1. Output:
Error: nodename nor servname provided, or not known (builds.dotnet.microsoft.com:443)
, but found 1 (difference of 1).
at FluentAssertions.Execution.FallbackTestFramework.Throw(String message)
at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
at FluentAssertions.Execution.AssertionChain.FailWith(Func`1 getFailureReason)
at FluentAssertions.Numeric.NumericAssertionsBase`3.Be(T expected, String because, Object[] becauseArgs)
at Microsoft.DotNet.Tools.Dotnetup.Tests.InstallEndToEndTests.RuntimeInstall(String componentSpec, InstallComponent expectedComponent) in /Users/runner/work/1/s/test/dotnetup.Tests/DnupE2Etest.cs:123
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
```

```
failed EnvScript_WorksWithSpecialCharactersInPath (133ms)
Test method Microsoft.DotNet.Tools.Dotnetup.Tests.InstallEndToEndTests.EnvScript_WorksWithSpecialCharactersInPath threw exception:
FluentAssertions.Execution.AssertionFailedException: Expected exitCode to be 0 because SDK installation failed with special characters in path. Output:
Error: nodename nor servname provided, or not known (builds.dotnet.microsoft.com:443)
, but found 1 (difference of 1).
at FluentAssertions.Execution.FallbackTestFramework.Throw(String message)
at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
at FluentAssertions.Execution.AssertionChain.FailWith(Func`1 getFailureReason)
at FluentAssertions.Numeric.NumericAssertionsBase`3.Be(T expected, String because, Object[] becauseArgs)
at Microsoft.DotNet.Tools.Dotnetup.Tests.InstallEndToEndTests.EnvScript_WorksWithSpecialCharactersInPath() in /Users/runner/work/1/s/test/dotnetup.Tests/DnupE2Etest.cs:144
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
```

### dotnetup version

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with test/dotnetup.Tests/DnupE2Etest.cs, especially RuntimeInstall and EnvScript_WorksWithSpecialCharactersInPath, and review the linked CI failure. Trace the dotnetup installation path that produces the DNS error, then run the affected end-to-end tests; done means transient network failures are handled and these installation scenarios succeed.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.