mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-04 04:39:10 +00:00
fix(ingest): mask password in info-level logs (#2835)
This commit is contained in:
parent
288d17f07e
commit
6b59cdeb82
@ -504,7 +504,7 @@ source:
|
|||||||
options: # options is same as above
|
options: # options is same as above
|
||||||
# See https://github.com/mxmzdlv/pybigquery#authentication for details.
|
# See https://github.com/mxmzdlv/pybigquery#authentication for details.
|
||||||
credentials_path: "/path/to/keyfile.json" # optional
|
credentials_path: "/path/to/keyfile.json" # optional
|
||||||
include_views: True # whether to include views, defaults to True
|
include_views: True # whether to include views, defaults to True
|
||||||
# table_pattern/schema_pattern is same as above
|
# table_pattern/schema_pattern is same as above
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ def ingest(config: str) -> None:
|
|||||||
pipeline_config = load_config_file(config_file)
|
pipeline_config = load_config_file(config_file)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
logger.info(f"Using config: {pipeline_config}")
|
logger.debug(f"Using config: {pipeline_config}")
|
||||||
pipeline = Pipeline.create(pipeline_config)
|
pipeline = Pipeline.create(pipeline_config)
|
||||||
except ValidationError as e:
|
except ValidationError as e:
|
||||||
click.echo(e, err=True)
|
click.echo(e, err=True)
|
||||||
|
|||||||
@ -4,6 +4,7 @@ from dataclasses import dataclass, field
|
|||||||
from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Type
|
from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Type
|
||||||
from urllib.parse import quote_plus
|
from urllib.parse import quote_plus
|
||||||
|
|
||||||
|
import pydantic
|
||||||
from sqlalchemy import create_engine, inspect
|
from sqlalchemy import create_engine, inspect
|
||||||
from sqlalchemy.engine.reflection import Inspector
|
from sqlalchemy.engine.reflection import Inspector
|
||||||
from sqlalchemy.sql import sqltypes as types
|
from sqlalchemy.sql import sqltypes as types
|
||||||
@ -116,7 +117,7 @@ class SQLAlchemyConfig(ConfigModel):
|
|||||||
|
|
||||||
class BasicSQLAlchemyConfig(SQLAlchemyConfig):
|
class BasicSQLAlchemyConfig(SQLAlchemyConfig):
|
||||||
username: Optional[str] = None
|
username: Optional[str] = None
|
||||||
password: Optional[str] = None
|
password: Optional[pydantic.SecretStr] = None
|
||||||
host_port: str
|
host_port: str
|
||||||
database: Optional[str] = None
|
database: Optional[str] = None
|
||||||
scheme: str
|
scheme: str
|
||||||
@ -125,7 +126,7 @@ class BasicSQLAlchemyConfig(SQLAlchemyConfig):
|
|||||||
return make_sqlalchemy_uri(
|
return make_sqlalchemy_uri(
|
||||||
self.scheme,
|
self.scheme,
|
||||||
self.username,
|
self.username,
|
||||||
self.password,
|
self.password.get_secret_value() if self.password else None,
|
||||||
self.host_port,
|
self.host_port,
|
||||||
self.database,
|
self.database,
|
||||||
uri_opts=uri_opts,
|
uri_opts=uri_opts,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user