bito-code-review[bot] commented on code in PR #44718:
URL: https://github.com/apache/superset/pull/44718#discussion_r4119546619
##########
docs/user_docs_versioned_docs/version-6.1.0/databases/supported/apache-doris.mdx:
##########
@@ -161,3 +161,11 @@ export const databaseInfo = {
};
<DatabasePage name="Apache Doris" database={databaseInfo} />
+
+### TLS connections
Review Comment:
<!-- Bito Reply -->
The suggestion to change the heading level to `##` is appropriate. It
ensures consistency with the `TLS connections` section in the MySQL
documentation, which uses the same heading level for a top-level section
following the `<DatabasePage>` component.
**docs/user_docs_versioned_docs/version-6.1.0/databases/supported/apache-doris.mdx**
```
+## TLS connections
```
##########
superset/db_engine_specs/doris.py:
##########
@@ -276,8 +311,64 @@ class DorisEngineSpec(MySQLEngineSpec):
SupersetErrorType.SYNTAX_ERROR,
{},
),
+ DORIS_SYNTAX_ERROR_REGEX: (
+ _(
+ 'Please check your query for syntax errors near
"%(server_error)s". '
+ "Then, try running your query again."
+ ),
+ SupersetErrorType.SYNTAX_ERROR,
+ {},
+ ),
+ TABLE_DOES_NOT_EXIST_REGEX: (
+ _('The table "%(table_name)s" does not exist.'),
+ SupersetErrorType.TABLE_DOES_NOT_EXIST_ERROR,
+ {},
+ ),
+ SCHEMA_DOES_NOT_EXIST_REGEX: (
+ _('The schema "%(schema_name)s" does not exist.'),
+ SupersetErrorType.SCHEMA_DOES_NOT_EXIST_ERROR,
+ {},
+ ),
+ COLUMN_DOES_NOT_EXIST_REGEX: (
+ _('We can\'t seem to resolve the column "%(column_name)s".'),
+ SupersetErrorType.COLUMN_DOES_NOT_EXIST_ERROR,
+ {},
+ ),
}
+ @classmethod
+ def build_sqlalchemy_uri(
+ cls,
+ parameters: BasicParametersType,
+ encrypted_extra: Optional[dict[str, str]] = None,
+ ) -> str:
+ # Keep explicit hostname verification when rebuilding an encrypted URI.
+ if parameters.get("query", {}).get("ssl_mode") == "VERIFY_IDENTITY":
Review Comment:
<!-- Bito Reply -->
The suggestion to use named constants for TLS mode strings is valid and
would improve maintainability by preventing potential typos or drift in
security-critical connection semantics. While the current implementation
correctly handles the modes, centralizing these literals—as is done in other
parts of the codebase—is a recommended best practice for consistency and safety.
--
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]