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

refactor(elasticsearch-exporter): output raw message on JSON error #10971

Merged
merged 2 commits into from
Nov 11, 2022

Conversation

npepinpe
Copy link
Member

Description

Ensures that the raw message is printed as part of the stacktrace when the server returns a successful, but invalid message, so we can more easily diagnose what is happening.

Related issues

closes #10970

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/1.3) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • If the PR changes how BPMN processes are validated (e.g. support new BPMN element) then the Camunda modeling team should be informed to adjust the BPMN linting.

Please refer to our review guidelines.

Ensures that the raw message is printed as part of the stacktrace when
the server returns a successful, but invalid message, so we can more
easily diagnose what is happening.
@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2022

Test Results

   953 files  ±    0     953 suites  ±0   1h 41m 11s ⏱️ + 1m 24s
7 619 tests  - 154  7 612 ✔️  - 154  7 💤 ±0  0 ±0 
7 818 runs   - 154  7 809 ✔️  - 154  9 💤 ±0  0 ±0 

Results for commit fe5a75d. ± Comparison against base commit 9147aff.

♻️ This comment has been updated with latest results.

Copy link
Member

@Zelldon Zelldon left a comment

Choose a reason for hiding this comment

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

I guess I'm a bit rusty in the HTTP client API, but I got it now after a while :D Thanks 👍

@npepinpe
Copy link
Member Author

Your comment made me realize I should make it more explicit why we're doing this. Someone who's unaware of this error reporting behavior but aware that Jackson can deserialize an InputStream may, legitimately, revert this for a low hanging fruit, performance-wise.

@npepinpe
Copy link
Member Author

bors merge

zeebe-bors-camunda bot added a commit that referenced this pull request Nov 11, 2022
10971: refactor(elasticsearch-exporter): output raw message on JSON error r=npepinpe a=npepinpe

## Description

Ensures that the raw message is printed as part of the stacktrace when the server returns a successful, but invalid message, so we can more easily diagnose what is happening.

## Related issues

closes #10970 



Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com>
@zeebe-bors-camunda
Copy link
Contributor

Build failed:

@npepinpe
Copy link
Member Author

bors r+

@zeebe-bors-camunda
Copy link
Contributor

Build succeeded:

@backport-action
Copy link
Collaborator

Successfully created backport PR #10981 for stable/8.1.

zeebe-bors-camunda bot added a commit that referenced this pull request Nov 11, 2022
10981: [Backport stable/8.1] refactor(elasticsearch-exporter): output raw message on JSON error r=npepinpe a=backport-action

# Description
Backport of #10971 to `stable/8.1`.

relates to #10970

Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com>
@remcowesterhoud remcowesterhoud added the version:8.1.4 Marks an issue as being completely or in parts released in 8.1.4 label Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version:8.1.4 Marks an issue as being completely or in parts released in 8.1.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poor error handling in Elasticsearch exporter of incorrect response parsing
4 participants