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

Sse difference in empty event between non-reactive and reactive output #37033

Closed
jedla97 opened this issue Nov 13, 2023 · 5 comments · Fixed by #37036
Closed

Sse difference in empty event between non-reactive and reactive output #37033

jedla97 opened this issue Nov 13, 2023 · 5 comments · Fixed by #37036
Labels
area/rest kind/bug Something isn't working
Milestone

Comments

@jedla97
Copy link
Contributor

jedla97 commented Nov 13, 2023

Describe the bug

When sending event with empty data using reactive way the empty data is transformed in null. The same code using non-reactive return just empty data (which I think is correct).

Happening with quarkus-resteasy-reactive-*. More info available in reproducers.

Expected behavior

The reactive and non-reactive should have same output.

Actual behavior

With non-reactive output is

event: name=NOT EMPTY data={random data} and is empty: false
event: name=EMPTY data={} and is empty: true

With reactive output is

event: name=NOT EMPTY data={random data} and is empty: false
event: name=EMPTY data={null} and is empty: true

How to Reproduce?

For non-reactive

  1. git clone -b sse-non-reactive git@github.com:jedla97/quarkus-reproducers.git
  2. cd quarkus-reproducers
  3. mvn quarkus:dev -Dquarkus.platform.version=3.5.1
  4. Go to http://127.0.0.1:8080/sse/client

For reactive

  1. git checkout sse-native-method-404
  2. mvn quarkus:dev -Dquarkus.platform.version=3.5.1
  3. Go to http://127.0.0.1:8080/sse/client

The output is show in actual behavior section

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@jedla97 jedla97 added the kind/bug Something isn't working label Nov 13, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 13, 2023

/cc @FroMage (resteasy-reactive), @stuartwdouglas (resteasy-reactive)

geoand added a commit to geoand/quarkus that referenced this issue Nov 13, 2023
Using an empty string instead of null
is what the classic rest client does,
so let's align with it

Closes: quarkusio#37033
@geoand
Copy link
Contributor

geoand commented Nov 13, 2023

#37036 fixes the issue

geoand added a commit to geoand/quarkus that referenced this issue Nov 13, 2023
Using an empty string instead of null
is what the classic rest client does,
so let's align with it

Closes: quarkusio#37033
geoand added a commit that referenced this issue Nov 13, 2023
Use empty string in Sse event when there is no data
@quarkus-bot quarkus-bot bot added this to the 3.6 - main milestone Nov 13, 2023
phillip-kruger pushed a commit to phillip-kruger/quarkus that referenced this issue Nov 13, 2023
Using an empty string instead of null
is what the classic rest client does,
so let's align with it

Closes: quarkusio#37033
@michalvavrik
Copy link
Member

#35990 was backported, so I think this one should be as well

@quarkus-bot
Copy link

quarkus-bot bot commented Nov 21, 2023

@michalvavrik triage/backport* labels may not be added to an issue. Please add them to the corresponding pull request.

This message is automatically generated by a bot.

@michalvavrik
Copy link
Member

@michalvavrik triage/backport* labels may not be added to an issue. Please add them to the corresponding pull request.

This message is automatically generated by a bot.

sorry

computerlove pushed a commit to computerlove/quarkus that referenced this issue Nov 27, 2023
Using an empty string instead of null
is what the classic rest client does,
so let's align with it

Closes: quarkusio#37033
DavideD pushed a commit to DavideD/quarkus that referenced this issue Nov 27, 2023
Using an empty string instead of null
is what the classic rest client does,
so let's align with it

Closes: quarkusio#37033
@aloubyansky aloubyansky modified the milestones: 3.6.0.CR1, 3.2.10.Final Jan 14, 2024
aloubyansky pushed a commit to aloubyansky/quarkus that referenced this issue Jan 14, 2024
Using an empty string instead of null
is what the classic rest client does,
so let's align with it

Closes: quarkusio#37033
(cherry picked from commit 042aed2)
holly-cummins pushed a commit to holly-cummins/quarkus that referenced this issue Feb 8, 2024
Using an empty string instead of null
is what the classic rest client does,
so let's align with it

Closes: quarkusio#37033
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants