Skip to content

fix(site): remove tar file type limitation #7817

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

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

BrunoQuaresma
Copy link
Collaborator

There are many file types supported by tar so I think we don't need to restrict them only to files or directories.

More info about tar: https://en.wikipedia.org/wiki/Tar_(computing)

@BrunoQuaresma BrunoQuaresma requested review from kylecarbs and a team June 2, 2023 17:36
@BrunoQuaresma BrunoQuaresma self-assigned this Jun 2, 2023
@BrunoQuaresma BrunoQuaresma requested review from Kira-Pilot and removed request for a team June 2, 2023 17:36
@ericpaulsen
Copy link
Member

for context, if an invalid file is identified, this error is returned:

No supported file type
Error: No supported file type at EV.readFileType (https://coder.internal.dev/assets/editor.main-8670c423.js:1:3159) at EV.readFileInfo (https://coder.internal.dev/assets/editor.main-8670c423.js:1:2353) at EV.readFile (https://coder.internal.dev/assets/editor.main-8670c423.js:1:2194) at async lbe (https://coder.internal.dev/assets/editor.main-8670c423.js:1:6074) at async Promise.all (index 1) at async loadFiles (https://coder.internal.dev/assets/TemplateVersionPage-e5fb6a46.js:1:1876)

this also causes the Source Code page to hang and Edit page return as blank for the template in question.

@Emyrk
Copy link
Member

Emyrk commented Jun 5, 2023

What additional types are you trying to support?

@BrunoQuaresma
Copy link
Collaborator Author

@Emyrk we don't have a specific set of files we want to support. Handling tar files in a specific way can be painful since we usually don't have access to the customer .tar template to verify them and it can take long to get it, debug and get a fix. Also, understanding each of the file types in tar deeply sounds too much for now. IMO, we should not block or handle a specific set o file types until we have a good reason for that. We made this before because the code that I took as base had it and I didn't see a reason to remove this part.

@BrunoQuaresma
Copy link
Collaborator Author

Merging it for now. If you see any issue with that we can easily revert.

@BrunoQuaresma BrunoQuaresma merged commit 6fde86d into main Jun 5, 2023
@BrunoQuaresma BrunoQuaresma deleted the bq/fix-tar-ready-file-type branch June 5, 2023 13:34
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants