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

Write SSE headers before subscribing #23840

Merged

Conversation

cescoffier
Copy link
Member

When using SSE send the headers (and flush them) as soon as we have the Publisher (so before subscription).

Fix #22762

@cescoffier cescoffier requested a review from geoand February 21, 2022 13:34
@gsmet
Copy link
Member

gsmet commented Feb 21, 2022

@cescoffier is it something we should backport? It looks annoying for people using SSE?

@cescoffier
Copy link
Member Author

@gsmet Yes, but let's wait for the CI to complete first :-D

@geoand geoand added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Feb 21, 2022
@cescoffier cescoffier force-pushed the write-sse-headers-before-subscription branch from f0d8337 to 23ab5a0 Compare February 21, 2022 15:59
@cescoffier
Copy link
Member Author

My first fix not totally correct. I'm more confident with this one.

@quarkus-bot
Copy link

quarkus-bot bot commented Feb 21, 2022

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building f0d8337

Status Name Step Failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 17 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Gradle Tests - JDK 11 Windows #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.devmode.JandexMultiModuleProjectDevModeTest.main line 21 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.test.devmode.util.DevModeTestUtils that uses java.util.function.Supplier, java.util.function.Supplierjava.util.concurrent.atomic.AtomicReference, java.util.concurrent.atomic.AtomicReferencejava.lang.String, java.lang.Stringboolean was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:164)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

⚙️ JVM Tests - JDK 11 #

- Failing: extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment 
! Skipped: extensions/apicurio-registry-avro/deployment extensions/avro/deployment extensions/grpc/deployment and 87 more

📦 extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment

io.quarkus.resteasy.reactive.server.test.stream.StreamTestCase.testSse line 214 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: expected: <[a, b, c]> but was: <[]>
	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
	at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)

⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/resteasy-reactive/quarkus-resteasy-reactive-jackson/deployment extensions/resteasy-reactive/quarkus-resteasy-reactive-jaxb/deployment extensions/resteasy-reactive/quarkus-resteasy-reactive-jsonb/deployment 
! Skipped: extensions/hibernate-reactive/deployment extensions/oidc-client-reactive-filter/deployment extensions/oidc-token-propagation-reactive/deployment and 34 more

📦 extensions/resteasy-reactive/quarkus-resteasy-reactive-jackson/deployment

io.quarkus.resteasy.reactive.jackson.deployment.test.sse.SseTestCase.testJsonMultiFromMultiWithDefaultElementType line 114 - More details - Source on GitHub

java.lang.AssertionError: 
[Extracted: name] 
Expecting actual:

io.quarkus.resteasy.reactive.jackson.deployment.test.sse.SseTestCase.testJsonMultiFromMulti line 109 - More details - Source on GitHub

java.lang.AssertionError: 
[Extracted: name] 
Expecting actual:

io.quarkus.resteasy.reactive.jackson.deployment.test.sse.SseTestCase.testMultiFromMulti line 89 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

io.quarkus.resteasy.reactive.jackson.deployment.test.sse.SseTestCase.testSseFromMulti line 53 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

📦 extensions/resteasy-reactive/quarkus-resteasy-reactive-jaxb/deployment

io.quarkus.resteasy.reactive.jaxb.deployment.test.SseResourceTest.testMultiFromMulti line 92 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

io.quarkus.resteasy.reactive.jaxb.deployment.test.SseResourceTest.testSseFromMulti line 56 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

📦 extensions/resteasy-reactive/quarkus-resteasy-reactive-jsonb/deployment

io.quarkus.resteasy.reactive.jsonb.deployment.test.sse.SseTestCase.testJsonMultiFromMultiWithDefaultElementType line 112 - More details - Source on GitHub

java.lang.AssertionError: 
[Extracted: name] 
Expecting actual:

io.quarkus.resteasy.reactive.jsonb.deployment.test.sse.SseTestCase.testJsonMultiFromMulti line 107 - More details - Source on GitHub

java.lang.AssertionError: 
[Extracted: name] 
Expecting actual:

io.quarkus.resteasy.reactive.jsonb.deployment.test.sse.SseTestCase.testMultiFromMulti line 87 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

io.quarkus.resteasy.reactive.jsonb.deployment.test.sse.SseTestCase.testSseFromMulti line 51 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

⚙️ JVM Tests - JDK 17 #

- Failing: extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment 
! Skipped: extensions/apicurio-registry-avro/deployment extensions/avro/deployment extensions/grpc/deployment and 87 more

📦 extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment

io.quarkus.resteasy.reactive.server.test.stream.StreamTestCase.testSse line 214 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: expected: <[a, b, c]> but was: <[]>
	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
	at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)

@cescoffier cescoffier merged commit 4a21e16 into quarkusio:main Feb 21, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Feb 21, 2022
@quarkus-bot quarkus-bot bot added kind/bugfix and removed triage/waiting-for-ci Ready to merge when CI successfully finishes labels Feb 21, 2022
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.2.Final Feb 21, 2022
@cescoffier cescoffier deleted the write-sse-headers-before-subscription branch March 15, 2022 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server Sent Events delaying 200 response
3 participants