Skip to content

Conversation

tmetzke
Copy link
Member

@tmetzke tmetzke commented Aug 13, 2025

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

@tmetzke tmetzke self-assigned this Aug 13, 2025
@github-actions github-actions bot added the component/zeebe Related to the Zeebe component/team label Aug 13, 2025
@tmetzke tmetzke force-pushed the 23075-non-null-client-responses branch 2 times, most recently from f05387f to 23d5c94 Compare August 21, 2025 14:10
@tmetzke tmetzke requested review from ThorbenLindhauer, eppdot and a team August 21, 2025 14:11
@tmetzke tmetzke mentioned this pull request Aug 22, 2025
1 task
Copy link
Contributor

@eppdot eppdot left a 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,
Copy link
Contributor

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.

Copy link
Member Author

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?

Copy link
Contributor

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)

Copy link
Member Author

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

Copy link
Member Author

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

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.
@tmetzke tmetzke force-pushed the 23075-non-null-client-responses branch from 23d5c94 to d570118 Compare August 22, 2025 12:52
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.
@github-actions github-actions bot added component/tasklist Related to the Tasklist component/team component/optimize Related to Optimize component/team deprecated-client This pull request updates the Zeebe client. Please verify if updates to Camunda client are needed labels Aug 22, 2025
@tmetzke tmetzke added this pull request to the merge queue Aug 22, 2025
Merged via the queue into main with commit da6a2b5 Aug 22, 2025
120 of 121 checks passed
@tmetzke tmetzke deleted the 23075-non-null-client-responses branch August 22, 2025 18:57
@tmetzke
Copy link
Member Author

tmetzke commented Aug 22, 2025

Merged to avoid piling up merge conflicts. Any follow ups we identify can be tackled as such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/optimize Related to Optimize component/team component/tasklist Related to the Tasklist component/team component/zeebe Related to the Zeebe component/team deprecated-client This pull request updates the Zeebe client. Please verify if updates to Camunda client are needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty responses should not result in a null future in the client
2 participants