Skip to content
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

Remove ServerResponse.AsyncBuilder interface #33736

Closed
bclozel opened this issue Oct 17, 2024 · 2 comments
Closed

Remove ServerResponse.AsyncBuilder interface #33736

bclozel opened this issue Oct 17, 2024 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Oct 17, 2024

In #32710, we introduced a new contract for streaming responses with MVC functional endpoints. While doing, so we introduced a new interface ServerResponse.AsyncBuilder to gather async concerns under the same shared interface (error/complete/timeout).

This avoids duplication, but this also introduces a binary incompatible change that is problematic in case projects want to maintain compatibility with two generations of Spring Framework. While we don't usually guarantee binary compatibility between minor versions, here Spring for GraphQL is relying on that and will not ship a new minor version with the next release train.

Here is an example of a build failure.

We should undo this change and re-introduce it with the next major Spring Framework version.

@bclozel bclozel added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement labels Oct 17, 2024
@bclozel bclozel added this to the 6.2.0 milestone Oct 17, 2024
@bclozel bclozel self-assigned this Oct 17, 2024
@spencergibb
Copy link
Member

I think spring cloud gateway was impacted spring-cloud/spring-cloud-gateway@1abf9b8

@bclozel
Copy link
Member Author

bclozel commented Oct 17, 2024

We're not going to remove the new stream method, but rather move back the following methods back to the original ServerResponse.SseBuilder interface:

  • void error(Throwable t)
  • void complete()
  • B onTimeout(Runnable onTimeout)
  • B onError(Consumer<Throwable> onError)
  • B onComplete(Runnable onCompletion)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants