-
Notifications
You must be signed in to change notification settings - Fork 347
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
Sporadic cypress binary cache failure of example-basic-pnpm workflow on Ubuntu #1179
Comments
|
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. |
This issue is still happening. See https://github.com/cypress-io/github-action/actions/runs/9186993814/job/25263739457 |
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 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. |
|
Issue
The workflow .github/workflows/example-basic-pnpm.yml fails sporadically. See the following action logs:
When the workflow fails, the log section "Cypress tests" shows:
and the failures are on one of the jobs:
basic-pnpm-ubuntu-20
basic-pnpm-ubuntu-22
It is not possible to analyze earlier failures, since the corresponding logs have been automatically purged by GitHub settings.
The text was updated successfully, but these errors were encountered: