Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ingest): use logger.warning instead of logger.warn #2893

Merged
merged 2 commits into from
Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion metadata-ingestion/src/datahub/emitter/rest_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class DatahubRestEmitter:

def __init__(self, gms_server: str, token: Optional[str] = None):
if ":9002" in gms_server:
logger.warn(
logger.warning(
"the rest emitter should connect to GMS (usually port 8080) instead of frontend"
)
self._gms_server = gms_server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def get_connectors_manifest(self):
if connector_manifest.type == "sink":
# TODO: Sink Connector not yet implemented
self.report.report_dropped(connector_manifest.name)
logger.warn(
logger.warning(
f"Skipping connector {connector_manifest.name}. Sink Connector not yet implemented"
)
pass
Expand Down
7 changes: 4 additions & 3 deletions metadata-ingestion/src/datahub/ingestion/source/looker.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def get_urn_dashboard_id(self):

class LookerDashboardSource(Source):
source_config: LookerDashboardSourceConfig
report = LookerDashboardSourceReport()
reporter: LookerDashboardSourceReport

def __init__(self, config: LookerDashboardSourceConfig, ctx: PipelineContext):
super().__init__(ctx)
Expand Down Expand Up @@ -415,8 +415,9 @@ def get_workunits(self) -> Iterable[MetadataWorkUnit]:
)
except SDKError:
# A looker dashboard could be deleted in between the list and the get
logger.warning(
f"Error occuried while loading dashboard {dashboard_id}. Skipping."
self.reporter.report_warning(
dashboard_id,
f"Error occurred while loading dashboard {dashboard_id}. Skipping.",
)
continue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class SnowflakeConfig(BaseSnowflakeConfig, SQLAlchemyConfig):

@pydantic.validator("database")
def note_database_opt_deprecation(cls, v, values, **kwargs):
logger.warn(
logger.warning(
"snowflake's `database` option has been deprecated; use database_pattern instead"
)
values["database_pattern"].allow = f"^{v}$"
Expand Down