Skip to content

Conversation

@domaspoliakas
Copy link

Hello!

I hope it's ok to open a PR directly without an issue first.

This PR upgrades the http4s jdk client to 0.7.0. 0.7.0 is not binary-compatible with 0.5.0, so this is necessary if the downstream users (me 😄 ) wish to upgrade the jdk client.

I couldn't run tests because I don't have minikube set up. I'm hoping CI will catch anything that could be a problem, although the changes themselves are very straightforward.

Let me know if there's anything else that needs to be done!

@joan38
Copy link
Owner

joan38 commented Jun 9, 2022

Hi! Thanks for submitting a PR!
Looks like it's failing.

@domaspoliakas
Copy link
Author

Thanks for that! I'll see if I can get minikube set up and debug these issues.

@joan38 joan38 changed the title Upgraded to the jdk client version 0.7.0 Upgraded to the jdk client version 0.9.1 Oct 9, 2023
@joan38
Copy link
Owner

joan38 commented Oct 9, 2023

Tests failing with 0.9.1, maybe related to http4s/http4s-jdk-http-client#116

@yurique
Copy link
Collaborator

yurique commented Nov 25, 2023

I added this pipe to the ws connection streams to deal with the IOExceptions:

  private def skipConnectionClosedErrors: Pipe[F, WSDataFrame, WSDataFrame] =
    _.map(_.some)
      .recover {
        // Need to handle (and ignore) this exception
        //
        // Because of the "conflict" between the http4s WS client and
        // the underlying JDK WS client (which are both high-level clients)
        // an extra "Close" frame gets sent to the server, potentially
        // after the TCP connection is closed, which causes this exception.
        //
        // This will be solved in a later version of the http4s (core or jdk).
        case e: java.io.IOException if e.getMessage == "closed output" => none
      }
      .unNone

Also changed the return type of the PodsApi#execStream from this:

Resource[F, F[Stream[F, Either[ExecStream, ErrorOrStatus]]]]

to this:

Stream[F, Either[ExecStream, ErrorOrStatus]]

pod tests passed locally for me

@yurique yurique requested a review from joan38 November 25, 2023 15:30
@joan38 joan38 changed the title Upgraded to the jdk client version 0.9.1 Upgraded to the jdk client version 0.10.0 Feb 3, 2025
@joan38 joan38 force-pushed the jdk-0.7.0 branch 3 times, most recently from ec9a47d to 9b3f1d6 Compare February 3, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants