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

fix: Set YARN_CHECKSUM_BEHAVIOR=update when 'yarn up' is called #565

Merged

Conversation

symwell
Copy link
Contributor

@symwell symwell commented Dec 19, 2022

Attempt to fix the following type of error we often see in the logs

➤ YN0018: │ d3-path@npm:1.0.9: The remote archive doesn't match the expected checksum
➤ YN0018: │ d3-selection@npm:1.4.2: The remote archive doesn't match the expected checksum
➤ YN0018: │ crypto-js@npm:4.1.1: The remote archive doesn't match the expected checksum
➤ YN0018: │ d3-drag@npm:1.2.5: The remote archive doesn't match the expected checksum
➤ YN0018: │ d3-shape@npm:1.3.7: The remote archive doesn't match the expected checksum
➤ YN0018: │ d3-timer@npm:1.0.10: The remote archive doesn't match the expected checksum
➤ YN0018: │ d3-transition@npm:1.3.2: The remote archive doesn't match the expected checksum
➤ YN0018: │ d3-zoom@npm:1.8.3: The remote archive doesn't match the expected checksum
➤ YN0018: │ dashdash@npm:1.14.1: The remote archive doesn't match the expected checksum
➤ YN0018: │ data-urls@npm:2.0.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ debounce-fn@npm:4.0.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ debug@npm:4.3.4: The remote archive doesn't match the expected checksum
➤ YN0018: │ decompress-response@npm:4.2.1: The remote archive doesn't match the expected checksum
➤ YN0018: │ dagre@npm:0.8.5: The remote archive doesn't match the expected checksum
➤ YN0000: └ Completed in 0s 583ms

When an archive checksum in yarn.lock is incorrect and YARN_CHECKSUM_BEHAVIOR=update yarn is called instead of only yarn, the archive is fetched again and doesn't produce this error.

Addresses #547 but it's uncertain if it will fix it. It's uncertain if archive checksums were calculated incorrectly due to bugs in yarn when the archive was created or if there's some other error, like something weird going on with the network.

--

To test this I created a vsix file and installed it with logging in nodeDependencyProcess.ts:spawn that showed YARN_CHECKSUM_BEHAVIOR was set
vscode_yarn_checksum_behavior_small

@symwell symwell changed the title Fix: Set YARN_CHECKSUM_BEHAVIOR=update when 'yarn up' is called fix: Set YARN_CHECKSUM_BEHAVIOR=update when 'yarn up' is called Dec 19, 2022
@symwell symwell force-pushed the sw/remote_archive_doesnt_match_the_expected_checksum__version2 branch from 47d53e8 to 3586bb9 Compare December 19, 2022 20:08
@symwell symwell marked this pull request as draft December 19, 2022 20:34
@symwell symwell force-pushed the sw/remote_archive_doesnt_match_the_expected_checksum__version2 branch from 3586bb9 to 51cf081 Compare December 19, 2022 21:16
@symwell symwell marked this pull request as ready for review December 19, 2022 21:20
@symwell symwell force-pushed the sw/remote_archive_doesnt_match_the_expected_checksum__version2 branch from 51cf081 to 577526c Compare December 19, 2022 21:32
@symwell symwell self-assigned this Dec 20, 2022
@dustinbyrne dustinbyrne self-requested a review December 20, 2022 15:06
@@ -23,6 +23,9 @@ export type SpawnOptions = {
// Command line args given to `node` or the `bin` script specified
args?: string[];

// Additional environment variables given to `node` or the `bin` script specified
env?: Record<string, string>;

// If specified, write log messages to the given output channel
Copy link
Contributor

Choose a reason for hiding this comment

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

This should already be included via childProcess.SpawnOptionsWithoutStdio

interface ProcessEnvOptions {
    uid?: number | undefined;
    gid?: number | undefined;
    cwd?: string | undefined;
    env?: NodeJS.ProcessEnv | undefined;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is.

@dustinbyrne dustinbyrne self-requested a review December 20, 2022 21:50
@symwell symwell merged commit bc0a587 into master Dec 20, 2022
@appland-release
Copy link
Contributor

🎉 This PR is included in version 0.57.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants