Suppress --no-progress deprecation warning in CI (fix broken main)#9214
Conversation
There was a problem hiding this comment.
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-progressdeprecation warning behind!inCIinTerminalOutputDevice. - 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
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>
f13fe3c to
de55481
Compare
🧪 Test quality grade — PR #92143 tests graded across 1 file (
This advisory comment was generated automatically. Grades are heuristic and informational — they do not block merging. Re-run with
|
0101
left a comment
There was a problem hiding this comment.
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.
Problem
Latest
mainCI is broken with 56EXEC : error : --no-progress is deprecated; use --progress off instead.errors across every unit-test project.Root cause
A collision between two changes:
--no-progressa deprecated alias for--progress offand emits a one-per-process deprecation warning to stderr.Microsoft.Testing.Platform.targets, whose_TestRunnerArgshardcodes--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 anEXEC : errorfor every project, failing the build.Fix
Emit the deprecation warning only when not in a CI environment (reusing the
CIEnvironmentDetectorresult already computed inTerminalOutputDevice).--no-progressstill 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 testInitializeAsync_NoProgressLegacyFlagInCI_DoesNotWriteDeprecationWarning+ parameterized helpers.docs/glossary.md: document the CI suppression.Verification
Microsoft.Testing.Platform(0 warnings/errors).TerminalOutputDeviceTests: 6/6 pass.--no-progressandTF_BUILDunset, stderr contains the warning; withTF_BUILD=trueit does not.