Skip to content

[release/10.0] Fix ArgumentOutOfRangeException in DownloadFromResultsContainer when link has no query - #17844

Merged
premun merged 1 commit into
dotnet:release/10.0from
premun:backport/pr-17704-to-release/10.0
Nov 26, 2026
Merged

premun merged 1 commit into
dotnet:release/10.0from
premun:backport/pr-17704-to-release/10.0

Conversation

@premun

@premun premun commented Nov 26, 2026

Copy link
Copy Markdown
Member

Backport of #17704 to release/10.0.

Fixes ArgumentOutOfRangeException in DownloadFromResultsContainer when a result file link has no query string, and aligns URI/SAS parsing in AzureBlobClientFactory (Fixes #17703).

Backport adjustments

  • Resolved a conflict in DownloadFromResultsContainer.cs: kept Path.Combine(OutputDirectory, JobId) because release/10.0 does not use TaskEnvironment.GetAbsolutePath (multithreaded task model).
  • Test files use FluentAssertions instead of AwesomeAssertions (release/10.0 still uses FluentAssertions).

To double check:

Validation: dotnet test src\Microsoft.DotNet.Helix\Sdk.Tests\Microsoft.DotNet.Helix.Sdk.Tests\Microsoft.DotNet.Helix.Sdk.Tests.csproj --filter "FullyQualifiedName~DownloadFromResultsContainerTests|FullyQualifiedName~AzureBlobClientFactoryTests" — Passed: 15, Failed: 0.

…Container when link has no query (dotnet#17704)

(cherry picked from commit ea98218)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 14:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the Helix result-download and SAS-token handling backport.

No open issues 🎉

What changed in this PR

Backports #17704 to release/10.0, fixing Helix result downloads that fail when a blob link has no query string and aligning SAS token handling across the SDK task and job monitor.

Changes:

  • Safely handle links with or without queries and remove leading ? from separate SAS tokens.
  • Add null guards for metadata and work items while preserving release-branch output-path behavior.
  • Add FluentAssertions regression tests for URI and SAS combinations.
File Description
src/​Microsoft.DotNet.Helix/​Sdk/​DownloadFromResultsContainer.cs Extracts safe URI/SAS parsing and guards null task inputs.
src/​Microsoft.DotNet.Helix/​Sdk.Tests/​Microsoft.DotNet.Helix.Sdk.Tests/​DownloadFromResultsContainerTests.cs Tests query handling, original-URI preservation, and SAS normalization.
src/​Microsoft.DotNet.Helix/​Sdk.Tests/​Microsoft.DotNet.Helix.Sdk.Tests/​AzureBlobClientFactoryTests.cs Tests factory URI handling and SAS prefixes across both overloads.
src/​Microsoft.DotNet.Helix/​JobMonitor/​Services/​AzureBlobClientFactory.cs Strips queries from the first ? and normalizes SAS prefixes.

Review effort: Balanced

@premun
premun enabled auto-merge (squash) November 26, 2026 14:38
@premun
premun merged commit 2b736f3 into dotnet:release/10.0 Nov 26, 2026
15 of 17 checks passed
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.

4 participants