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

Don't emit null values from SSE #36450

Merged
merged 1 commit into from
Oct 13, 2023
Merged

Don't emit null values from SSE #36450

merged 1 commit into from
Oct 13, 2023

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Oct 12, 2023

This is because those values break
Multi (as specified by Reactive Streams)

This is because those values break
Multi (as specified by Reactive Streams)
@geoand geoand requested a review from cescoffier October 12, 2023 14:54
Copy link
Member

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

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

Should we ignore these null values (your fix) or fail (previous behavior). I don't have a strong opinion, but we need to document the change

@geoand
Copy link
Contributor Author

geoand commented Oct 12, 2023

The reason I think we should fail is that the deserialization library may choose to return null if there is no valid data but no parsing exception either.

@geoand
Copy link
Contributor Author

geoand commented Oct 12, 2023

Furthermore, there are APIs that push a sentinel value which can be deserialized according to the schema of the real data - if we handle these values as null then with this PR the stream can be consumed - otherwise users have to resort to manually performing the deserilization.

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 12, 2023

✔️ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@geoand geoand merged commit 01240b9 into quarkusio:main Oct 13, 2023
31 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.6 - main milestone Oct 13, 2023
@geoand geoand deleted the sse-null branch October 13, 2023 05:04
@geoand
Copy link
Contributor Author

geoand commented Oct 19, 2023

I forgot to mark this one for backport to 3.5 :(. Added the label now

@gsmet gsmet modified the milestones: 3.6 - main, 3.5.1 Oct 26, 2023
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