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

Firebase deploy should not reupload unchanged files #133

Closed
hickford opened this issue May 17, 2016 · 28 comments
Closed

Firebase deploy should not reupload unchanged files #133

hickford opened this issue May 17, 2016 · 28 comments

Comments

@hickford
Copy link

hickford commented May 17, 2016

My site is 0.2 MB of html and 9.8 MB of images. I have a slow internet connection. Whenever I change the html, I suffer firebase deploy reuploading all the images—even though they are unchanged.

Good old Divshot was careful to compare sha256 sums so it could skip reuploading unchanged files. This made it usable on a slow connection. You can read a description of its algorithm at https://github.com/divshot/divshot-push/blob/master/lib/sync-tree.js

Whereas Firebase simply creates a tar ball of the entire project firebase-upload-*.tar.gz https://github.com/firebase/firebase-tools/blob/master/lib/prepareUpload.js , including all the unchanged files.

Please think how to conserve bandwidth, for those of us not blessed with high speed internet.

@hickford
Copy link
Author

See also similar feature request for Surge.sh sintaxi/surge#119

@mbleigh
Copy link
Contributor

mbleigh commented May 17, 2016

Yep, this is on the roadmap and we know it's strongly desired. Can't give
you a timeline, but we're well aware.

On Tue, May 17, 2016, 9:49 AM Mirth Hickford [email protected]
wrote:

See also similar feature request for Surge.sh sintaxi/surge#119
sintaxi/surge#119


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#133 (comment)

@hickford
Copy link
Author

Hi Mike. Great, look forward to it.

@dht
Copy link

dht commented Sep 4, 2016

Also looking forward. +1

@nicogarcia
Copy link

+1

1 similar comment
@TheoMer
Copy link

TheoMer commented Nov 21, 2016

+1

@seanmavley
Copy link

So is it fixed, @mbleigh ?

@mbleigh
Copy link
Contributor

mbleigh commented Jan 4, 2017 via email

@jjmpsp
Copy link

jjmpsp commented Feb 17, 2017

It's my first time using firebase hosting and I have to say I was surprised to discover firebase uploads the entire public folder upon calling the firebase deploy command. I'm so used to using tools which calculates file differences (Git, Unity collaborate, etc.) so I thought the firebase deploy command was hanging (or failing) and spent a good 30 minutes searching online for a solution to the 'problem'. Turns out the process was working fine after all, but just took its time over my slow internet connection.

Just as a FYI, if you want to track the upload progress, simply open an Activity Manager application from your system OS and monitor the 'node' process for upload activity:

screen shot 2017-02-17 at 11 21 03

@kaankucukx
Copy link

nothing yet ?

@mbleigh
Copy link
Contributor

mbleigh commented Apr 9, 2017 via email

@coreybutler
Copy link

@mbleigh - while you're all thinking about it, I wanted to mention my use case for consideration as well. I have an "append-only" site where new static content is created on a fairly regular basis. I always know what's new... there's never any diffing required in my particular use case. I'd be thrilled to see the ability to tack on new content, even if I had to make the zip/tarball myself, i.e. something like firebase deploy --append ./my.zip. Just food for thought.

Also, if there's anything I can do to help, let me know. I'm pretty handy with Node and static web hosting :-)

@Ovi
Copy link

Ovi commented Jan 31, 2018

+1

@literalpie
Copy link

Is this still in the works? Any updates?

@talas9
Copy link

talas9 commented Jun 1, 2018

This feature is really important, any small change to any function requires redeployment of all other functions, this means all the functions on the cloud will re download the npm packages on first-run of each untouched function.

This should be a priority, please share any ETA you have on this.

@laurenzlong
Copy link
Contributor

@talas9 This issue is for Firebase Hosting, you're actually talking about Functions. See https://firebase.google.com/docs/cli/#partial_deploys for instructions on how to deploy single or groups of functions instead of all of them.

@talas9
Copy link

talas9 commented Jun 1, 2018

@laurenzlong sorry for that, so I just have a question: does deploying selected functions (partial deployment) will keep the ones not selected for deployment and already running in the cloud? or it will delete them?

@laurenzlong
Copy link
Contributor

@talas9 No problem! It keeps them running as they are.

@maxcorbeau
Copy link

@laurenzlong @mbleigh : hi guys, any ETA on this?

@pedrommuller
Copy link

any update on this feature?

@samtstern
Copy link
Contributor

This is the 5th most "reacted" open issue on Firebase, so I am really happy to be able to close it!

https://firebase.googleblog.com/2018/08/one-project-multiple-sites-plus-boost.html

If you updated the Firebase CLI recently, you might have noticed that your uploads got a bit faster. You may have also noticed a new .firebase folder in your project. That's because we rolled up a new deployment system that we call Delta Uploads.

This new system only processes new, modified, or deleted files. You know, the delta. This means any files that are unchanged aren't uploaded when you run firebase deploy. You may not notice a big improvement in performance if your site is only a few files. However, it will make a huge difference for sites with a large amount of existing unmodified assets.

Make sure to get the newest version of the Firebase CLI (firebase-tools on npm) and you'll get super fast uploads!

@samtstern
Copy link
Contributor

cc @Memeriaj

@mesqueeb
Copy link

@samtstern Thanks for your information on the .firebase folder. Do you know if we need to best commit this file to github in our projects? What would you do?

@samtstern
Copy link
Contributor

samtstern commented Oct 10, 2018 via email

@mbleigh
Copy link
Contributor

mbleigh commented Oct 10, 2018 via email

@jcwrightson
Copy link

How does this handle *.rules files? Currently all my *.rules files continue to be uploaded and I've run into quota limits recently. As a work around I've edited firebase.json and removed these definitions in order to deploy without unnecessarily uploading these files.

@samtstern
Copy link
Contributor

@jcwrightson this issue was only about Firebase Hosting and how it handles uploading web assets. De-duping *.rules files before uploading is a good idea! Do you mind filing a new Feature Request for that?

@jcwrightson
Copy link

@samtstern done! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests