Skip to content

feat: asynchronous query #123

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

Merged
merged 16 commits into from
Mar 26, 2025
Merged

feat: asynchronous query #123

merged 16 commits into from
Mar 26, 2025

Conversation

karel-rehor
Copy link
Contributor

@karel-rehor karel-rehor commented Mar 19, 2025

Closes #

Proposed Changes

  • add query_async method to query_api
  • move query ticket preparation statements to reusable methods in query_api
  • in query_async method wrap call to FlightClient.doGet in current event loop retrieved from asyncio
  • in query_async method wrap FlightStreamReader translations in same event loop
  • unit tests of changes to query_api
  • in InfluxDBClient3 expose these changes with new query_async method
  • unit and integration tests of changes to InfluxDBClient3
  • refactor flight server mocks and test utility functions to tests/util
  • in query_api.__init__() improve merge of _flight_client_options so that some values do not get dropped or overwritten

Checklist

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

Copy link

codecov bot commented Mar 19, 2025

Codecov Report

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

Project coverage is 61.92%. Comparing base (95477f8) to head (774885e).
Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
influxdb_client_3/__init__.py 66.66% 3 Missing ⚠️
influxdb_client_3/query/query_api.py 94.73% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
+ Coverage   61.63%   61.92%   +0.28%     
==========================================
  Files          33       33              
  Lines        2101     2135      +34     
==========================================
+ Hits         1295     1322      +27     
- Misses        806      813       +7     

☔ 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.

@karel-rehor karel-rehor marked this pull request as ready for review March 19, 2025 16:45
CHANGELOG.md Outdated
@@ -2,6 +2,10 @@

## 0.12.0 [unreleased]

### Features

1. [123](https://github.com/InfluxCommunity/influxdb3-python/pull/123): Introduces `query_async` method.
Copy link
Member

Choose a reason for hiding this comment

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

Please update the CHANGELOG to outline the next steps for achieving full asyncio support—e.g., indicating if the next PR will add async write functionality or something else along those lines.

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

@karel-rehor karel-rehor requested a review from bednar March 25, 2025 14:21
Copy link
Member

@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 1d9ed38 into main Mar 26, 2025
14 checks passed
@karel-rehor karel-rehor deleted the feat/async-query branch March 26, 2025 09:07
@karel-rehor karel-rehor added this to the 0.12.0 milestone Mar 26, 2025
@bednar bednar mentioned this pull request Apr 2, 2025
@bednar bednar mentioned this pull request Apr 2, 2025
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.

3 participants