VsTestV3: reflect arm64 vstest console name in logs behind feature flag - #22487
Open
Vinayak (vinayakmsft) wants to merge 6 commits into
Open
Vinayak (vinayakmsft) wants to merge 6 commits into
Vinayak (vinayakmsft) wants to merge 6 commits into
Conversation
Query the TestExecution.EnableArm64VstestConsole feature flag from TCM at task startup and, when enabled, print vstest.console.arm64.exe instead of vstest.console.exe in console and debug output. Localized messages that embed the exe name are resolved first and then substituted so existing translations are not broken. Executable resolution and path matching are unchanged.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
The TestExecution.EnableArm64VstestConsole flag alone caused vstest.console.arm64.exe to be logged on every agent. Gate it additionally on the agent being windows arm64, preferring the Agent.OSArchitecture variable over os.arch() so x64 agents emulated on arm64 hardware are still detected correctly.
runvstest.ts already fails the task on non-windows before execute() runs, so the os.platform() guard in the arm64 agent check could never be false. Renamed the helper to isArm64Agent accordingly.
Feature flag registries are per service, so a TCM owned flag resolved against the collection uri always came back undefined. Resolve the TCM location url via the resourceAreas api and query the flag there, falling back to the collection uri when resolution fails. Also trim the trailing slash before appending the api path, return early on the request error path so resolve is not called twice, and log the status code and effectiveState so a failed call is distinguishable from a disabled flag. Fixes an inverted arm64 agent check in helpers.ts.
… lookup Adds 24 tests: 12 for the arm64 exe name resolution in helpers.ts (flag/agent truth table, Agent.OSArchitecture casing and precedence over os.arch, and locVsTestConsole substitution) and 11 for the TCM resource area resolution and feature flag lookup in runvstest.ts (locationUrl resolution, both fallback paths, effectiveState handling, 404 and transport errors, and the trailing slash fix). runvstest.ts is loaded with os.platform mocked off win32 so importing it does not run the task. Also removes an inverted arm64 agent check that the new tests caught, and stubs locVsTestConsole on the shared helpers mock so the existing versionfinder tests keep passing.
Virender Kumar (virekumar)
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Query the TestExecution.EnableArm64VstestConsole feature flag from TCM at task startup and, when enabled, print vstest.console.arm64.exe instead of vstest.console.exe in console and debug output. Localized messages that embed the exe name are resolved first and then substituted so existing translations are not broken. Executable resolution and path matching are unchanged.
Context
Describe the context or motivation for this PR. Include links to any related Azure DevOps Work Items or GitHub issues.
📌 How to link to ADO Work Items
Task Name
VstestV3
Description
Query the TestExecution.EnableArm64VstestConsole feature flag from TCM at task startup and, when enabled, print vstest.console.arm64.exe instead of vstest.console.exe in console and debug output. Localized messages that embed the exe name are resolved first and then substituted so existing translations are not broken. Executable resolution and path matching are unchanged.
Risk Assessment (Low / Medium / High)
Low
Change Behind Feature Flag (Yes / No)
yes
Testing screenshots Added or Updated (Yes / No)
Arm64 console logs
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