Skip to content

Made the bad lines exception print out the bad lines#180909

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
gaaclarke:performance-test-bad-lines
Jan 14, 2026
Merged

Made the bad lines exception print out the bad lines#180909
auto-submit[bot] merged 3 commits into
flutter:masterfrom
gaaclarke:performance-test-bad-lines

Conversation

@gaaclarke

Copy link
Copy Markdown
Member

issues: #180903

adds better logging for debugging "bad line" failures

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@gaaclarke gaaclarke requested a review from jtmcdole January 13, 2026 17:23

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request improves the debugging experience for 'bad line' failures in flutter_test_performance.dart by including the actual problematic lines in the exception message instead of just a count. The implementation is sound. I have one suggestion to further improve the readability of the error output.

Comment on lines +106 to +107
const seperator = '\n ';
throw Exception('flutter test rendered unexpected output ${badLines.join(seperator)}');

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.

medium

For better readability of the exception message, it's helpful to start the list of bad lines on a new line and ensure all of them are indented consistently. This makes the output cleaner and easier to parse visually.

Additionally, there's a typo in the variable name seperator; it should be separator.

Here's a more concise way to achieve this that addresses both points:

Suggested change
const seperator = '\n ';
throw Exception('flutter test rendered unexpected output ${badLines.join(seperator)}');
throw Exception('flutter test rendered unexpected output:\n ${badLines.join('\n ')}');

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.

I like this one too

@jtmcdole jtmcdole 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.

nits - but prefixed by "thankyou!"

final Match? match = testOutputPattern.matchAsPrefix(entry);
if (match == null) {
badLines += 1;
badLines.add(entry);

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.

'badline(no match): $entry'

step = TestStep.testPassed;
} else {
badLines += 1;
badLines.add(entry);

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.

'badline(fallthrough): $entry'

) {
print('test stderr: $entry');
badLines += 1;
badLines.add(entry);

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.

badline(stderr): $entry

Comment on lines +106 to +107
const seperator = '\n ';
throw Exception('flutter test rendered unexpected output ${badLines.join(seperator)}');

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.

I like this one too

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 13, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 13, 2026
@auto-submit

auto-submit Bot commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/180909, because - The status or check suite Linux analyze has failed. Please fix the issues identified (or deflake) before re-applying this label.

if (badLines.isNotEmpty) {
const seperator = '\n ';
throw Exception('flutter test rendered unexpected output ${badLines.join(seperator)}');
throw Exception('flutter test rendered unexpected output:$seperator${badLines.join(seperator)}');

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.

I think it's complaining about this line.

    throw Exception(
      'flutter test rendered unexpected output:$seperator${badLines.join(seperator)}',
    );

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ugh format

@jtmcdole

Copy link
Copy Markdown
Member

(still lgtm from me)

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 13, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 14, 2026
@auto-submit

auto-submit Bot commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/180909, because - The status or check suite Windows tool_integration_tests_8_9 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@jtmcdole jtmcdole added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 14, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Jan 14, 2026
Merged via the queue into flutter:master with commit 9aea438 Jan 14, 2026
151 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 17, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 17, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 17, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 18, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 18, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 19, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 19, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 19, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 20, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 20, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 20, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 20, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 20, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 21, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 21, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 21, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 22, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 22, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 22, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 23, 2026
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