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

fix: catch CancelledError and TimeoutError and add note about timeout #679

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

karel-rehor
Copy link
Contributor

@karel-rehor karel-rehor commented Nov 22, 2024

Closes #671

Proposed Changes

in flux_csv_parser catch CancelledError and TimeoutError and add a note to check the client timeout setting.

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@karel-rehor karel-rehor requested a review from bednar November 22, 2024 16:09
@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 90.36%. Comparing base (012c50a) to head (36888b0).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
influxdb_client/client/flux_csv_parser.py 0.00% 5 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #679      +/-   ##
==========================================
- Coverage   90.49%   90.36%   -0.13%     
==========================================
  Files          40       40              
  Lines        3534     3539       +5     
==========================================
  Hits         3198     3198              
- Misses        336      341       +5     

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


🚨 Try these New Features:

@@ -1,6 +1,6 @@
"""Parsing response from InfluxDB to FluxStructures or DataFrame."""


import asyncio
Copy link
Contributor

Choose a reason for hiding this comment

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

sync client doesn't include asyncio library. You have to check the type by name... maybe something like:

elif 'DataFrame' in type(record).__name__:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to catch BasicException and then check type. import asyncio removed.

@karel-rehor karel-rehor marked this pull request as ready for review November 25, 2024 13:07
Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@karel-rehor karel-rehor merged commit 44dd00e into master Nov 25, 2024
16 checks passed
@karel-rehor karel-rehor deleted the fix/AsyncCsvErrors branch November 25, 2024 13:49
@bednar bednar added this to the 1.48.0 milestone Nov 26, 2024
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.

The error asyncio.exceptions.CancelledError occurred while parsing the CSV.
3 participants