pyodide: Dev REPL package checksum verification failure
Currently, I’m getting a checksum verification failure when installing numpy in the dev REPL
The error is,
None of the “sha256” hashes in the integrity attribute match the content of the subresource.
I suspect this is because the dev deployment has a cache duration of 1 hour and we overwrite files, so sometimes packages.json
and actual packages might get temporarily out of sync and we would get these errors.
I’m not sure if there is much we can do about it:
- As far as I can tell after checking a few commits, package build is mostly reproducible and sha256 of packages remain constant unless there are build-related changes that are not very frequent.
- We can reduce the cache duration but then we would pay more in bandwidth if anyone uses dev packages extensively (right now there is no breakout of usage per deployed version)
- Otherwise, we could disable sha256 verification on dev deployment but it’s also not ideal
So hopefully this issue will resolve itself in the near future, opened it for future reference.
cc @amitsaha
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 18 (15 by maintainers)
Thanks for your suggestions, @KyleXie I appreciate it! I know, but we are relying on JsDelivr CDN does an has an extra caching layer and aggregates multiple CDNs. Serving non immutable artifacts is not a primary use case there.
You are right that could be a solution. The problem with it is,
Overall, I would be +1 to close this as “won’t fix”. A good solution would be to have a separate dev bucket maybe with no caching, or deploy each commit on a separate url, but then someone would need to pay for bandwidth (and I don’t think it’s worth it).
This issue is occasionally annoying, but I don’t feel it’s worth spending time on it, while there are more important issues address. Currently existing workarounds are:
main
branch.I think it would be good to maybe enable it in the dev REPL by default?
Hmm, I’m not sure what we should do for this. Maybe we should add an option to disable integrity check and use it for dev consoles? @rth @hoodmane