Create template by zip upload hangs

Hi, any idea why create template by upload doesn't work and loops in the loading state? Thanks
No description
18 Replies
Codercord
Codercord2mo ago
<#1296819284810666077>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Katorly
Katorly2mo ago
I also encountered the same problem, which forced me to give up uploading templates.
zounce
zounce2mo ago
How big are the templates you’re trying to upload? If you’ve run terraform init within them before uploading they can get pretty big I’ve seen the upload process hang when they’re sufficiently big, but the max size we support is 3 (maybe 4?) Mb
Atif
Atif2mo ago
Did using coder templates push from CLI worked for you?
Katorly
Katorly2mo ago
I deployed Coder inside a Docker container, is there a place to access the Coder CLI?
Atif
Atif2mo ago
You can install the CLI to any machine using the install script.
Andrej
AndrejOP2mo ago
its zip file from gitlab, around 200KB
zounce
zounce2mo ago
Hmm, okay, definitely not a size issue
Andrej
AndrejOP2mo ago
but ill try the cli way later as well and keep u posted
zounce
zounce4w ago
https://github.com/coder/coder/issues/15292 Potentially related, it's really easy to nest your terraform config accidentally
Katorly
Katorly4w ago
I zip the content, not the folder and still get stuck in this...
zounce
zounce4w ago
The frontend isn't showing errors when it should for a few cases it would appear You should see an error uploading via the CLI, or you can view the provisioner logs in the browser dev console network tab Either way, it'd be good to see what's going wrong
Phorcys
Phorcys3w ago
I can reproduce the issue, i'll connect w/ Ethan and open up an issue
Andrej
AndrejOP3w ago
some more insights: - pushing .zip doesnt work at all using coder template push - after extracting the zip file, there needs to be a .tf file in the root of the template - empty main.tf works fine. afterwards, i was able to push the template. what do you mean nest?
zounce
zounce3w ago
after extracting the zip file, there needs to be a .tf file in the root of the template
By nested I mean, not having a main.tf in the root of the template I pushed up a fix for the frontend hanging when that's the case yesterday :) https://github.com/coder/coder/pull/15341 next release you'll get a message saying Terraform couldn't find the config, which is the same behaviour as the CLI
pushing .zip doesnt work at all using coder template push
I believe this is just a CLI limitation unfortunately
Andrej
AndrejOP3w ago
so you think with the fix we should be able to upload zip?
zounce
zounce3w ago
Any templates that couldn't be uploaded before, still can't be uploaded The only fix I made was making sure it told you what the issue was on the frontend
Phorcys
Phorcys3w ago
you can't use coder template push to push a zip, you have to push a folder with it
Want results from more Discord servers?
Add your server