-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Put build artifact tracking in integrity file #3224
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reluctantly approve.
This fixes a bug which is a higher pri but integrity-checker needs some refactoring love.
I am eager to give it a look next week because I was planning to move integrity check to earlier before install starts.
@@ -329,6 +329,12 @@ export class Install { | |||
return true; | |||
} | |||
|
|||
const {artifacts} = match; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it the right place?
bailout() function is overridden in add.js.
In the next couple of weeks I'd like to do integrity check earlier in install phase.
@@ -247,6 +251,7 @@ export default class InstallationIntegrityChecker { | |||
integrityFileMissing: false, | |||
integrityMatches, | |||
missingPatterns, | |||
artifacts: expected ? expected.artifacts : null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning artifacts from check seems to break cohesion of the check function.
Makes sense from performance point of view because we already parse integrity file here but I would rather have a separate function that returns integrity file.
Side note: my fault that check command has side effects (reporter logs), I plan to refactor it.
Let's merge it now, I'll be refactoring integrity-checker next week |
Summary
This moves build artifact tracking away from the cache metadata and into the integrity file.
I suspect this should fix #1981 as the cause seems to be that they restore
node_modules
and not Yarn's internal cache.Test plan
Existing tests.