Git Product home page Git Product logo

Comments (5)

MikeMcC399 avatar MikeMcC399 commented on September 7, 2024 1

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.

MikeMcC399 avatar MikeMcC399 commented on September 7, 2024 1

This issue is still happening.

See https://github.com/cypress-io/github-action/actions/runs/9186993814/job/25263739457

from github-action.

MikeMcC399 avatar MikeMcC399 commented on September 7, 2024 1

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.

MikeMcC399 avatar MikeMcC399 commented on September 7, 2024
  • See PR #1180 for possible resolution

from github-action.

MikeMcC399 avatar MikeMcC399 commented on September 7, 2024
  • PR #1188 submitted to resolve this issue by removing pnpm store caching

from github-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.