-
Notifications
You must be signed in to change notification settings - Fork 809
feat: allow multiple flushes when decoding report status #1597
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
base: main
Are you sure you want to change the base?
Conversation
if err != nil && !errors.Is(err, io.EOF) { | ||
// TODO: We should not ignore EOF errors here. Decoding a report-status | ||
// message ends with a flush-pkt, an EOF indicates that the flush-pkt | ||
// was not received. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that TODO was already done before as you check if flush was received and return error if not.
Now that I think it should be probably made optional based on progress is provided or not. |
Hi @UrosSimovic, thank you for starting this discussion and opening this issue. The |
@aymanbagabas thank you for the reply. Just ftr, I don't know a lot about git internals, just went deep dive with this PR. If I get this correctly, report status works just fine. But the problem is in whatever git remote sends afterwards. By canonical Git you mean vanilla git? I did indeed tested GitLab, GitHub, and local git with dummy echo in post receive script. And only one that works is GitHub, as it sends single flush only at the very end, where both gitlab and local git are sending first flush after report status, and another one at the end where various additional remote messages could be (e.g. link to open gitlab merge request) The whole reading is done the method I touched and sending to sideband demuxer. That why I went down here. And it works. When I provide a |
Looking deeper into this, I found a bug in the You can notice that GitLab does not send their post-receive server updates when the client is Go-git. GitHub works find and we get the same result for either client. Needs further investigation :/ I've opened #1604 and go-git/cli#14 to fix the issues I found debugging this. git cli (gitlab):
Go-git cli:
git cli (github):
Go-git cli (github):
|
That is not true. It sends it just fine, but go-git stops reading it after first flush. If you check both of your git cli debug outputs, the diff between them is that gitlab (as well as vanilla git by my findings)
And this PR tries to fix exactly that - don't stop reading the output after first flush. ![]() |
More info about the problem I tried to fix can be found in the #1571.
Does this make sense? Is there any particular reason we want to stop reading on after receiving first flush?