Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Task name: Added proxy support for coveragepublisher common task
Description: Added NTLM_PROXY env for coveragepublisher common task.
Fix an issue regarding CoveragePublisher.Console connection failing if it needs to go through proxy.
The main reason for this change is some of the dependencies the customer is running in a network-restricted environment where outbound traffic must go through a corporate proxy. They encountered consistent failures because the task couldn't reach certain on-prem or internal resources due to missing proxy configuration. By adding support for the NTLM_PROXY environment variables, we ensure the task respects the customer’s network routing rules. This change allows the task to function correctly in environments that depend on proxy-based connectivity.
The customer mentioned this was working in the v1 version of the task and the v2 version it was failing because it was not respecting the proxy settings
Issue originated from PublishCodeCoverageResults@2 wherein when the build agent is behind a proxy, the task will fail as the outbound connection is not routing/using the proxy correctly.
Documentation changes required: Ideally - Add information regarding the use of the NTLM_PROXY environment variable if proxy is required for outboundconnection
Added unit tests:
Yes.
Manual test done:
Make sure that relevant env are set (NTLM_PROXY)
Run a pipeline that uses PublishCodeCoverageResults@2
On the test build agent (while the task hasn't been executed yet), override the script with the updated code (Location: /home/vsts/work/_tasks/... )
Expected:
PublishCodeCoverageResults@2 task should succeed, code coverage result visible, and build should not fail
Actual:
Build succeeded and code coverage result visible (Test done just now)
Task Name
PublishCodeCoverageResultsV2
Risk Assessment (Low / Medium / High)
Low
Change Behind Feature Flag (Yes / No)
No, its a configuration addition
Tech Design / Approach
Documentation Changes Required (Yes/No)
Indicate whether related documentation needs to be updated.
Unit Tests Added or Updated (Yes / No)
Indicate whether unit tests were added or modified to reflect these changes.
Additional Testing Performed
List all other tests performed (manual or automated, including integration, regression, scenario tests, etc.).
Logging Added/Updated (Yes/No)
Telemetry Added/Updated (Yes/No)
Rollback Scenario and Process (Yes/No)
Dependency Impact Assessed and Regression Tested (Yes/No)
Checklist