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

Batch request size is zero on retry. #14

Closed
sgoo opened this issue Jul 19, 2016 · 3 comments
Closed

Batch request size is zero on retry. #14

sgoo opened this issue Jul 19, 2016 · 3 comments

Comments

@sgoo
Copy link

sgoo commented Jul 19, 2016

If the initial conversion fails and a retry is attempted, the requests are all made with a "size": 0

This seems to be because data is saved into git-lfs-migrate.mapdb. When that data is reused in git.lfs.migrate.GitConverter#createRemoteFile the main body of that function is skipped so the size never gets set to anything other than zero.

Bitbucket.org's implementation of LFS asserts that the uploaded file matches in both OID and size.

@robinst
Copy link
Contributor

robinst commented Jul 19, 2016

I'm looking into this, looks like the cache will need to be changed.

robinst added a commit to robinst/git-lfs-migrate that referenced this issue Jul 19, 2016
Because the code only put the hash in the cache and not the size, the
size that was sent in a retried request was 0.

Some server implementations check the size, so those requests may fail.

To fix it, also put the size in the cache and use it when creating a
request from the cache.
@robinst
Copy link
Contributor

robinst commented Jul 19, 2016

PR for fix: #16

bozaro added a commit that referenced this issue Jul 31, 2016
Fix object size being 0 when retrying request (#14)
@bozaro
Copy link
Owner

bozaro commented Jul 31, 2016

Fixed by PR #16

@bozaro bozaro closed this as completed Jul 31, 2016
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