-
Notifications
You must be signed in to change notification settings - Fork 693
feat: return empty responses instead of null #36748
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
Conversation
f05387f
to
23d5c94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in general look good to me 👍 nice work. I have just noticed that the naming of the command and req/res classes are not consistent overall (not specifically in your PR)
Pre-approve 😄 with the expectation that all tests are green before merge.
"/clock", | ||
jsonMapper.toJson(request), | ||
httpRequestConfig.build(), | ||
PinClockResponseImpl::new, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 Here we have a bit of a different naming schema than the other commands, shouldn't it be ClockPinResponse
or PinClockCommandImpl
- I guess the latter one 😄, but that was already there, thus probably irrelevant for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the whole clock command naming is inconsistent with most other commands 🤷 I went for the consistent response class name to stay consistent there. We could change the command name as well. It's a breaking change from Zeebe client to Camunda client but I guess it's fine because it's experimental?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we don't change it now, we can never change it again 😄 (public api commitment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, here you go: 70eb9cf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up docs PR: camunda/camunda-docs#6487
clients/java/src/main/java/io/camunda/client/impl/command/JobUpdateCommandImpl.java
Show resolved
Hide resolved
clients/java/src/main/java/io/camunda/client/impl/command/UnassignRoleFromUserCommandImpl.java
Show resolved
Hide resolved
clients/java/src/main/java/io/camunda/client/impl/response/SetVariablesResponseImpl.java
Outdated
Show resolved
Hide resolved
zeebe/qa/integration-tests/src/test/java/io/camunda/zeebe/it/client/command/ThrowErrorTest.java
Show resolved
Hide resolved
In the HTTP client, commands that receive empty results from 204 endpoints return empty results as well instead of `null` values.
In the Java client, transform empty HTTP responses to non-null client response objects. Note: The ThrowErrorCommandImpl returns a non-null response now as well for gRPC and REST.
Selectively verifies that empty HTTP responses lead to non-null client responses once for each HTTP method.
Creates default responses for search and statistics requests to cover cases where the response is not relevant.
Creates responses for requests to cover cases where the response is not relevant.
23d5c94
to
d570118
Compare
Handles form get requests for user tasks without form gracefully. An empty result is returned, which needs to be mapped accordingly.
Adjusts methods in the CamundaClient for consistency. All commands now use the "<action><entity>Command" pattern. BREAKING CHANGE: renames API methods for consistency. The CamundaClient class is a new class in 8.8, so this is OK.
Merged to avoid piling up merge conflicts. Any follow ups we identify can be tackled as such. |
Description
In the Java client, commands that receive empty results from 204 endpoints return empty results as well instead of
null
values.Checklist
Related issues
closes #23075