Skip to content

Conversation

@rossabaker
Copy link
Member

@rossabaker rossabaker commented May 14, 2023

Backport #194, which should have targeted this branch. This fixes the cancellation semantics of cats-effect-3.5.

@rossabaker rossabaker changed the title Http4s 0.23.19 for 0.23 Upgrade to http4s-0.23.19 May 14, 2023
@rossabaker rossabaker added this to the 0.23.14 milestone May 14, 2023
@rossabaker
Copy link
Member Author

This has failed a few times, and I'm too sleepy to figure it out tonight:

==> X org.http4s.servlet.RouterInServletSuite.Http4s servlet should handle alternative-root request  30.005s java.util.concurrent.TimeoutException: Future timed out after [30 seconds]
    at scala.concurrent.impl.Promise$DefaultPromise.tryAwait0(Promise.scala:248)
    at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:261)
    at scala.concurrent.Await$.$anonfun$result$1(package.scala:201)
    at cats.effect.unsafe.WorkerThread.blockOn(WorkerThread.scala:835)
    at scala.concurrent.Await$.result(package.scala:124)
    at munit.internal.PlatformCompat$.$anonfun$waitAtMost$1(PlatformCompat.scala:21)
    at scala.util.Try$.apply(Try.scala:210)
    at munit.internal.PlatformCompat$.waitAtMost(PlatformCompat.scala:21)
    at munit.FunSuite.waitForCompletion(FunSuite.scala:51)
    at munit.FunSuite.$anonfun$test$1(FunSuite.scala:37)
    at munit.MUnitRunner.$anonfun$runTestBody$1(MUnitRunner.scala:296)


case Complete => cb(rightNone)

case Canceled => cb(Left(new CancellationException("Servlet read was canceled")))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is ever going to be read, and we could just do a no-op cancel token (which is effectively how it has worked for years), but this at least gets us to a terminal state. The same is true on the write side.

@rossabaker
Copy link
Member Author

This ran safely three times. I'm declaring victory.

@rossabaker rossabaker merged commit 51943d5 into series/0.23 Jun 12, 2023
@rossabaker rossabaker deleted the http4s-0.23.19-for-0.23 branch May 8, 2025 19:23
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.

4 participants