Skip to content

Conversation

@vinayakmsft
Copy link
Contributor

@vinayakmsft vinayakmsft commented Oct 16, 2025

Context

This PR resolves the core issue of socket timeout errors in corporate proxy environments while maintaining full backward compatibility and adding comprehensive security measures.

Customers using the PublishCodeCoverageResultsV2 task in corporate environments with proxy servers were experiencing socket timeout errors when attempting to upload coverage data to Azure blob storage (ufxtcmprodweu21.vstmrblob.vsassets.io:443). This occurred even when the blob storage endpoints were whitelisted in their proxy configuration.

Root Cause: The underlying .NET application (CoveragePublisher.Console) was failing to properly initialize HttpClient.DefaultProxy settings, causing network requests to bypass proxy configuration despite environment variables being set.

Solution Overview
This PR implements a comprehensive proxy configuration system that ensures proper .NET HttpClient proxy initialization by:

Enhanced Proxy Detection: Priority-based proxy configuration (Azure agent → Environment variables)
Comprehensive Environment Variables: Sets both standard and .NET-specific proxy environment variables
Security Hardening: Input validation, credential masking, and secure credential handling
Cross-Platform Support: Handles proxy configuration across Windows, Linux, and macOS

Testing screenshots

image link to testing account - https://dev.azure.com/ForCjson/CCDemo/_build/results?buildId=1664&view=codecoverage-tab ---

Task Name

PublishCodeCoverageResultsV2


Risk Assessment (Low / Medium / High)

Low


Additional Testing Performed

List all other tests performed (manual or automated, including integration, regression, scenario tests, etc.).

image image image image image

Checklist

  • Related issue linked (if applicable)
  • Task version was bumped — see versioning guide
  • Verified the task behaves as expected

@vinayakmsft vinayakmsft requested a review from a team as a code owner October 16, 2025 10:25
@KathanS
Copy link
Contributor

KathanS commented Oct 16, 2025

@vinayakmsft, do we need to move this changes behind FF?

@KathanS
Copy link
Contributor

KathanS commented Oct 16, 2025

Can you please share info on testing this specific scenario?

@vinayakmsft vinayakmsft force-pushed the users/vinayakjoshi/Fixingproxyissueiwthpccrv2 branch from c7fc294 to eae9861 Compare November 5, 2025 06:21
@vinayakmsft
Copy link
Contributor Author

@vinayakmsft, do we need to move this changes behind FF?

We wont need FF in this case. Let me know if its mandatory to add a FF

@vinayakmsft
Copy link
Contributor Author

Can you please share info on testing this specific scenario?

Added testing details in PR description

@vinayakmsft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@vinayakmsft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@vinayakmsft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@vinayakmsft vinayakmsft enabled auto-merge (squash) November 6, 2025 11:18
@vinayakmsft vinayakmsft merged commit 12bb2a6 into master Nov 6, 2025
11 checks passed
@vinayakmsft vinayakmsft deleted the users/vinayakjoshi/Fixingproxyissueiwthpccrv2 branch November 6, 2025 11:35
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.

3 participants