Retire legacy extension contracts, CLI aliases, and duplicate telemetry in Microsoft.Testing.Platform 3

Aperta
#12,314 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp, github-actions

Direzione di ricerca

Start by reading the linked PRs #12317, #12316, and #12319 and their evidence; each is open and locally verified, while the issue records a blocker for removing MTP --no-progress because pinned Arcade still injects it. Review the remaining acceptance criteria and per-contract migration boundaries before taking on a specific group. Done means each group has an implemented PR or an explicit evidence-backed blocker; published-head CI is still a separate gate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type/breaking-change

Track the six explicitly authorized MTP 3 legacy-contract removals below. This is intentionally narrower than dropping all MTP 2.x extension compatibility. Preserve supported .NET Framework/netstandard functionality, modern MSTest source generation, cancellation/fault observation, and canonical OpenTelemetry output. This work is separate from #12312.

Reviewed source: 471a807cf8182e0bcd0d9967c8dbf002c04945d2. Implementation starts from current main c46cfa7394e7be10c4057d3ba8d1d3b698fe242e (MSTest 5 / MTP 3 version prefixes).

Removal and migration checklist

  • Old orchestrator facade. Remove TestHostOrchestrator/OrchestratorBackCompat.cs, the old Microsoft.Testing.Platform.Extensions.TestHostOrchestrator.ITestHostOrchestrator alias, dependent old manager implementation, and TestApplicationBuilder's concrete compatibility getter. Retain ITestHostExecutionOrchestrator, the replacement manager exposed by ITestApplicationBuilder, and execution middleware. Binary/source break: extensions compiled against the old type identities or concrete getter must be rebuilt/migrated; loading those binaries can fail with type/member resolution errors. Prerequisite/replacement: migrate and validate the affected Retry/orchestration extensions against the execution-orchestrator API; establish the exact package/version floor from their member references, not from the major-version number alone.
  • Parameterless IProcess.WaitForExitAsync(). Remove the compatibility method from the internal interface and SystemProcess / TestHostHandleToProcessAdapter; migrate relevant callers, mocks, and tests to WaitForExitAsync(CancellationToken.None) or the real operation token. Retain the token overload and its cancellation/fault behavior. Binary/source break: old extensions such as Retry that call the zero-argument member require a replacement build. Prerequisite: identify and exercise a compatible Retry package and cancellation/teardown paths.
  • Compatibility-only polyfill exports. Prune only obsolete platform exports in src/Polyfills/PolyfillBackwardCompatibility.cs after tracing linked/generated consumers and old package IL. Do not blanket-delete the shared file or all polyfills: retained legacy-target TRX/JUnit code still needs helpers such as SaveAsync. Binary break: older netstandard/.NET Framework extension assets carrying [Microsoft.Testing.Platform]Polyfills.Polyfill.* member references cannot use removed exports. Prerequisite: establish explicit extension/TFM-specific supported package floors, migrate the narrowly affected old-binary cases (including enabled-telemetry .NET Framework coverage), and run supported legacy-target reporters against packed bits. Modern assets not binding those exports are not automatically retired.
  • Deprecated-engine friend grants. Remove only InternalsVisibleTo for Microsoft.Testing.Framework and MSTest.Engine. Binary/source break: the retired source-generation engine can fail with MethodAccessException when calling platform internals. Replacement: current MSTest source generation / Microsoft.Testing.Internal.Framework; this does not retire modern MSTest.SourceGeneration. Prerequisite: document retirement of the old engine identities and verify the current source-generated packaged consumer.
  • Legacy CLI/filename spellings. Migrate --no-progress to --progress off, --no-ansi to --ansi off, and HangDump %p to {pid}. Behavior/source break: old command lines stop parsing and %p no longer expands to a process ID. Update the real module-pool producer (eng/collection-module-pool.ps1) before removing registrations, initialization/precedence handling, resources, and help/info expectations. Terminal initialization documents an Arcade producer of --no-progress: confirm and migrate the pinned upstream producer before shipping an incompatible removal. Never hand-edit mirrored eng/common. If that dependency cannot be retired here, report its exact prerequisite and leave the affected removal explicitly blocked rather than claiming completion. Preserve canonical switches and supported HangDump templates/path behavior.
  • Duplicate legacy OpenTelemetry output. Remove old test.* aliases, Extension.* tags, tests.* instruments, and obsolete legacy-control state while retaining canonical attributes/instruments. Observable telemetry break: dashboards/queries must migrate exact names, values, and duration units; old duration milliseconds and canonical seconds must not be conflated. Trace TestingPlatformSemanticConventions, ExtensionHelper, PlatformOpenTelemetryOptions, result-handler partials and invokers. Prerequisite: document the precise migration map, verify canonical-only activity/metric output and millisecond-to-second scaling, and preserve filtering/parallel isolation for global listeners. No access to or modification of external dashboards is authorized or implied.

Delivery and compatibility boundaries

Publish independently reviewable PRs linked here (natural coupling: binary contracts, CLI/filename migration, and telemetry; no stack is required). Preserve shipped API history and record intentional removals using *REMOVED* entries in applicable unshipped API baselines. Update directly related migration/changelog documentation. Compatibility floors must be based on concrete dependency evidence and recorded per affected extension/asset; keep unrelated old-extension and protocol assurance intact.

Do not remove serialization constructors, rename HasExitedGracefully, change IsTestingPlatformApplication defaults, split UWP/WinUI packages, change protocol versions, or remove Jsonite. Preserve the source-only server client and its linked helpers.

Acceptance criteria

  • All six groups have an implemented PR or an explicit evidence-backed prerequisite/blocker; do not mark a proposed or blocked removal as delivered.
  • Each PR uses the repository template and maintained rationale, lists binary/source/behavioral migrations and precise compatibility boundaries, and links this tracking issue without closing it prematurely.
  • Use the repository-pinned SDK/build scripts and pack before package-consuming acceptance runs. Verify effective package/cache and executed binary provenance, current source generation, supported legacy targets, cancellation, canonical telemetry, help/info and orchestration as affected.
  • Include revision-bound Test-value evidence: executed red/green or preservation evidence, exact commands/exits/identities/counts, and honest unavailable evidence. Read back published issue/PR bodies and verify live destination refs and remote commit SHAs.

Implementation PRs and evidence

  • Binary-contract implementation: https://github.com/microsoft/testfx/pull/12317 is open and locally verified, not merged, at 79ef4f9dcd47e14e7e9615686fb903bc6955ab2d. Apply both branch commits (e65a258740f90e366c1c6fb60f15d6aed45c094d, then the final head) when composing. Supported core build/pack and verify-nupkgs exited 0; 1,561 focused unit cases passed (520/520/521), the same 28 removal cases failed at intended assertions with preserved baseline DLLs and passed with exact shipping DLLs, and all 12 packed compatibility/telemetry/TRX/JUnit/current-sourcegen cases passed with no skips. Fresh cache and loaded/output DLL hashes matched this branch nupkg bytes. Full PR template/body, live main destination and remote head SHA were read back and verified; Published-head CI remains a separate gate; the local composed-source result is recorded below.
  • Canonical telemetry implementation: https://github.com/microsoft/testfx/pull/12316 is open and locally verified, not merged, at 10d19fa632dcb209a5fb693c1070abb77fbcf980 (ordered branch commits: 006fa932f29de2841189f3e8c9a462409d8667e1, 8d006ba6208f2d0b35a92d45824faa3d9286ec81, then final head). Default-UAP source pack/guards passed. 504 platform/result-consumer executions, 380 real-SDK provider/listener/wrapper executions, 6 real exporter cases and 2 native MSTest packaged cases passed without skips; final exporter replay passed 6/6. Identical retained exporter assertions detected baseline legacy output in 4/6 cases (legacy-disabled 2/6 appropriately passed); a compiling TotalSeconds-to-TotalMilliseconds fault made all six fail, with the two legacy-disabled cases proving 1250 versus 1.25 seconds. Fresh per-variant feeds/caches and every loaded DLL/nupkg hash were verified. Complete name/value/unit/aggregation migration map and explicit external-dashboard/CI gaps are in the PR and versioned record. Full template/body, live main destination and remote head were independently read back.
  • CLI/filename implementation: https://github.com/microsoft/testfx/pull/12319 is open and locally verified, not merged, at 36a0265bcf69ae7eb501775c014b9681bc8658f4. MTP --no-ansi and HangDump %p retirement, canonical producers, help/info and native createdump literal-percent output are implemented. Green: 552 executions (550 distinct, two decisive reruns), 52 packed cases, real pinned-SDK Test1 pass with module/package hashes, and 34 pool checks; paired 500 cases passed green versus 452 preservation passes /48 intended baseline failures /0 skips. MTP --no-progress removal is NOT completed: pinned Arcade SDK 12.0.0-beta.26556.2 at bd945b47c51da25b17dde4e8e0f8066ad001d05f unconditionally injects it and exposes no flag-omission property. The stock runner/alias remain until an upstream migration flows; no runner fork/argument-stripping workaround was shipped. SDK-owned --no-ansi remains only where the native SDK consumes it; its actual newly packed-module execution passed.

Contract-specific stable package boundaries were checked through the intervening patch releases: Retry 2.2.1/2.2.2/2.2.3 still call the parameterless wait; Retry 2.3.0 uses the token wait and current orchestrator. Telemetry/TRX/abstractions/VSTestBridge 2.0.0/2.0.1/2.0.2 legacy assets bind the retired platform polyfills; 2.1.0 does not. These are dependency boundaries, not blanket runtime promises for every later old package.

When combined with #12312, preserve that change's runtime-proven mixed pins: current matching CrashDump/HangDump/Retry/Platform.MSBuild, TRX 2.3.0, HotReload/Telemetry 2.2.1 in the general fixture, and this work's enabled-net462 telemetry 2.1.0 canary. Final local composed-source execution passed at the unpushed coordinator revision below; it does not change the published PR heads or claim CI. Each same-version package variant must use its own effective restore cache and loaded DLL hashes must match its own nupkg bytes; do not clear shared caches.

Final delivery state

All three focused implementation PRs are published with executed local evidence and verified immutable heads. They are intentionally independent, not a stack, and remain open for review. The only named removal not implemented is MTP --no-progress, whose concrete pinned-Arcade prerequisite remains above; the alias is retained rather than shipping a known-broken orchestration change. The coordinator's local combined-source/package gate passed at the unpushed revision below. Published-head CI remains separate and is not represented as passed here. No merge or Agent merge was requested or enabled.

Local composed validation (2026-11-10)

The coordinator executed the combined #12312 and final #12317 / #12319 / #12316 changes at local, UNPUSHED source 378fed8629f8db16c5ed1b0d50d4bd6b771c8a27. This is a separate composed checkout, not a change to any published PR head, not a pushed integration branch, and not CI evidence. The unpublished source is intentionally recorded as plain text, not a GitHub blob link.

& .\eng\build.ps1 -restore -build -pack -binaryLog -nodeReuse:$false /m:2 /p:UseSharedCompilation=false /p:EnableCodeCoverage=false /bl:artifacts\log\Debug\cleanup-composed-pack.binlog

Executed: exit 0, zero warnings/errors, default UAP assets and NuGet guards intact. Composed units passed 2,463/2,463 across three TFMs, zero failed/skipped, including all 28 retired-contract cases. Independent source/discovery-to-fresh-TRX gates passed MTP 26/26 and MSTest 8/8, zero skipped; configured JUnit/CTRF totals reconciled 2,497 outer cases. The consuming selections include enabled Telemetry 2.1.0/net462, final mixed extension pins, six exporter cases, ANSI rejection/literal native dump, current source generation, and real cancellation. Separately, the real pinned native SDK executed exactly Test1: 1 passed, 0 failed/skipped, with its SDK-owned --no-ansi and no ANSI escapes.

Coordinator provenance checks bound 13 current nupkgs to source, verified 12 current cache archives and 76 current package references in 17 retained assets, and matched 33 physical consumer core DLLs to packed payloads. Localization checks passed 41 self-tests / 364 catalogs; pool checks passed 34; 116 C# BOMs and protected surfaces were verified. The coordinator archived 322 consumer-evidence files and removed 11 exact owned temporary directories; no matching private compiler/consumer process remained.

Still not removed: MTP --no-progress, blocked by the documented pinned-Arcade producer. Published-head CI and downstream dashboard/non-Windows validation remain separate; this local composition result does not claim them complete. Existing per-PR counterfactual evidence above is unchanged.

Lingua principale
C#
Stelle
1.1k
Fork
314
Merge medio
11h 9m
PR unite (30g)
340

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/testfx

Tutte le issue di microsoft/testfx

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.