Skip to content

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Sep 23, 2025

This PR fix the tar creation in bundle for connect.

The new function was not correctly handling filepaths, as the output tar is not in a relative place compared to the file to include, and also the tar creation command needs to be run in the same place as the file itself to be found

So now full path is used for files to include

@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Sep 23, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@cderv
Copy link
Collaborator Author

cderv commented Sep 23, 2025

While testing this, bundles creation is ok but there is an issue in how Posit connect deploy the bundle.

Somehow, the mimetype of the file is not correctly guessed it seems

dae6ae4-e701-461e-8627-484806458c91/:1 Refused to execute script from '<positserver>/content/bdae6ae4-e701-461e-8627-484806458c91/site_libs/quarto-nav/quarto-nav.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled

Is there something happening with this new tar library ?

@cscheid
Copy link
Collaborator

cscheid commented Sep 23, 2025

That's possible! One way to check is to create a tar file from the old version and compare it to the one created by the new version.

@cderv
Copy link
Collaborator Author

cderv commented Sep 23, 2025

I found it, we've regressed on

So I'll put back the normalization lost in refactoring.

…r Connect deploys

std/tar will create folders based on file paths used, but it requires using / and not \\ in path. This is a problem on Windows, where the path separator is \\. This commit normalize the path to use / instead of \\ when creating the tar.gz file for Connect deploys.
@cderv cderv force-pushed the fix/rsconnect-tar-bundle branch from ffb7459 to 64656b7 Compare September 24, 2025 09:48
@cderv cderv merged commit 3bf8c83 into main Sep 24, 2025
51 checks passed
@cderv cderv deleted the fix/rsconnect-tar-bundle branch September 24, 2025 10:21
@cscheid
Copy link
Collaborator

cscheid commented Sep 24, 2025

@cderv we should try to coordinate with the posit connect folks to have a scheduled integration test in CI.

@cderv
Copy link
Collaborator Author

cderv commented Sep 24, 2025

Yes 💯 I already asked and they may have some solution we could run in CI. I'll update when I have something

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.

quarto publish connect on v1.8.24 throws No such file or directory (os error 2): stat 'site_libs/quarto-html/axe/axe-check.js'
3 participants