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

Embeds Python package locks in the binary. #3379

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

dom96
Copy link
Collaborator

@dom96 dom96 commented Jan 21, 2025

Right now the package lock is embedded in the pyodide.capnp.bin file. This couples the package lock to the Python bundle that we load which isn't ideal.

We have two solutions that we can pursue to fix this:

  • Download the lock file from the package bucket at runtime
  • Download the lock file at built time and embed it in the binary

We have decided to go for the second option for two reasons:

  1. it avoids a costly HTTP request at run time which would delay cold starts
  2. it is easier to implement

Lock files are not particularly big so embedding them in the binary shouldn't be a problem.

Copy link

github-actions bot commented Jan 21, 2025

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

@dom96 dom96 force-pushed the dominik/embed-package-locks branch 2 times, most recently from c3a401b to a1345a9 Compare January 21, 2025 17:40
@dom96 dom96 marked this pull request as ready for review January 21, 2025 17:47
@dom96 dom96 requested review from a team as code owners January 21, 2025 17:47
@dom96 dom96 force-pushed the dominik/embed-package-locks branch from a1345a9 to 3b145f2 Compare January 21, 2025 18:04
@hoodmane
Copy link
Contributor

Generally looks good to me.

@dom96 dom96 force-pushed the dominik/embed-package-locks branch 2 times, most recently from ab110b6 to 18b5f1a Compare January 22, 2025 11:28
@dom96 dom96 force-pushed the dominik/embed-package-locks branch from 18b5f1a to 8a81ca7 Compare January 22, 2025 13:33
@dom96 dom96 merged commit ae1734d into main Jan 22, 2025
16 of 17 checks passed
@dom96 dom96 deleted the dominik/embed-package-locks branch January 22, 2025 14:11
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.

2 participants