-
Notifications
You must be signed in to change notification settings - Fork 41
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
chore(ibis): Support additional PyMySQL configuration via kwargs #1018
Conversation
WalkthroughThe pull request introduces an enhancement to the MySQL connection configuration in the Ibis server. A new optional Changes
Sequence DiagramsequenceDiagram
participant User
participant MySqlConnectionInfo
participant DataSourceExtension
participant PyMySQL
User->>MySqlConnectionInfo: Create connection info with optional kwargs
MySqlConnectionInfo-->>DataSourceExtension: Pass connection info
DataSourceExtension->>PyMySQL: Establish connection with extra parameters
PyMySQL-->>DataSourceExtension: Connection established
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
ibis-server/app/model/__init__.py (1)
98-100
: Consider supporting broader data types for kwargs.Currently,
kwargs
is defined asdict[str, str]
. Some PyMySQL arguments (especially SSL options) may require booleans, numeric values, or nested dictionaries. Consider either supporting a more accommodating type or clarifying that only string-based parameters are expected. Also ensure you test how these kwargs get passed and interpreted by PyMySQL.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
ibis-server/app/model/__init__.py
(1 hunks)ibis-server/app/model/data_source.py
(1 hunks)
🔇 Additional comments (1)
ibis-server/app/model/data_source.py (1)
134-134
: Validate overlap of existing parameters with kwargs.
When passing **info.kwargs
, keys in kwargs
might conflict with or overshadow named parameters like host
, port
, etc. Confirm this behavior is correct, and if necessary, warn or sanitize overlapping keys to avoid confusion. This helps ensure predictable connections and user experience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ongdisheng, look great!
Edited the PR title and description to better align with the changes introduced and improve clarity :D. |
Description
This PR adds a
kwargs
parameter to allow users to pass additional keyword arguments toPyMySQL
for enhanced configurability. Defaults toNone
.