-
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 #3856: removing the PodUploadWebSocketListener #4110
Conversation
3b6af7f
to
a0145e1
Compare
I have a follow up set of changes to implement #4112 - which also makes public the ability to terminate on error. I can include them on this pr or open a separate one once this is merged. A bigger change that was required was to eliminate the usage of piped streams - we can't ensure the thread guarantee with other http client implementations, so we should shouldn't use them internally, have them in the api, and call out to not use them. However that coupled with adding back pressure adds some complexity to the replacement stream / websocket logic. |
kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/dsl/ExecWatch.java
Outdated
Show resolved
Hide resolved
…nt/dsl/ExecWatch.java Co-authored-by: Chris Laprun <metacosm@users.noreply.github.com>
SonarCloud Quality Gate failed. |
@Builder(toBuilder = true) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter |
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'm happy with the switch to Lombok (there's some partial usage scattered all around).
However, I'm not sure why you decided to use Lombok for this class in the scope of this PR.
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.
It relates more to the follow on pr #4115 - I had already started on some of those changes and was wanting to make it easier to manipulate the context.
Maybe too late but I'm not sure how well Lombok will play with Quarkus when it comes to native compilation and library size… |
lombok is already used in other places, for example the model classes. I don't recall that it inhibited native compilation there. |
Description
This aligns all of the Exec / Pod upload logic into a single listener.
It moves the send queue logic onto the ExecWebSocketListener. To bypass the usage of pipes there is an internal feature that exposes an OutputStream via ExecWatch.getInput - we could consider exposing that for end users as well. The flag for that also enables the ExecWebSocketListener to terminate when an error is seen on stdErr - that again could also a feature that is exposed to users.
Much of the other changes are around simplifying the PodOperationContext (switched to a lombok builder) and related methods.
There were a couple of existing bugs / issues as well:
@rohanKanojia @manusa I've opened this as a draft as I'll add more tests / docs, but would also like some feedback on exposing the terminate on error and direct input stream to users.
Type of change
test, version modification, documentation, etc.)
Checklist