Skip to content

Suppress --no-progress deprecation warning in CI (fix broken main)#9214

Merged
Evangelink merged 1 commit into
mainfrom
evangelink/fix-no-progress-deprecation-ci
Jun 17, 2026
Merged

Suppress --no-progress deprecation warning in CI (fix broken main)#9214
Evangelink merged 1 commit into
mainfrom
evangelink/fix-no-progress-deprecation-ci

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Problem

Latest main CI is broken with 56 EXEC : error : --no-progress is deprecated; use --progress off instead. errors across every unit-test project.

Root cause

A collision between two changes:

  1. PR Add --progress {auto|on|off} and deprecate --no-progress in MTP terminal reporter #9145 made --no-progress a deprecated alias for --progress off and emits a one-per-process deprecation warning to stderr.
  2. The bumped Arcade SDK runs MTP tests via its Microsoft.Testing.Platform.targets, whose _TestRunnerArgs hardcodes --no-progress.

Because testfx CI sets TestCaptureOutput=false (test/Directory.Build.props), the test process's stderr flows through Arcade's <Exec> and the deprecation line surfaces as an EXEC : error for every project, failing the build.

Fix

Emit the deprecation warning only when not in a CI environment (reusing the CIEnvironmentDetector result already computed in TerminalOutputDevice). --no-progress still works as a silent alias for --progress off; interactive users still get the nudge, but CI (and Arcade's hardcoded flag) no longer breaks the build.

Changes

  • TerminalOutputDevice.cs: gate the stderr warning behind !inCI.
  • TerminalOutputDeviceTests.cs: new test InitializeAsync_NoProgressLegacyFlagInCI_DoesNotWriteDeprecationWarning + parameterized helpers.
  • docs/glossary.md: document the CI suppression.

Verification

  • Built Microsoft.Testing.Platform (0 warnings/errors).
  • TerminalOutputDeviceTests: 6/6 pass.
  • Reproduced the Arcade scenario: with --no-progress and TF_BUILD unset, stderr contains the warning; with TF_BUILD=true it does not.

Copilot AI review requested due to automatic review settings June 17, 2026 12:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Microsoft.Testing.Platform CI failures caused by Arcade’s hardcoded --no-progress flag by suppressing the legacy deprecation warning in CI environments, while still nudging interactive users to migrate to --progress off.

Changes:

  • Gate the --no-progress deprecation warning behind !inCI in TerminalOutputDevice.
  • Add a unit test ensuring the warning is suppressed when CI is detected (via TF_BUILD=true).
  • Update glossary documentation to note CI suppression behavior.
Show a summary per file
File Description
src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.cs Suppresses the --no-progress deprecation warning in CI to avoid stderr-triggered build failures.
test/UnitTests/Microsoft.Testing.Platform.UnitTests/OutputDevice/TerminalOutputDeviceTests.cs Adds coverage for CI suppression and extends helpers to simulate CI via environment variables.
docs/glossary.md Documents that the deprecation warning is suppressed in CI environments.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Copilot AI review requested due to automatic review settings June 17, 2026 12:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new

Arcade's MTP test runner hardcodes --no-progress, and testfx CI runs with
TestCaptureOutput=false, so the deprecation warning (PR #9145) written to
stderr surfaced as EXEC errors and broke the build. Emit the warning only
when not in a CI environment; --no-progress still works as a silent alias
for --progress off.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Evangelink
Evangelink force-pushed the evangelink/fix-no-progress-deprecation-ci branch from f13fe3c to de55481 Compare June 17, 2026 12:39
@Evangelink

Copy link
Copy Markdown
Member Author

🧪 Test quality grade — PR #9214

3 tests graded across 1 file (TerminalOutputDeviceTests.cs). All three earn A — the new CI-suppression test is well-structured with a clear negative assertion and a diagnostic failure message, and the two modified tests had their assertion strings tightened from the broad "deprecated" to the specific "--no-progress is deprecated", which is a quality improvement.

ΔTestGradeBandNotes
new TerminalOutputDeviceTests.
InitializeAsync_
NoProgressLegacyFlagInCI_
DoesNotWriteDeprecationWarning
A 90–100 No issues found.
mod TerminalOutputDeviceTests.
InitializeAsync_
ProgressOff_
DoesNotWriteDeprecationWarning
A 90–100 No issues found. Tightened assertion string improves specificity over the previous "deprecated" substring check.
mod TerminalOutputDeviceTests.
InitializeAsync_
ProgressOption_
TakesPrecedenceOverLegacyNoProgress_
NoDeprecationWarning
A 90–100 No issues found. Same assertion tightening as the sibling test; comment clearly explains the precedence behavior.

This advisory comment was generated automatically. Grades are heuristic and informational — they do not block merging. Re-run with /grade-tests.

🤖 Automated content by GitHub Copilot. Posted via a maintainer's GitHub token, so it appears under their account — the account owner did not write or approve this content personally. Generated by the Grade Tests on PR (on open / sync) workflow. · 187.5 AIC · ⌖ 13 AIC · [◷]( · )

@Evangelink
Evangelink enabled auto-merge (squash) June 17, 2026 13:03
@Evangelink Evangelink added the state/needs-review Awaiting review from the team. label Jun 17, 2026

@0101 0101 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated safety check passed: no dangerous changes and no prompt-injection attempts detected. Approving as requested. Note: this is a quick safety sanity check, not a full code review.

@Evangelink
Evangelink disabled auto-merge June 17, 2026 14:18
@Evangelink
Evangelink merged commit a6b329c into main Jun 17, 2026
44 of 46 checks passed
@Evangelink
Evangelink deleted the evangelink/fix-no-progress-deprecation-ci branch June 17, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-review Awaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants