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

Possible to bump the file size allowed on Quarto Pub for an R Shinylive App? #10

Open
coatless opened this issue Sep 24, 2023 · 3 comments

Comments

@coatless
Copy link

When I try to deploy a single R Shiny app created using Shinylive onto Quarto Pub, I'm getting a max publish size error of:

ERROR: API Error: 413 - The maximum publish size is 100MB

From the README file's known limitations, I'm guessing the upload size hiccup is due to the inclusion of pyodide and pyright.

Full error trace of upload error
Error: API Error: 413 - The maximum publish size is 100MB
    at QuartoPubClient.createDeploy (file:///Applications/quarto/bin/quarto.js:111384:23)
    at async file:///Applications/quarto/bin/quarto.js:109026:22
    at async withSpinner (file:///Applications/quarto/bin/quarto.js:56614:9)
    at async handlePublish (file:///Applications/quarto/bin/quarto.js:109004:5)
    at async publishSite (file:///Applications/quarto/bin/quarto.js:121230:38)
    at async publish5 (file:///Applications/quarto/bin/quarto.js:121448:61)
    at async doPublish (file:///Applications/quarto/bin/quarto.js:121404:13)
    at async publishAction (file:///Applications/quarto/bin/quarto.js:121440:13)
    at async Command.fn (file:///Applications/quarto/bin/quarto.js:121392:9)
    at async Command.execute (file:///Applications/quarto/bin/quarto.js:8437:13)
@schloerke
Copy link
Collaborator

@georgestagg Is there a way to detect if we're publishing?

To avoid Quarto Pub from hosting so many files of the same time, could we inject/require CND hooks for shinylive? (IDK if that would be implemented in the quarto extension or within r-shinylive.)

@georgestagg
Copy link
Collaborator

Is there a way to detect if we're publishing?

I don't think so, but happy to be corrected. Currently, I think shinylive just always expects to find the webr or pyodide directories as part of the static content that's deployed with the app/document.

As James suggests, it would be nice to modify the Quarto extension so that the Pyodide assets are only deployed if a Python app is used somewhere. However, as we have discussed this is trickier than it first sounds.

I think we need to think more about the general question of whether a particular shinylive deployment should bundle all the required assets as part of the output for standalone hosting, or instead use CDNs for everything to reduce the total bundle filesize. One could even imagine hybrid schemes where the webR/Pyodide engine is loaded via CDN, but the required R/Python packages are bundled in the output.

I can see arguments for both methods, and the right solution is probably to offer the option to the end user in some way. I think the best balance of de-duplication vs. customisation for shinylive apps deployed to Quarto Pub would probably be the hybrid scheme where webR/Pyodide is loaded from CDN, with only the specific R/Python packages that are used in the app bundled in the output.

@schloerke
Copy link
Collaborator

As of #21 , the bundle size should be much smaller as pyright/pyodide are not included by default.

@coatless Can you update your posit-dev/r-shinylive R package and quarto-ext/shinylive quarto extension and try again? Thank you!

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

No branches or pull requests

3 participants