dotnet / dnceng

.NET Engineering Services
MIT License
24 stars 19 forks source link

Microsoft.DotNet.DarcLib.DarcAuthenticationFailureException: Failure to authenticate: Response status code does not indicate success: 401 #3981

Open jeffschwMSFT opened 2 months ago

jeffschwMSFT commented 2 months ago

Build

https://dev.azure.com/dnceng/internal/_build/results?buildId=2531189

fail: A '401 - Unauthorized' status was returned for a HTTP request. We'll set the retries amount to 0. 
fail: Non-continuable HTTP 401 error encountered while making request against URI '_apis/build/builds/2531189/artifacts'
      System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
         at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
         at Microsoft.DotNet.DarcLib.HttpRequestManager.ExecuteAsync(Int32 retryCount) in /_/src/Microsoft.DotNet.Darc/DarcLib/Helpers/HttpRequestManager.cs:line 103
fail: Error: Failed to assign build '237544' to channel ''.
      Microsoft.DotNet.DarcLib.DarcAuthenticationFailureException: Failure to authenticate: Response status code does not indicate success: 401 (Unauthorized).
         at Microsoft.DotNet.DarcLib.HttpRequestManager.ExecuteAsync(Int32 retryCount) in /_/src/Microsoft.DotNet.Darc/DarcLib/Helpers/HttpRequestManager.cs:line 120
         at Microsoft.DotNet.DarcLib.AzureDevOpsClient.ExecuteAzureDevOpsAPIRequestAsync(HttpMethod method, String accountName, String projectName, String requestPath, ILogger logger, String body, String versionOverride, Boolean logFailure, String baseAddressSubpath, Int32 retryCount) in /_/src/Microsoft.DotNet.Darc/DarcLib/AzureDevOpsClient.cs:line 857
         at Microsoft.DotNet.DarcLib.AzureDevOpsClient.GetBuildArtifactsAsync(String accountName, String projectName, Int32 azureDevOpsBuildId, Int32 maxRetries) in /_/src/Microsoft.DotNet.Darc/DarcLib/AzureDevOpsClient.cs:line 1262
         at Microsoft.DotNet.Darc.Operations.AddBuildToChannelOperation.ValidateAzDOBuildAsync(IAzureDevOpsClient azdoClient, String azureDevOpsAccount, String azureDevOpsProject, Int32 azureDevOpsBuildId) in /_/src/Microsoft.DotNet.Darc/Darc/Operations/AddBuildToChannelOperation.cs:line 332
         at Microsoft.DotNet.Darc.Operations.AddBuildToChannelOperation.PromoteBuildAsync(Build build, List`1 targetChannels, IBarApiClient barClient) in /_/src/Microsoft.DotNet.Darc/Darc/Operations/AddBuildToChannelOperation.cs:line 232
         at Microsoft.DotNet.Darc.Operations.AddBuildToChannelOperation.ExecuteAsync() in /_/src/Microsoft.DotNet.Darc/Darc/Operations/AddBuildToChannelOperation.cs:line 162
Problems using Darc to promote build 237544 to default channels. Stopping execution...
##[error]PowerShell exited with code '1'.

Build leg reported

No response

Pull Request

No response

Known issue core information

Fill out the known issue JSON section by following the step by step documentation on how to create a known issue

 {
    "ErrorMessage" : "DarcAuthenticationFailureException: Failure to authenticate: Response status code does not indicate success",
    "BuildRetry": false,
    "ErrorPattern": "",
    "ExcludeConsoleLog": false
 }

@dotnet/dnceng

Release Note Category

Additional information about the issue reported

No response

Known issue validation

Build: :mag_right: https://dev.azure.com/dnceng/internal/_build/results?buildId=2531189 Error message validated: [DarcAuthenticationFailureException: Failure to authenticate: Response status code does not indicate success] Result validation: :white_check_mark: Known issue matched with the provided build. Validation performed at: 9/5/2024 6:49:58 PM UTC

Report

Build Definition Step Name Console log Pull Request
2577280 dotnet-diagnostics DARC Gather build Log
2558377 dotnet-format Publish Using Darc Log
2569775 dotnet-symreader-portable Publish Using Darc Log
2568266 dotnet-diagnostics DARC Gather build Log
2556672 dotnet-Scaffolding Publish Using Darc Log
Build Definition Test Pull Request
2562999 dotnet-arcade-services ProductConstructionService.ScenarioTests.ScenarioTests_SdkUpdate.ArcadeSdkUpdate_E2E(False)

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 1 6
chcosta commented 2 months ago

This looks like https://teams.microsoft.com/l/message/19:afba3d1545dd45d7b79f34c1821f6055@thread.skype/1725407822970?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=4d73664c-9f2f-450d-82a5-c2f02756606d&parentMessageId=1725407822970&teamName=.NET%20Core%20Eng%20Services%20Partners&channelName=First%20Responders&createdTime=1725407822970. Likely an Arcade update is needed in the branch.