-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
use go's built in handling of trailers and dont do custom chunking #1621
Conversation
Note: 1.5 only. |
worth it. |
this also allows us to revive this PR: #1388 |
People have not all migrated to go 1.5. unlike the go 1.3 -> go 1.4 change, the go 1.5 change introduces major runtime differences, and possible problems. Everyone's still getting adjusted + still finding problems. I do not want to require go 1.5 yet. |
@jbenet but if we're providing prebuilt binaries, does it matter? |
@jbenet the api is also pretty broken in general without this. try catting a file larger than a few mbs |
Also, |
not seeing the problem? i agree we want to fix this and this is the way to fix it. i dont yet want to break go 1.4 compat. lots of people build from source who have not upgraded. myself included. |
I guess we can just sit on this PR until we're ready to jump to go1.5. I will be pressing for the 1.5 switch pretty heavily though, it will fix a large number of the random little api issues we see, as well as allow us to use the close notify stuff finally |
1f280e1
to
98088cb
Compare
ipfs/starship's dkr-shp can use this for tar and user image names, e.g., jbenet/go-ipfs. Tested to work. |
it appears that dkr-shp doesnt work without this. |
it worked for me, without this. i havent tested latest commit |
It worked for me only when using single-word-image-names. Which name did you use? |
i was using the the image id |
Got it. The issue is with user namespaces (which translate to paths in ipfs) and for some reason hyphens. The following did not work for me: Additionally, |
Can we get gobuilder to work with this branch? If so, it's just a matter of changing the version in starship...for now. |
yeah i think we can just ship a tag, gobuilder builds tags. the tar works for me, i was seeing the broken pipe stuff too and decided it was docker (it did it on outputting to |
This comment is written for this thread to appear in my https://github.com/notifications/participating instead of usual notifications. |
98088cb
to
2d44374
Compare
384e2aa
to
d41f1d9
Compare
@jbenet we want this to land in 0.3.8. |
@whyrusleeping ok. but first:
what happens if you try to compile Go 1.5.1 only code with Go 1.4? is there a good, meaningful error that says "this requires Go 1.5.1, please install it"? (i doubt it) if not:
|
Yes, if you can add a file and have the daemon stream the progress output ( |
@mappum @whyrusleeping there should be a sharness test for it, before this merges. |
verified this works locally. No idea how to write a sharness test for this, since the condition was 'streams output back while the file is being streamed to the server' |
c59631b
to
be086fa
Compare
There would be output coming from a curl. |
be086fa
to
a196a6c
Compare
Nearly impossible? Write a go tool that uses http pkg and use it from sharness. Straight forward. This problem has been plaguing users. We need to test it. Manual testing will not happen on every single commit going forward — On Mon, Oct 12, 2015 at 5:04 AM, Jeromy Johnson notifications@github.com
|
referring to doing it in shell. But yeah, i guess doing it in go might be a little easier... |
@jbenet to be clear, the test youre wanting to see is one that tests that the progress bar can be sent back before the request body sent by the client is complete? |
The test needed is something that would fail without this change (ie reproduces the problem before-- if it's intermittent run it many times back to back until it fails) but succeeds with this change. If the test you describe captures that, so be it, but I think it's more about the format screwing up, no? — On Mon, Oct 12, 2015 at 12:37 PM, Jeromy Johnson notifications@github.com
|
ooooookay. we were on two separate trains of thought again. |
alright, so the only place i've been able to somewhat reliably reproduce the issue is in the
|
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com> use go1.5 syntax to ensure builds on older versions fail License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com> fix t0230 License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
a196a6c
to
1e1213c
Compare
alright, so it looks like |
alright, up to 100 runs of that test. no failures so far. gonna leave it going for a little while just to be sure. |
alright, that ran for a while, no failures at all. |
@whyrusleeping so it fails in prior commits, but not this one? If so, how about we add it, and run the critical part N times (for an N that runs < 5s on avg). but let's make sure it does fail prior, and succeed now. |
(it's fine if <5s is not enough for triggering the failure, because as it is run tons of times, twice per PR, we'll likely see the failure). |
the test is already added. it merged in the bitswap-fix PR (right before this one). Do you want to change the test to run multiple times? |
I have run the test multiple times before the PR and it does indeed fail, as shown in #1621 (comment) |
@whyrusleeping ok i'll just merge this. ideally we would run it however many times it takes to make it a deterministic failure in the last commit (is that 1 time?). |
use go's built in handling of trailers and dont do custom chunking
Warning to users who compile: from now on, go-ipfs will only build in Go 1.5.1 and later. Everyone should update their compiler. |
It turns out they implemented http trailers in go's std http lib. I am happy.
License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com