-
Notifications
You must be signed in to change notification settings - Fork 38
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
[temporary] chunked upload disabled (could not push size > 1024) #43
Comments
I can look into this - but is there a particular reason to use oras-py for its command line client? I'd typically suggest using the Go client for this - oras-py is mostly intended for using from within Python. |
Thanks for the quick response - I am using it inside python actually. I was getting this weird error from my script so I just used oras-py for debugging. I did go over the go code real quick, and didn't see any reference to chunked uploads. |
okay reproduced! |
I looked a little further, the last PUT is missing the headers (Content-Length, Content-Range etc..) |
yeah I'm just seeing that - trying to load the distribution spec page to check details but my browser is timing out (I hope GitHub isn't going down!) |
It's actually not the last PUT that is the issue - it's the first chunk upload. Here are the headers used:
|
The error I see is: upload resumed at wrong offset: 1024 != 0 which is strange because we ask for the original URL with Content-Length 0, and then the range starts at 0. But for some reason this seems to think it's starting at 1024. |
It seems to be comparing the size to the offset, which doesn't make sense to me https://github.com/distribution/distribution/blob/78b9c98c5c31c30d74f9acb7d96f98552f2cf78f/registry/handlers/blobupload.go#L304-L313 |
Do you do chunked uploads? Because afaik they are not supported on Github |
That shouldn't matter I'm running a registry locally to reproduce the error. |
Or at least they were not supported at some point in the past :) |
I'm really not sure what to try here - this (I think) is following the spec to a T and the error doesn't make sense. I also thought it worked in the past, so I'm a bit dumbfounded. Maybe something changed? |
I honestly have no idea, I started using Oras just a few days ago, and all my prototypes were using small files :D |
If it's the case that some registries don't even support it, should we just disable it for now? And come back when there is a huge file that a registry cannot upload (needing chunked?) |
This is my proposal for now: #45 |
Well, we're not using any registry, we're using the one that ships with microk8s which is an offical docker registry (docker.io/library/registry:2.7.1) |
That's what I did locally as well - just disabled the chunks_upload :) |
My suggestion is to to merge disabling chunked for the time being (which will get most reasonable sized uploads working) and come back to this when it presents an issue. It's not perfect, but I've taken a look and I can't figure out what the issue is - and most of the main maintainers on this project are focused on the Go bits and largely ignore work over here. So I'm going to go ahead and merge the patch, and we can come back in the future when someone has more insight to why the registry is not happy with the header shown above. Thanks @yuvalturg ! |
That's great, thank you very much @vsoch !! |
Title is updated to reflect that this is now considered a bug! If anyone in the future sees this issue, we have the code to implement the chunked upload but ran into the issues above, and to re-enable it we will need to understand why the registry does not like our header specification. |
Hi,
Whenever I try to push something larger than 1023, it fails as follows:
This is the log on the registry's side:
Looks like a problem with _chunked_upload. When I modify the code to use _put_upload, it works.
Any ideas?
The text was updated successfully, but these errors were encountered: