Comments (5)
The cache race condition which led to this issue is resolved in #1180. If however the cache of the Cypress binary cache and the cache of the pnpm store cache are out of sync, the workflow does not recover automatically. It is necessary in this situation to manually delete the cache of the pnpm store cache and re-run the workflow.
I'll leave this issue open for the moment and monitor if there are additional failures.
from github-action.
This issue is still happening.
See https://github.com/cypress-io/github-action/actions/runs/9186993814/job/25263739457
from github-action.
Using the failed workflow https://github.com/cypress-io/github-action/actions/runs/9186993814/job/25263739457 as an example ...
The problem occurs when the pnpm store is cached in Linux-pnpm-store-*
and the pnpm store contains a copy of the correct version of Cypress, whereas at the same time the cypress-linux-x64-*
is missing the corresponding cache Cypress binary.
There is no simple solution to coordinating these two caches. Manual caching of the pnpm store cache in the example workflows uses the GitHub JavaScript action actions/cache. The Cypress GitHub action uses the npm module @actions/cache to cache the Cypress binary cache.
When there are parallel jobs running there is no guarantee that a cache can be saved if the jobs are using the same cache key. One job may block the other and lead to inconsistency.
Package managers, including pnpm, only run the postinstall script when Cypress is not installed. Cypress has no automatic fallback to attempt to (re-)install the Cypress binary if it is missing. If pnpm thinks that Cypress is installed, because it was found in the pnpm store cache, then it doesn't attempt to install the Cypress binary. When it comes time to verify Cypress, the verification fails because the Cypress binary cache wasn't populated.
The short-term mitigation is to remove the Linux store caching from the documentation and example workflows. The longer-term solution would be to implement #1044 to cache pnpm dependencies directly under the control of the Cypress GitHub action.
from github-action.
- See PR #1180 for possible resolution
from github-action.
- PR #1188 submitted to resolve this issue by removing pnpm store caching
from github-action.
Related Issues (20)
- Cypress binary randomly missing with pnpm HOT 13
- App frontend is not reachable, on random test runs HOT 5
- pnpm workspaces workflow shows "no status" HOT 2
- Add workspace support for pnpm HOT 10
- Save Test Results to File or Action Output HOT 6
- Add thread_ts as an optional parameter to use threads as part of the cypress cloud slack integration HOT 4
- Cypress run starts but does not run any tests HOT 9
- Cypress.env returns undefined [Github Actions] HOT 11
- Cypress fails to connect to devTools after first test HOT 13
- `project` not working HOT 5
- adding user 1001 throws EACCES permission issue HOT 17
- Cancel test run on Cypress cloud when action is cancelled HOT 1
- Cypress in Github Actions won't feed env variables to Oxygen server HOT 4
- Unable to run the cypress-io action when specifying a repo on the checkout HOT 2
- Geolocation error on final command of final test HOT 6
- Auto-Detect PR error on Workflow dispatch, resource not accessible HOT 4
- Receiving `Error: Cannot find module 'cypress'` error in GitHub actions HOT 8
- wait-on failing because of MaxRedirectsError HOT 5
- Unable to redirect to microsoft sso login page from app url when running cypress feature file using github action HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-action.