Skip to content

Put build artifact tracking in integrity file - #3224

Merged
bestander merged 3 commits into
masterfrom
artifacts-integrity
Apr 22, 2017
Merged

bestander merged 3 commits into
masterfrom
artifacts-integrity

Conversation

@sebmck

@sebmck sebmck commented Apr 21, 2017 •

Copy link
Copy Markdown
Contributor

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.

@bestander bestander left a comment

Copy link
Copy Markdown
Member

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.

return true;
}

const {artifacts} = match;

Copy link
Copy Markdown
Member

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.

Comment thread src/integrity-checker.js
integrityFileMissing: false,
integrityMatches,
missingPatterns,
artifacts: expected ? expected.artifacts : null,

Copy link
Copy Markdown
Member

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.

@bestander
bestander merged commit bb927d0 into master Apr 22, 2017
@bestander

bestander commented Apr 22, 2017 •

Copy link
Copy Markdown
Member

Let's merge it now, I'll be refactoring integrity-checker next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installing node-sass and rebuilding/using it results in module not found

2 participants