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
Codercord3mo ago
<#1296819284810666077>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Katorly
Katorly3mo ago
I also encountered the same problem, which forced me to give up uploading templates.
zounce
zounce3mo 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
Atif3mo ago
Did using coder templates push from CLI worked for you?
Katorly
Katorly3mo ago
I deployed Coder inside a Docker container, is there a place to access the Coder CLI?
Atif
Atif3mo ago
You can install the CLI to any machine using the install script.
Andrej
AndrejOP3mo ago
its zip file from gitlab, around 200KB
zounce
zounce3mo ago
Hmm, okay, definitely not a size issue
Andrej
AndrejOP3mo ago
but ill try the cli way later as well and keep u posted
zounce
zounce2mo ago
https://github.com/coder/coder/issues/15292 Potentially related, it's really easy to nest your terraform config accidentally
Katorly
Katorly2mo ago
I zip the content, not the folder and still get stuck in this...
zounce
zounce2mo 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
Phorcys2mo ago
I can reproduce the issue, i'll connect w/ Ethan and open up an issue
Andrej
AndrejOP2mo 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
zounce2mo 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
AndrejOP2mo ago
so you think with the fix we should be able to upload zip?
zounce
zounce2mo 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
Phorcys2mo ago
you can't use coder template push to push a zip, you have to push a folder with it

Did you find this page helpful?