EnxDev commented on code in PR #36880:
URL: https://github.com/apache/superset/pull/36880#discussion_r3194323280
##########
superset/commands/database/validate.py:
##########
@@ -65,8 +72,17 @@ def run(self) -> None:
),
)
- # perform initial validation
+ # perform initial validation (host, port, database, username)
errors = engine_spec.validate_parameters(self._properties) # type:
ignore
+
+ # Collect database_name errors along with parameter errors
+ if database_name_error := self._get_database_name_error():
+ errors.append(database_name_error)
+
+ # Collect SSH tunnel errors
+ ssh_tunnel_errors = self._get_ssh_tunnel_errors()
+ errors.extend(ssh_tunnel_errors)
+
Review Comment:
Pinging on this — I checked `validate_parameters` in `base.py` and it only
validates the connection parameters (host, port, username, database). The
display `database_name` (the user-facing label) was never validated there, so
the new `_get_database_name_error` is the only path checking uniqueness. Happy
to refactor differently if you had something else in mind.
--
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]