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

tests(docs): clear problematic cache #13941

Merged
merged 1 commit into from
May 3, 2022
Merged

Conversation

connorjclark
Copy link
Collaborator

@connorjclark connorjclark commented Apr 28, 2022

We noticed yarn test-docs was using old builds of lighthouse, which could only be resolved by running yarn cache clear. This PR avoids the problem by not using the global cache folder, instead this test now uses a throwaway folder. also deletes the lock files.

something about using a .tgz file as a dependency is caching in an unexpected way 🤷 (just clearing the lock files didn't fix the problem)

@connorjclark connorjclark requested a review from a team as a code owner April 28, 2022 18:32
@connorjclark connorjclark requested review from adamraine and removed request for a team April 28, 2022 18:32
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"install-all": "yarn --cwd auth/ && yarn --cwd integration-test/ && yarn --cwd custom-gatherer-puppeteer/",
"install-all": "rm -rf /tmp/.junk && rm -f {auth,custom-gatherer-puppeteer,integration-test}/yarn.lock && yarn --cwd auth/ --cache-folder /tmp/.junk && yarn --cwd integration-test/ --cache-folder /tmp/.junk && yarn --cwd custom-gatherer-puppeteer/ --cache-folder /tmp/.junk",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind checking if using npm for the docs stuff works as expected instead? Feels like yarn isn't bringing anything to the relationship in this directory

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, at this point I can't recreate the old behavior as it was 1) yarn's cache and 2) I cleared my cache. So we wouldn't be able to detect if this is also an issue in npm.

@adamraine
Copy link
Member

something about using a .tgz file as a dependency is caching in an unexpected way

What are the odds they're using "../../../lighthouse.tgz" as the cache key?

@connorjclark
Copy link
Collaborator Author

connorjclark commented Apr 28, 2022

That is certainly what is happening. I'd consider it a bug, local package zips like that should at least use the mtime or even md5 hash (or just never cache). I'm not motivated to file an issue though... likely it'd be closed as "fixed in yarn 2" lol

@connorjclark connorjclark merged commit 990a57a into master May 3, 2022
@connorjclark connorjclark deleted the test-docs-improve branch May 3, 2022 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants