Repository navigation
Commit 16dca7a
authored
fix(firehose): keep dart_apitool crash details in logs and sanitize breaking table row (#461)
When `dart_apitool` fails to produce `report.json` (for example, when analyzing packages that use Dart 3.13 shorthand factory constructors under `analyzer 10.2.0`), `Health.breakingChangeCheck` previously interpolated the entire raw `stderr` output (including multi-line `ExecutableDeclaration.toString()` dumps and stack traces) directly into `BreakingChange.explanation` alongside `neededVersion: Version(0, 0, 0)`. Because `BreakingChange.toMarkdownRow()` did not sanitize newlines or pipe characters, the multi-line stack trace shattered the PR Health comment's Markdown table.
- Keep full `stderr` diagnostics in the GitHub Actions workflow logs (via `runDashProcess` and `log(...)`).
- Set `neededVersion: null`, preserve `package.version` for `newVersion`, and emit a concise single-line message (`Unable to calculate breaking changes (see workflow logs for details).`) in the PR comment table when `report.json` is not created.
- Sanitize newlines (`\r?\n`) and pipe characters (`|`) in `BreakingChange.toMarkdownRow()` so multi-line explanations can never break the Markdown table structure.
- Add unit test coverage for `BreakingChange.toMarkdownRow()`.
Fixes #460
Related: bmw-tech/dart_apitool#2661 parent 1bdafd8 commit 16dca7a
3 files changed
Lines changed: 34 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
337 | | - | |
| 336 | + | |
| 337 | + | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
| 340 | + | |
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| |||
797 | 798 | | |
798 | 799 | | |
799 | 800 | | |
800 | | - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
801 | 807 | | |
802 | 808 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
118 | 139 | | |
119 | 140 | | |
120 | 141 | | |
| |||
0 commit comments