[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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 file size handling for the contents drive #1530

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

juntyr
Copy link
Contributor
@juntyr juntyr commented Dec 3, 2024

References

Fixes #1472
Fixes #1508
Fixes #1529

Supersedes #1511

Code changes

  • Implements setattr size by getting, truncating or extending, and writing back the content file
  • Fixes file save file size handling by being explicit when the stored content is a partial binary string and when it is decoded to its format

User-facing changes

Bug fixes

Backwards-incompatible changes

None

Copy link
Contributor
github-actions bot commented Dec 3, 2024

lite-badge 👈 Try it on ReadTheDocs

@juntyr
Copy link
Contributor Author
juntyr commented Dec 3, 2024

Interestingly, at least #1508 doesn't reproduce on the latest main branch deployment but does on my own one, which uses jupyterlite v0.4.4 as well but uses Pyodide v27 (dev). So perhaps this is an issue that will only materialise with the next Pyodide release?

@juntyr
Copy link
Contributor Author
juntyr commented Dec 3, 2024

I did some quick testing with the ReadTheDocs version and uploading large PDFs and notebooks seems to still work

@jtpio jtpio added the bug Something isn't working label Dec 3, 2024
@jtpio jtpio added this to the 0.4.x milestone Dec 3, 2024
@jtpio
Copy link
Member
jtpio commented Dec 4, 2024

Thanks @juntyr for this! I'll try to have a look soon.

cc @martinRenou who may also be interested

@jtpio
Copy link
Member
jtpio commented Dec 6, 2024

@juntyr maybe it could be a good time to start looking into adding UI tests for file uploads?

We have been tracking that in #1027. Maybe this could have also helped catch such regressions, and help make sure it does not break again later.

Copy link
Member
@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

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

That looks good to me!

Agreed with Jeremy it would be great to add a simple test

@juntyr
Copy link
Contributor Author
juntyr commented Dec 6, 2024

If you want the test to be added in this PR, I'll need your help as I've never written a UI test before

@jtpio
Copy link
Member
jtpio commented Dec 6, 2024

If you want the test to be added in this PR, I'll need your help as I've never written a UI test before

I guess it would be fine to do it separately too, since it may need some time. And also since this PR fixes a few issues it would be great to make it available to users sooner.

Copy link
Member
@jtpio jtpio left a comment

Choose a reason for hiding this comment

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

Thanks!

@jtpio jtpio merged commit 1f784cb into jupyterlite:main Dec 6, 2024
20 checks passed
@juntyr juntyr deleted the contents-size-fix branch December 6, 2024 16:31
@juntyr
Copy link
Contributor Author
juntyr commented Dec 6, 2024

If you want the test to be added in this PR, I'll need your help as I've never written a UI test before

I guess it would be fine to do it separately too, since it may need some time. And also since this PR fixes a few issues it would be great to make it available to users sooner.

What’s your current timeline for the next path release? If the fix could be released sometime next week it would be fantastic (I’m trying to publish a release of my project before the holidays)

@jtpio
Copy link
Member
jtpio commented Dec 6, 2024

I think we can make a new release now from main, before a 0.5.0 with #1514.

@jtpio
Copy link
Member
jtpio commented Dec 6, 2024

Starting the 0.4.5 release now.

@jtpio
Copy link
Member
jtpio commented Dec 6, 2024

Released: https://github.com/jupyterlite/jupyterlite/releases/tag/v0.4.5

Thanks @juntyr for your fixes! Feel free to report more issues if you find any during your testing.

@juntyr
Copy link
Contributor Author
juntyr commented Dec 7, 2024

Released: https://github.com/jupyterlite/jupyterlite/releases/tag/v0.4.5

Thanks @juntyr for your fixes! Feel free to report more issues if you find any during your testing.

Thanks @jtpio for the quick release! I think the pyodide-kernel needs a release as well (with the jupyterlite deps bumped) since its workers bundle the drive contents.

Since I can only test the combination of new jupyterlite + old pyodide-kernel right now, the file size issues appear fixed (this one seems to be in the "inner" layer that the kernel workers call but don't inline), but the file truncation logic doesn't run yet (this one seems to be in the "outer" layer that is inlined in the kernel workers)

@juntyr
Copy link
Contributor Author
juntyr commented Dec 7, 2024

I've opened jupyterlite/pyodide-kernel#146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants