betodealmeida commented on a change in pull request #14832:
URL: https://github.com/apache/superset/pull/14832#discussion_r639427479
##########
File path: superset/databases/commands/validate.py
##########
@@ -90,7 +92,7 @@ def run(self) -> None:
# try to connect
sqlalchemy_uri = engine_spec.build_sqlalchemy_uri(
- self._properties["parameters"], # type: ignore
+ self._properties.get("parameters", None), # type: ignore
Review comment:
We do validate the payload here:
https://github.com/apache/superset/blob/master/superset/databases/api.py#L1006
But we don't validate the parameters' schema, since they are dynamic (though
we could, it's just more complicated). And even if we did, adding a guard here
is great!
##########
File path: superset/db_engine_specs/base.py
##########
@@ -1427,7 +1427,7 @@ def validate_parameters(
)
return errors
- port = parameters["port"]
+ port = parameters.get("port", None)
Review comment:
Awesome!
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]