camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.11k stars 1.55k forks source link

BulkResponse Error not logged correctly, leading to NPE #4723

Open PHWaechtler opened 2 days ago

PHWaechtler commented 2 days ago

Environment (Required on creation)

Observed in Optimize 7, but also affects Optimize 8 (creating separate ticket for Opt8) Needs merged to master and backported to 3.14.

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)

While migrating ES code, an issue was introduced when logging errors for bulkrequests. The log expects each item in a given bulkResponse to have a printable error. However, only some items may have errors so this can lead to an NPE while logging.

Steps to reproduce (Required on creation)

Not easily reproducable, we can skip QA and just do engineering review

Observed Behavior (Required on creation)

NPE during logging

Expected behavior (Required on creation)

No NPE

Root Cause (Required on prioritization)

The logging code expects each item in a given bulkResponse to have a printable error. However, only some items may have errors so this can lead to an NPE while logging.

Solution Ideas

Add in check to skip bulk items that do not have an error

Hints

Links

https://jira.camunda.com/browse/SUPPORT-24008

Breakdown

### Pull Requests
- [ ] https://github.com/camunda/camunda-optimize/pull/14505
- [ ] https://github.com/camunda/camunda-optimize/pull/14512

Dev2QA handover

PHWaechtler commented 2 days ago

For reference, here is the Opt8 ticket

grlimacan commented 1 day ago

/eng approve

grlimacan commented 1 day ago

@PHWaechtler please link the ticket to the Optimize 8 repository here as well. And please check/correct the text, since this needs backporting to 3.14 and 8.6 (not 3.13/8.5)

PHWaechtler commented 1 day ago

@PHWaechtler please link the ticket to the Optimize 8 repository here as well. And please check/correct the text, since this needs backporting to 3.14 and 8.6 (not 3.13/8.5)

already linked above 👍 Fixing versions too 🙏