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

Allow disabling cache #953

Open
skjnldsv opened this issue Jun 29, 2023 · 6 comments
Open

Allow disabling cache #953

skjnldsv opened this issue Jun 29, 2023 · 6 comments
Labels
E2E type: feature feature request

Comments

@skjnldsv
Copy link

Hi,

Because of that issue: actions/cache#720, the cypress action step takes a very long time on self-hosted runners. The difference is so big that disabling the cache is faster.

Alternatively, you could consider migrating to the buildjet/cache action, or push forward for Github to fix actions/cache#720

Thanks :)

image

@MikeMcC399
Copy link
Collaborator

@skjnldsv

Could you please share some more information?

  • What is your GitHub self-hosted runner environment?
  • How long does cache retrieval take? What is your expectation for how long it should take?
  • What is your workflow?
  • Also a workflow log with debug enabled would be useful:
  env:
    DEBUG: '@cypress/github-action'

The CI examples here all run on GitHub-hosted runners, so we only have timings available for these standard runners.

@skjnldsv
Copy link
Author

skjnldsv commented Jun 29, 2023

Of course :)

What is your GitHub self-hosted runner environment?

We're on ubuntu-latest (22.04), using the same image as the official Github runners.

How long does cache retrieval take? What is your expectation for how long it should take?

Github: ~4 seconds
Self-hosted: ~70 seconds

What is your workflow?

Also a workflow log with debug enabled would be useful:


PS: if you want to know if a runner executed on our self hosted or github official, you can check the Setup job step output:

@MikeMcC399
Copy link
Collaborator

@skjnldsv
Thanks for the material!

This is a feature request, so the Cypress.io team would need to weigh in on the request to allow optional disabling of caching.

I read in the GitHub documentation Caching dependencies to speed up workflows:

"When using self-hosted runners, caches from workflow runs are stored on GitHub-owned cloud storage. A customer-owned storage solution is only available with GitHub Enterprise Server."

which probably contributes to generally longer run times for caching on self-hosted runners.

@skjnldsv
Copy link
Author

which probably contributes to generally longer run times for caching on self-hosted runners.

If you look at the article from https://buildjet.com/for-github-actions/blog/launch-buildjet-cache as well as the issue here actions/cache#720, you'll see this is more of an issue with azure than else.

But this is also not really your call. Thus me only asking for a way to disable the cache.
The issue should be fixed by Github, I agree with you :)

@nagash77 nagash77 added type: feature feature request E2E labels Jul 5, 2023
@skjnldsv
Copy link
Author

skjnldsv commented Mar 1, 2024

Any news @MikeMcC399 ?

@MikeMcC399
Copy link
Collaborator

@skjnldsv

There is no new status on your enhancement request.

As a flexible alternative to using the cypress-io/github-action JavaScript GitHub action you may like to consider basing your workflow(s) on one of the two examples listed in the cypress-io/cypress-example-kitchensink > README

In these up-to-date example workflows the caching is set up in the workflows themselves, so the caching could be removed / commented out or could be replaced by the buildjet/cache you suggested. The workflows run under GitHub Actions and run Cypress from the CLI instead of using the Cypress Module API. These workflows have no dependency on cypress-io/github-action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E type: feature feature request
Projects
None yet
Development

No branches or pull requests

3 participants