fix(ibis): Resolved MySQL connection error when password is None#1212
fix(ibis): Resolved MySQL connection error when password is None#1212goldmedal merged 1 commit intoCanner:mainfrom
Conversation
WalkthroughThe change updates the logic for passing the MySQL password in the connection function, ensuring that an empty string is used instead of None when no password is provided. This adjustment affects how the password argument is handled during MySQL connection setup. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant DataSource
participant MySQL
Caller->>DataSource: Request MySQL connection
DataSource->>DataSource: Check if password exists
alt Password exists
DataSource->>MySQL: Connect using password.get_secret_value()
else No password
DataSource->>MySQL: Connect using empty string as password
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
goldmedal
left a comment
There was a problem hiding this comment.
Thanks @ongdisheng. It makes sense to me 👍
Description
This PR fixes a
TypeErrorraised during MySQL connection when the password field isNone. Although thepasswordfield is optional and defaults toNone, passingNonedirectly toibis.mysql.connect()causes the following error:Canner/WrenAI#1088
Summary by CodeRabbit
Nonewhen no password is set.