Skip to content

fix(install): invalidate manifest cache on registry change - #11606

Merged
dylan-conway merged 10 commits into
mainfrom
dylan/invalidate-on-registry-change
Jun 6, 2024
Merged

dylan-conway merged 10 commits into
mainfrom
dylan/invalidate-on-registry-change

Conversation

@dylan-conway

@dylan-conway dylan-conway commented Jun 4, 2024 •

Copy link
Copy Markdown
Member

What does this PR do?

We need to make sure manifests in the cache are invalidated when the registry for the package changes. This pr bumps our serialized manifest version to 3, and writes the registry hash + length to end of the file.

fixes #11582

How did you verify your code works?

Added a test that installs the same package from two registries.

@github-actions

github-actions Bot commented Jun 4, 2024 •

Copy link
Copy Markdown
Contributor

❌ @dylan-conway, your commit has failing tests :(

💪 1 failing tests Darwin AARCH64

  • test/js/web/streams/streams.test.js 1 failing

🐧🖥 1 failing tests Linux x64

  • test/integration/next-pages/test/next-build.test.ts 1 failing

🪟💻 4 failing tests Windows x64 baseline

  • test/cli/install/bunx.test.ts 1 failing
  • test/integration/next-pages/test/dev-server.test.ts 1 failing
  • test/js/bun/io/bun-write.test.js 1 failing
  • test/js/node/watch/fs.watchFile.test.ts 3 failing

🪟💻 5 failing tests Windows x64

  • test/cli/install/bunx.test.ts 1 failing
  • test/integration/next-pages/test/dev-server.test.ts 1 failing
  • test/js/bun/io/bun-write.test.js 1 failing
  • test/js/node/watch/fs.watchFile.test.ts 3 failing
  • test/js/web/timers/setTimeout.test.js 1 failing

View logs

@Jarred-Sumner

Copy link
Copy Markdown
Collaborator

I think we should store the length also

@Jarred-Sumner

Jarred-Sumner commented Jun 5, 2024 •

Copy link
Copy Markdown
Collaborator

Like hash & length

As another sanity check

@Jarred-Sumner

Copy link
Copy Markdown
Collaborator

Let’s merge once tests run

@anru

anru commented Jun 7, 2024

Copy link
Copy Markdown

Thank you very much for this fix, looking forward to the next release to adopt bun as a package manager in our day 2 day development and CI/CD pipelines.

It is also highly likely that the nature of all the related issues listed in #11582 (perhaps except the #5029) lies in the behaviour that was fixed in current mr.

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.

Not being able to use bun install in large companies

3 participants