Repository navigation
[web] Filter non-fatal Chromium D-Bus error lines from Chrome stderr - #190669
Conversation
There was a problem hiding this comment.
Code Review
This pull request configures the DBUS_SESSION_BUS_ADDRESS environment variable to unix:path=/dev/null when launching Chromium on Linux if it is missing, empty, or set to /dev/null. Feedback on the changes suggests refactoring to avoid duplication: specifically, removing the redundant kChromeLinuxArgs constant in the tests in favor of kChromeArgs, and extracting the duplicated environment setup logic in chrome.dart into a shared private helper getter.
31a2b73 to
5a4c9b5
Compare
| /// We filter out these benign D-Bus lines to prevent stderr log noise in CI, | ||
| /// following the industry standard pattern used by open source projects to filter | ||
| /// E2E test logs (e.g. https://github.com/kitelev/exocortex/blob/4290cdade669034e5f71c892fb3e1908c5a2fe12/packages/obsidian-plugin/docker-entrypoint-e2e.sh#L48-L49). | ||
| bool _isDbusError(String line) { |
There was a problem hiding this comment.
SO MUCH identical code. Any reasonable place to allow sharing?
There was a problem hiding this comment.
I filed this issue some time ago: #176051. I agree this duplication isn't great.
|
autosubmit label was removed for flutter/flutter/190669, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Description
This PR updates the Chrome launcher environment setup in
flutter_tools,devicelab, andweb_ui(felt) on Linux.When running headless Chrome tests in a Linux container or VM without a desktop environment, Chromium attempts to connect to the D-Bus system daemon (for things like desktop notifications and system themes) and prints benign but annoying error logs to
stderrwhen it fails (e.g.ERROR:dbus/bus.cc,Failed to connect to the bus).This PR filters out these non-fatal D-Bus connection error messages emitted by Chromium. This follows the industry standard pattern used by other open source projects to filter out stderr noise in E2E tests (e.g., exocortex).