-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix #4910 / #4923 addressing inconsistent behavior with exec streams #4959
Conversation
https://github.com/fabric8io/kubernetes-client/actions/runs/4376515845/jobs/7659072908#step:6:450 confirms a fresh instance where some of the stdIn upload is dropped. Options here include:
https://github.com/fabric8io/kubernetes-client/actions/runs/4268450566/jobs/7430955144#step:5:448 since there is no upload could be an issue with stdOut download - but I could never quite confirm that locally. Initially it seemed like an issue with the stream close, but that turned out to not be the case. I'd like to get another reproduction of that locally or via the github runs before drawing more conclusions about how to proceed. |
@manusa the first commit addresses the vertx close problem and some misc. cleanups. The second commit was speculative change - basically throwing a few more messages at the server and a little wait to help ensure that what was already sent is processed. This was done as a first attempt because I couldn't think of a good way an inline, or a post check that wouldn't require even more code. However it also does not appear to be resilient - at least for github execution - so it was removed. |
cdad995
to
3985d24
Compare
So from the final code changes I see we're addressing 3 things here:
There still remains a few issues to solve:
I'll keep #4910 and #4923 open until we create follow-up issues. please feel free to edit this comment to make it more accurate |
I also think that we might want to add a little complexity to the upload operation (maybe also consolidate into a single implementation regardless of file or directory -like you proposed-). Perform 2 commands, one for the upload, one for the checksum. The upload command is only completed (local close processing is delayed) after the second command is successful. The checksum command is executed after the upload completes (websocket remains open) and is retried |
…with exec streams
Kudos, SonarCloud Quality Gate passed! |
Description
Only 1 real issue was fully tracked down with #4910 / #4923 - vertx closeHandler is immediate. That needs changed to the endHandler, which is notified in order. Reviewing the vertx logic does also highlight that we'll have a problem if the server ever does send a ping - but that should not currently be the case. The only "ping" sent currently is the 0 byte message.
For the common failures some additional debugging has been added to the failure message to narrow in on where the problem lies.
I had thought there was a concurrency issue with PodOperationsImpl.readTo, but that shouldn't be the case - the stream was still being closed in the calling method's try.
Type of change
test, version modification, documentation, etc.)
Checklist