Skip to content

Conversation

@JSCU-CNI
Copy link
Contributor

@JSCU-CNI JSCU-CNI commented Aug 7, 2025

This PR improves the exception message thrown when the Elastic adapter attempts to write documents that get rejected by the remote Elasticsearch server.

@codecov
Copy link

codecov bot commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.50%. Comparing base (9775ddb) to head (f3906ff).

Files with missing lines Patch % Lines
flow/record/adapter/elastic.py 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #178      +/-   ##
==========================================
+ Coverage   82.25%   83.50%   +1.25%     
==========================================
  Files          34       34              
  Lines        3652     3608      -44     
==========================================
+ Hits         3004     3013       +9     
+ Misses        648      595      -53     
Flag Coverage Δ
unittests 83.50% <77.77%> (+1.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@yunzheng yunzheng left a comment

Choose a reason for hiding this comment

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

Oops, I remember reviewing this PR but it seems I forgot to add my actual review notes.

I was thinking maybe we can use Exception.add_note() here, that could be more clean. See also:

However, this is a feature introduced in Python 3.11 but we still support Python 3.10 until EOL (2026-10). Luckily there is a backport package called exceptiongroup that we can use until we drop support.

Is this something you can explore for this PR? If not, i'm also happy to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants