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

Run build commands after deploying folder with zip file through cli #161

Closed
oskareke opened this issue Oct 23, 2018 · 7 comments
Closed

Comments

@oskareke
Copy link

oskareke commented Oct 23, 2018

- Do you want to request a feature or report a bug?
Feature

- What is the current behavior?
I have a large site with 10000+ files and deployments tend to timeout unless I zip my build folder. This way however I end up serving the zip file instead of my site.

- If the current behavior is a bug, please provide the steps to reproduce.

- What is the expected behavior?
I'm probably just missing something here, but how can I add a build command to unzip the file after upload?

- Please mention your node.js, and operating system version.

@bcomnes
Copy link
Contributor

bcomnes commented Oct 23, 2018

Manual deploys from the CLI assume the build process has already occurred, and the deploy is simply a matter of hashing the content and figuring out which files require uploading.

Try not zipping the output and letting the CDN figure out what is needed. Curious to what the results are. If you send me link to the deployed zip file, I can download locally and test as well.

@bcomnes
Copy link
Contributor

bcomnes commented Oct 23, 2018

Also please confirm the version of the CLI you are running:

netlify --version

@oskareke
Copy link
Author

Ok got it. Overall deploying manually through the CLI is working well but it tends to break a few times along the way. It does pick up where it broke down if I run the deploy command again, but it would be nice if to have a flag or something for it to retry automatically. Since I have a few different sites it gets tedious to retry manually and since my builds take longer than 15 minutes on your servers I can't use the git method.

@bcomnes
Copy link
Contributor

bcomnes commented Oct 24, 2018

Agreed, what kinds of failures are you seeing? Examples of errors?

@Cinamonas
Copy link

We’re in a very similar situation: due to Netlify’s 15 minute deploy timeout, we’ve moved the actual build to Travis CI. After it completes, we netlify deploy it, but get 408 Request Timeout:

Deploying to draft url...
✔ Finished hashing 3240 files and 14 functions
✔ CDN requesting 444 files and 14 functions
\ (437/480) Uploading page/index.html... ›   Error: 
 ›   <html><head>
 ›   <meta http-equiv="content-type" content="text/html;charset=utf-8">
 ›   <title>408 Request Timeout</title>
 ›   </head>
 ›   <body text=#000000 bgcolor=#ffffff>
 ›   <h1>Error: Request Timeout</h1>
 ›   <h2>Your client has taken too long to issue its request.</h2>
 ›   <h2></h2>
 ›   </body></html>
 ›

Running netlify deploy again continues from where it failed, but why fail in the first place?

@bcomnes
Copy link
Contributor

bcomnes commented Oct 25, 2018

Sometimes there is failure during uploads, and the CLI attempts a retry for each failed file up to 5 times. Its just the nature of large distributed systems from a client perspective. It could be that some errors are not properly handled though, and thus not retrying. If you do run into an error during upload, please post it. I will investigate and ensure we can properly recover from it if possible, otherwise handle the failure in a user facing way if not possible.

@bcomnes
Copy link
Contributor

bcomnes commented Oct 25, 2018

@Cinamonas thank you for the report, I will investigate this branch.

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