Skip to content
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

misc: suppress more GPU related warnings #30861

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ _Released 1/7/2024 (PENDING)_
- The `cy.origin()` command must now be used when navigating between subdomains. Because this is a fairly disruptive change for users who frequently navigate between subdomains, a new configuration option is being introduced. `injectDocumentDomain` can be set to `true` in order to re-enable the injection of `document.domain` by Cypress. This configuration option is marked as deprecated and you will receive a warning when Cypress is launched with this option set to `true`. It will be removed in Cypress 15. Addressed in [#30770](https://github.com/cypress-io/cypress/pull/30770). Addresses [#25806](https://github.com/cypress-io/cypress/issues/25806), [#25987](https://github.com/cypress-io/cypress/issues/25987), [#27528](https://github.com/cypress-io/cypress/issues/27528), [#29445](https://github.com/cypress-io/cypress/issues/29445), [#29590](https://github.com/cypress-io/cypress/issues/29590) and [#30571](https://github.com/cypress-io/cypress/issues/30571).
- It is no longer possible to make a `fetch` or `XMLHttpRequest` request from the `about:blank` page in Electron (i.e. `cy.window().then((win) => win.fetch('<some-url>'))`). You must use `cy.request` instead or perform some form of initial navigation via `cy.visit()`. Addressed in [#29547](https://github.com/cypress-io/cypress/pull/30394).
- The `experimentalJustInTimeCompile` configuration option for component testing has been replaced with a `justInTimeCompile` option that is `true` by default. This option will only compile resources directly related to your spec, compiling them 'just-in-time' before spec execution. This should result in improved memory management and performance for component tests in `cypress open` and `cypress run` modes, in particular for large component testing suites. `justInTimeCompile` is now only supported for [`webpack`](https://www.npmjs.com/package/webpack). Addresses [#30234](https://github.com/cypress-io/cypress/issues/30234). Addressed in [#30402](https://github.com/cypress-io/cypress/pull/30402).
- Cypress Component Testing no longer supports:
- Cypress Component Testing no longer supports:
- `create-react-app`. Addresses [#30028](https://github.com/cypress-io/cypress/issues/30028).
- `@vue/cli-service`. Addresses [#30481](https://github.com/cypress-io/cypress/issues/30481).
- `Angular` versions 13, 14, 15, and 16. The minimum supported version is now `17.2.0` in order to fully support Angular [signals](https://angular.dev/guide/signals). Addresses [#29582](https://github.com/cypress-io/cypress/issues/29582). Addressed in [#30539](https://github.com/cypress-io/cypress/pull/30539).
Expand Down Expand Up @@ -60,6 +60,13 @@ in this [GitHub issue](https://github.com/cypress-io/cypress/issues/30447). Addr

- Removed some component testing API stubs that were removed in [Cypress v11.0.0](https://docs.cypress.io/app/references/migration-guide#Component-Testing-Updates). Addressed in [#30696](https://github.com/cypress-io/cypress/pull/30696). Addresses [#30623](https://github.com/cypress-io/cypress/issues/30623).
- Updated to use Cypress design system browser icons. Addressed in [#30790](https://github.com/cypress-io/cypress/pull/30790).
- Fixed an issue where benign Mesa/GLX related warnings were being shown in the terminal output when running Cypress in certain Linux environments or containers. The following warnings are now suppressed:
- `error: XDG_RUNTIME_DIR is invalid or not set in the environment.`
- `MESA: error: ZINK: failed to choose pdev`
- `glx: failed to create drisw screen`

Addresses [#29521](https://github.com/cypress-io/cypress/issues/29521) and [#29554](https://github.com/cypress-io/cypress/issues/29554).


**Dependency Updates:**

Expand Down
28 changes: 27 additions & 1 deletion cli/lib/exec/spawn.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,33 @@ const isDebugScenario4 = /^\[[^\]]+debug_utils\.cc[^\]]+\] Hit debug scenario: 4
*/
const isEGLDriverMessage = /^\[[^\]]+gl_display\.cc[^\]]+\] EGL Driver message \(Error\) eglQueryDeviceAttribEXT: Bad attribute\./

const GARBAGE_WARNINGS = [isXlibOrLibudevRe, isHighSierraWarningRe, isRenderWorkerRe, isDbusWarning, isCertVerifyProcBuiltin, isHostVulkanDriverWarning, isContainerVulkanDriverWarning, isContainerVulkanStack, isDebugScenario4, isEGLDriverMessage]
/**
* Mesa/GLX related warnings that occur in certain Linux environments without proper GPU support
* or when running in containers. These are benign warnings that don't affect functionality.
* Samples:
* error: XDG_RUNTIME_DIR is invalid or not set in the environment.
* MESA: error: ZINK: failed to choose pdev
* glx: failed to create drisw screen
*/
const isXdgRuntimeError = /^error: XDG_RUNTIME_DIR is invalid or not set/
const isMesaZinkError = /^MESA: error: ZINK: failed to choose pdev/
const isGlxDriverError = /^glx: failed to create drisw screen/

const GARBAGE_WARNINGS = [
isXlibOrLibudevRe,
isHighSierraWarningRe,
isRenderWorkerRe,
isDbusWarning,
isCertVerifyProcBuiltin,
isHostVulkanDriverWarning,
isContainerVulkanDriverWarning,
isContainerVulkanStack,
isDebugScenario4,
isEGLDriverMessage,
isXdgRuntimeError,
isMesaZinkError,
isGlxDriverError,
]

const isGarbageLineWarning = (str) => {
return _.some(GARBAGE_WARNINGS, (re) => {
Expand Down
14 changes: 13 additions & 1 deletion cli/test/lib/exec/spawn_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('lib/exec/spawn', function () {
at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)

[78887:1023/114920.074882:ERROR:debug_utils.cc(14)] Hit debug scenario: 4

[18489:0822/130231.159571:ERROR:gl_display.cc(497)] EGL Driver message (Error) eglQueryDeviceAttribEXT: Bad attribute.
Expand All @@ -112,6 +112,18 @@ describe('lib/exec/spawn', function () {
expect(spawn.isGarbageLineWarning(line), `expected line to be garbage: ${line}`).to.be.true
})
})

it('returns true for XDG runtime dir warnings', () => {
expect(spawn.isGarbageLineWarning('error: XDG_RUNTIME_DIR is invalid or not set')).to.be.true
})

it('returns true for MESA ZINK errors', () => {
expect(spawn.isGarbageLineWarning('MESA: error: ZINK: failed to choose pdev')).to.be.true
})

it('returns true for GLX driver errors', () => {
expect(spawn.isGarbageLineWarning('glx: failed to create drisw screen')).to.be.true
})
})

context('.start', function () {
Expand Down
Loading