Repository navigation
Keep long terminal JSON output valid - #258
Merged
Merged
Conversation
The interactive JSON renderer wraps at the console width, so on narrow build agents the long temp-file path was split inside a JSON string and the test failed to parse the output.
Mike Krüger (mkrueger)
requested review from
a team
and
a balanced review from Copilot
October 26, 2026 15:34
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The isolated test-only change follows established patterns, preserves console cleanup, and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Stabilizes the import dry-run output test by removing its dependence on the build agent’s console width.
Changes:
- Pins the captured console width to 200 to prevent wrapping inside JSON strings, matching existing console-capture tests.
| File | Description |
|---|---|
| CosmosDBShell.Tests/CommandTests/ImportCommandTests.cs | Sets a fixed console width for dry-run output validation. |
Review effort: Balanced
Mike Krüger (mkrueger)
enabled auto-merge (squash)
October 26, 2026 15:58
Vsevolod Kukol (sevoku)
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the Azure pipeline failure and preserve valid terminal JSON output on narrow consoles.
The normal CI failure was caused by long JSON strings being wrapped by the Spectre.Console renderer at the agent's console width. The resulting inserted carriage return made the test's JSON output invalid. For JSON lines that exceed the console width, the shell now writes the already-formatted JSON directly to stdout instead of routing it through the renderer that inserts line breaks. Short output remains syntax-highlighted.
The import dry-run output test uses a stable console width, and a new regression renders a 100-character string at 40 columns and parses the resulting stdout as JSON.
Validation: the full test suite passes locally (4886 passed, 0 failed, 131 skipped).