aspect-build / aspect-build/rules_cypress
[Bug]: When running `cypress_module_test` on linux, cypress tries writing to read-only file
- Dominant language
- Starlark
- Stars
- 12
- Forks
- 15
- Avg merge
- 41m
- Merged PRs (30d)
- 11
Description
### What happened?
With a runner for `cypress_module_test` that catches cypress.run exception (see #45), it will fail with error
```
Error: EROFS: read-only file system, open '/home/ubuntu/.cache/bazel/_bazel_ubuntu/3c3b515e9016ce6d22b6ff24560854f0/execroot/aspect_rules_cypress/bazel-out/k8-fastbuild/bin/external/cypress_linux-x64/binary_state.json'
```
### Version
Development (host) and target OS/architectures:
Output of `bazel --version`: 6.3.0 & aspect 5.2.1
Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file: v0.3.0
Language(s) and/or frameworks involved:
rules_cypress
### How to reproduce
```shell
* Check out branch from #45 on linux computer (only tested on Ubuntu)
* run bazel test //cypress/tests/module_test:module_test
* observer test failure
```
### Any other information?
Full error from test
```
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //cypress/tests/module_test:module_test
-----------------------------------------------------------------------------
Note: You have set the environment variable:
CYPRESS_RUN_BINARY=../../../../cypress_linux-x64/Cypress/Cypress
This overrides the default Cypress binary path used.
It looks like this is your first time using Cypress: 12.3.0
[STARTED] Task without title.
[FAILED] EROFS: read-only file system, open '/home/ubuntu/.cache/bazel/_bazel_ubuntu/3c3b515e9016ce6d22b6ff24560854f0/execroot/aspect_rules_cypress/bazel-out/k8-fastbuild/bin/external/cypress_linux-x64/binary_state.json'
Cypress encountered unexpected exception. Exiting. Error: An unexpected error occurred while verifying the Cypress executable.
Please search Cypress documentation for possible solutions:
https://on.cypress.io
Check if there is a GitHub issue describing this crash:
https://github.com/cypress-io/cypress/issues
Consider opening a new issue.
----------
Error: EROFS: read-only file system, open '/home/ubuntu/.cache/bazel/_bazel_ubuntu/3c3b515e9016ce6d22b6ff24560854f0/execroot/aspect_rules_cypress/bazel-out/k8-fastbuild/bin/external/cypress_linux-x64/binary_state.json'
----------
Platform: linux-x64 (Ubuntu - 22.04)
Cypress Version: 12.3.0
at /home/ubuntu/.cache/bazel/_bazel_ubuntu/3c3b515e9016ce6d22b6ff24560854f0/execroot/aspect_rules_cypress/bazel-out/k8-fastbuild/bin/cypress/tests/node_modules/.aspect_rules_js/cypress@12.3.0/node_modules/cypress/lib/errors.js:328:17 {
known: true
}
```
Contributor guide
Research direction
Start with the cypress_module_test target and reproduce the failure using `bazel test //cypress/tests/module_test:module_test` on Linux, following the branch from #45. Trace how Cypress is launched and where it attempts to create `binary_state.json`; done means the test no longer fails with an EROFS error on the read-only Bazel output path.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100