codeant-ai-for-open-source[bot] commented on code in PR #44723:
URL: https://github.com/apache/superset/pull/44723#discussion_r4113724208
##########
superset/db_engine_specs/mysql.py:
##########
@@ -78,6 +80,78 @@
)
+def _require_mysql_verified_tls(
+ driver: str, query: dict[str, Any], args: dict[str, Any]
+) -> None:
+ """Use required verification on drivers without an encryption-only mode."""
+ options = {**query, **args}
+ # Connector/Python has no REQUIRED mode: certificate verification is
+ # necessary to prevent its opportunistic fallback to cleartext.
+ if options.get("ssl_disabled"):
+ raise ValueError("MySQL SSL request conflicts with ssl_disabled")
Review Comment:
**Suggestion:** URI values are strings, so `ssl_disabled=0` or
`ssl_disabled=false` is truthy here and incorrectly rejects a non-disabling
override.
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Rarely` ยท ๐ท๏ธ `Incorrect condition
logic`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=aacef27aea7a4dd581e02e1a12a56d41&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=aacef27aea7a4dd581e02e1a12a56d41&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent ๐ค </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/db_engine_specs/mysql.py
**Line:** 90:91
**Comment:**
*Incorrect Condition Logic: URI values are strings, so `ssl_disabled=0`
or `ssl_disabled=false` is truthy here and incorrectly rejects a non-disabling
override.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44723&comment_hash=846abbc6ff85d35a0dba6e269e43f2c595c2c7272e37448c5f4ca2485e30c2ca&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44723&comment_hash=846abbc6ff85d35a0dba6e269e43f2c595c2c7272e37448c5f4ca2485e30c2ca&reaction=dislike'>๐</a>
##########
superset/db_engine_specs/mysql.py:
##########
@@ -445,6 +519,8 @@ def adjust_engine_params(
if schema:
uri = uri.set(database=parse.quote(schema, safe=""))
+ if cls.engine == "mysql":
+ return require_mysql_tls(uri, new_connect_args)
Review Comment:
**Suggestion:** `AuroraMySQLDataAPI` inherits `engine = "mysql"` and
produces `ssl=1`, but its `auroradataapi` driver is rejected here, breaking
encrypted Aurora Data API connections.
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Sometimes` ยท ๐ท๏ธ `Api mismatch`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=c261fa48e7bb449bad9b0bfab637da60&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=c261fa48e7bb449bad9b0bfab637da60&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent ๐ค </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/db_engine_specs/mysql.py
**Line:** 522:523
**Comment:**
*Api Mismatch: `AuroraMySQLDataAPI` inherits `engine = "mysql"` and
produces `ssl=1`, but its `auroradataapi` driver is rejected here, breaking
encrypted Aurora Data API connections.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44723&comment_hash=4350c02df7f0f6638ffe9199f60a030373da2cd9c1ca3702cce86c44394b0a86&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44723&comment_hash=4350c02df7f0f6638ffe9199f60a030373da2cd9c1ca3702cce86c44394b0a86&reaction=dislike'>๐</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]