-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix: silence dbus errors in CI / Docker #32479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
cypress
|
Project |
cypress
|
Branch Review |
fix/silence-dbus-errors
|
Run status |
|
Run duration | 17m 52s |
Commit |
|
Committer | Cacie Prins |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
2
|
|
28
|
|
0
|
|
791
|
View all changes introduced in this branch ↗︎ |
UI Coverage
61.84%
|
|
---|---|
|
27
|
|
47
|
Accessibility
99.02%
|
|
---|---|
|
0 critical
3 serious
1 moderate
0 minor
|
|
19
|
@@ -143,6 +144,11 @@ const spawnModule = { | |||
args.unshift(process.env.CYPRESS_INTERNAL_DEV_DEBUG) | |||
} | |||
|
|||
if (ci.isCI) { | |||
debug('disabling dbus in CI') | |||
stdioOptions.env.DBUS_SESSION_BUS_ADDRESS = 'disabled:' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we had a different way to verify this in the current branch than just the snapshot value. We can also add a test once #32416 makes its way into develop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hold off on a merge here until #32416 , at which point I'll amend this pr with a test
If the fix only applies to CI, then it should not close #32290, since this also describes the garbage error occurring in Cypress Docker images, when used locally (not in CI). |
Additional details
With Cypress 15, we cleaned up how we filter data that gets streamed to
stderr
. Unfortunately, some of the previously filtered (benign) error messages slip through in certain situations. This is especially noticeable in Cypress' own CI, where we launch cypress from source rather than via the built binary.One of these classes of error messages relate to Electron trying to connect to dbus. Dbus is an IPC system typically used for desktop related operations, like the system tray, notifications, and so forth. CI environments do not typically have dbus, nor do they need it.
This PR prevents Electron from trying to connect to dbus by explicitly disabling it via an environment variable, when a CI environment is detected.
Steps to test
Verify that the driver e2e tests on this PR do not write dbus error messages to the console in CI.
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?