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

Uploading all files by default #16

Closed
jcolls opened this issue Oct 8, 2019 · 6 comments
Closed

Uploading all files by default #16

jcolls opened this issue Oct 8, 2019 · 6 comments
Assignees

Comments

@jcolls
Copy link

jcolls commented Oct 8, 2019

For some reason all my files are being updated whether they have changed in github or not.
I added --verbose to check and everything gets deleted then transferred. I thought the default was to now only upload changed files?

I'm using the following ARGS. Would you be able to explain if I have something wrong. I thought I had to have --transfer-all in order to do what it is currently doing.

ARGS: --exclude=.ftpquota --exclude-glob=.git*/** --exclude-glob=.git** --no-empty-dirs --verbose

Many thanks

@SamKirkland SamKirkland self-assigned this Oct 8, 2019
@SamKirkland
Copy link
Owner

Hey!

This is a very common question, i'll be adding some documentation to the FAQ to make it more clear in the future.

The FTP spec is very limited and doesn't have the ability to upload differences like rsync.
However a few workarounds exist, by default the script is set to upload any file that has a different last-modified-time or size. However when checking out the latest code git sets the modification time to now, meaning the script see's all files as new. I've been looking into a solution.

To fix this in the meantime you can skip the time comparison and only do a file size comparison. Files will only be uploaded if the file size is different, this has one caveat. If the file was modified but the file size remained the same the file won't be uploaded.

To ignore times add --ignore-time to your ARGS

@jcolls
Copy link
Author

jcolls commented Oct 10, 2019

Thanks Sam for the response and the explanation.

I was initially worried about the time it takes to do an upload as I had the assumption that all the files were being deleted and then being uploaded. However, after looking at the process, using the verbose mode, I can see that the files are deleted and uploaded individually which means that there is very little 'downtime' during the transfer.

I will leave the setup as is as I do not want to risk missing uploads with --ignore-time and hope that your investigations come up with a solution to save a bit of bandwidth and processing time.

@kriskhoury
Copy link

Hey Sam. Wondering if there was a fix for this?

Thanks

@SamKirkland
Copy link
Owner

The solution for now has been to add --ignore-time to your ARGS
I've been working on a long term solution but the ftp library this action is using must change to resolve this issue :(

@Misiu
Copy link
Contributor

Misiu commented Feb 4, 2020

@SamKirkland so you must change the library or are you waiting for changes in library you are using?
If the second option, then could you post the link to the issue in that library? we will be able to monitor it.
In my case, it takes about 4 minutes to upload files to FTP on Azure.

@Zenoo
Copy link

Zenoo commented Feb 12, 2020

Yeah, I've been using --ignore-time for a while too, but every now and then, it causes an issue when a file that has been modified still kept the same size.

So ... if there is another solution for this ...

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

5 participants