Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces token-based authentication for TMQ (TDengine Message Queue) consumers within the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #385 +/- ##
==========================================
+ Coverage 81.95% 82.00% +0.04%
==========================================
Files 24 24
Lines 3713 3717 +4
==========================================
+ Hits 3043 3048 +5
+ Misses 670 669 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds TMQ (consumer) support for authenticating with a bearer token, allowing token-based auth to be provided via either the Python conf dict or DSN query parameters.
Changes:
- Add parsing/normalization of
td.connect.bearer_token/bearer_tokeninto the TMQ consumer DSN configuration. - Add enterprise-only TMQ tests covering valid/invalid bearer token usage and key precedence.
- Update the Rust
taosgit dependency source used bytaos-ws-py.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
taos-ws-py/src/consumer.rs |
Accepts bearer token config keys from dict and DSN, normalizing td.connect.bearer_token to bearer_token. |
taos-ws-py/tests/test_tmq.py |
Adds enterprise-only tests validating TMQ can subscribe using bearer tokens and fails with invalid tokens. |
taos-ws-py/Cargo.toml |
Switches taos dependency from main to a feature branch. |
taos-ws-py/Cargo.lock |
Updates locked git sources to match the new taos dependency branch/commit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request adds support for token-based authentication to the TMQ consumer. The changes in the Rust implementation correctly handle the new configuration options for bearer tokens, and new Python tests cover different ways of providing the token. I've identified a few areas for improvement:
- The
Cargo.tomldependency points to a feature branch, which should be updated before merging. - The new tests use hardcoded names for database objects, which could be made more robust by using dynamically generated names.
- The test for token authentication could be strengthened by verifying message consumption, not just successful subscription.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 13 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
feat: tmq supports token
Issue(s)
Checklist
Please check the items in the checklist if applicable.