mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 20:06:19 +00:00
MINOR: Fix none password issue for mysql and postgresql databases (#17548)
* fix none password issue * added warning
This commit is contained in:
parent
0d1b4e0747
commit
bbe92e2af3
@ -33,6 +33,9 @@ from metadata.generated.schema.entity.services.connections.database.common.iamAu
|
||||
from metadata.ingestion.connections.headers import inject_query_header_by_conn
|
||||
from metadata.ingestion.connections.secrets import connection_with_options_secrets
|
||||
from metadata.utils.constants import BUILDER_PASSWORD_ATTR
|
||||
from metadata.utils.logger import cli_logger
|
||||
|
||||
logger = cli_logger()
|
||||
|
||||
|
||||
@connection_with_options_secrets
|
||||
@ -152,6 +155,9 @@ def _add_password(url: str, connection) -> str:
|
||||
Region=connection.authType.awsConfig.awsRegion,
|
||||
)
|
||||
)
|
||||
if not password:
|
||||
logger.warning("No password has been provided in connection")
|
||||
password = SecretStr("")
|
||||
url += f":{quote_plus(password.get_secret_value())}"
|
||||
return url
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user