Skip to content

VsTestV3: reflect arm64 vstest console name in logs behind feature flag - #22487

Open
Vinayak (vinayakmsft) wants to merge 6 commits into
masterfrom
users/vinayakjoshi/updatingtheconsolelogstatementsforvstest
Open

Vinayak (vinayakmsft) wants to merge 6 commits into
masterfrom
users/vinayakjoshi/updatingtheconsolelogstatementsforvstest

Conversation

@vinayakmsft

@vinayakmsft Vinayak (vinayakmsft) commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

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

Image Image

Logging Added/Updated (Yes/No)

  • Appropriate log statements are added with meaningful messages.
  • Logging does not expose sensitive data.
  • Log levels are used correctly (e.g., info, warn, error).

Telemetry Added/Updated (Yes/No)

  • Custom telemetry (e.g., counters, timers, error tracking) is added as needed.
  • Events are tagged with proper metadata for filtering and analysis.
  • Telemetry is validated in staging or test environments.

Rollback Scenario and Process (Yes/No)

  • Rollback plan is documented.

Dependency Impact Assessed and Regression Tested (Yes/No)

  • All impacted internal modules, APIs, services, and third-party libraries are analyzed.
  • Results are reviewed and confirmed to not break existing functionality.

Checklist

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

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.
@vinayakmsft
Vinayak (vinayakmsft) requested a review from a team as a code owner September 7, 2026 10:35
@azure-pipelines

Copy link
Copy Markdown
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.
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.

2 participants