diff --git a/metadata-ingestion/setup.py b/metadata-ingestion/setup.py index 0dc261fa14..1195cd24a7 100644 --- a/metadata-ingestion/setup.py +++ b/metadata-ingestion/setup.py @@ -25,7 +25,8 @@ base_requirements = { # Actual dependencies. "typing-inspect", # pydantic 1.10.3 is incompatible with typing-extensions 4.1.1 - https://github.com/pydantic/pydantic/issues/4885 - "pydantic>=1.5.1,!=1.10.3", + # pydantic 2 makes major, backwards-incompatible changes - https://github.com/pydantic/pydantic/issues/4887 + "pydantic>=1.5.1,!=1.10.3,<2", "mixpanel>=4.9.0", } diff --git a/metadata-ingestion/src/datahub/cli/ingest_cli.py b/metadata-ingestion/src/datahub/cli/ingest_cli.py index 077072c982..2cb8bd87cb 100644 --- a/metadata-ingestion/src/datahub/cli/ingest_cli.py +++ b/metadata-ingestion/src/datahub/cli/ingest_cli.py @@ -199,6 +199,7 @@ def run( def _test_source_connection(report_to: Optional[str], pipeline_config: dict) -> None: + connection_report = None try: connection_report = ConnectionManager().test_source_connection(pipeline_config) logger.info(connection_report.as_json()) diff --git a/metadata-ingestion/src/datahub/ingestion/source/looker/looker_lib_wrapper.py b/metadata-ingestion/src/datahub/ingestion/source/looker/looker_lib_wrapper.py index 8e39d2d9f4..e51c824a57 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/looker/looker_lib_wrapper.py +++ b/metadata-ingestion/src/datahub/ingestion/source/looker/looker_lib_wrapper.py @@ -14,6 +14,7 @@ from looker_sdk.sdk.api40.models import ( DBConnection, Folder, LookmlModel, + LookmlModelExplore, User, WriteQuery, ) @@ -145,7 +146,7 @@ class LookerAPI: transport_options=self.transport_options, ) - def lookml_model_explore(self, model, explore_name): + def lookml_model_explore(self, model: str, explore_name: str) -> LookmlModelExplore: self.client_stats.explore_calls += 1 return self.client.lookml_model_explore( model, explore_name, transport_options=self.transport_options