Skip to content

Merge main into telemetry PR and resolve review findings in telemetry collector/executor#8186

Closed
Copilot wants to merge 1 commit into
mainfrom
copilot/merge-main-fix-conflicts
Closed

Merge main into telemetry PR and resolve review findings in telemetry collector/executor#8186
Copilot wants to merge 1 commit into
mainfrom
copilot/merge-main-fix-conflicts

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

Bug Fix

This updates PR #7570 by rebasing it onto current main, resolving merge conflicts, and addressing outstanding telemetry-related review findings. The intent is to keep telemetry collection correct, bounded, and deterministic after the merge.

What was the bug?

After syncing with main, the branch had merge conflicts plus unresolved review issues in telemetry paths:

  • method attribute telemetry could include non-MSTest attributes,
  • serialized telemetry payload ordering was nondeterministic,
  • telemetry cleanup could be skipped on early executor exits,
  • post-merge compile mismatches existed in telemetry acceptance tests.

How did you fix it?

  • Merge + conflict integration

    • Merged latest main into the PR branch and resolved conflicts in:
      • MSTestSettings*
      • Assert.AreEqual*
      • CollectionAssert*
    • Re-applied telemetry configuration-source wiring in the split settings implementation (MSTestSettings.Configuration.cs).
  • Telemetry data correctness/hygiene

    • Restricted method-level attribute counting to known MSTest attributes (unknown attributes are ignored instead of emitted as raw names).
    • Kept custom TestMethodAttribute / TestClassAttribute subclass tracking anonymized.
  • Deterministic telemetry payloads

    • Made telemetry JSON serialization stable by sorting:
      • set values (Order(StringComparer.Ordinal))
      • dictionary keys (OrderBy(..., StringComparer.Ordinal))
  • Executor lifecycle cleanup

    • Ensured telemetry send/reset runs for all exit paths by wrapping discovery initialization and execution in try/finally for both RunTestsAsync overloads in MSTestExecutor.
  • Post-merge compile alignment

    • Updated telemetry acceptance tests to use ExitCode.Success (consistent with current shared helper API).
    • Fixed nullable assignment in telemetry collector (string? trackingName).

Example

string? trackingName = attribute switch
{
    TestMethodAttribute => nameof(TestMethodAttribute),
    TestClassAttribute => nameof(TestClassAttribute),
    DataRowAttribute => nameof(DataRowAttribute),
    // ...
    _ => null,
};

if (trackingName is not null)
{
    _attributeCounts[trackingName] = _attributeCounts.TryGetValue(trackingName, out long count)
        ? count + 1
        : 1;
}

Testing

  • Verified repository build using the project build entrypoint for this environment (build.sh, equivalent build pipeline to Build.cmd).
Original prompt

Checkout branch from PR #7570, merge main and fix conflicts.

Then address all review comments.

Finally make sure the repo builds without issue (use build.cmd)

The user has attached the following file paths as relevant context:

  • .github\copilot-instructions.md

Created from VS Code.

Copilot AI self-assigned this May 13, 2026
Copilot AI review requested due to automatic review settings May 13, 2026 16:00
Copilot AI review requested due to automatic review settings May 13, 2026 16:00
Copilot AI changed the title [WIP] Merge main and resolve conflicts from PR #7570 Merge main into telemetry PR and resolve review findings in telemetry collector/executor May 13, 2026
Copilot AI requested a review from Evangelink May 13, 2026 16:15
@Evangelink
Copy link
Copy Markdown
Member

@copilot Handle open review comments (reply to them when handled)

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 13, 2026

@copilot Handle open review comments (reply to them when handled)

I checked this PR for open review threads/comments to address, and there are currently no open review comments pending on the branch changes. If you had specific comments in mind, please link them and I’ll handle them right away.

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