From 2123c8b6d7fb47bf6b56c7894f9af0137a228a0d Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Mon, 7 Jun 2021 14:00:35 -0700 Subject: [PATCH] fix(ingest): exclude mssql-odbc from "all" extra (#2660) --- docker/datahub-ingestion/Dockerfile | 8 ++++---- metadata-ingestion/setup.py | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/docker/datahub-ingestion/Dockerfile b/docker/datahub-ingestion/Dockerfile index 6d1bd5140b..10f59aa20c 100644 --- a/docker/datahub-ingestion/Dockerfile +++ b/docker/datahub-ingestion/Dockerfile @@ -16,13 +16,13 @@ RUN apt-get update && apt-get install -y \ FROM openjdk:8 as prod-build COPY . /datahub-src -RUN cd /datahub-src && ./gradlew :metadata-events:mxe-schemas:build +# RUN cd /datahub-src && ./gradlew :metadata-events:mxe-schemas:build FROM base as prod-codegen COPY --from=prod-build /datahub-src /datahub-src -RUN cd /datahub-src/metadata-ingestion && \ - pip install -e ".[base]" && \ - ./scripts/codegen.sh +# RUN cd /datahub-src/metadata-ingestion && \ +# pip install -e ".[base]" && \ +# ./scripts/codegen.sh FROM base as prod-install COPY --from=prod-codegen /datahub-src/metadata-ingestion /datahub-ingestion diff --git a/metadata-ingestion/setup.py b/metadata-ingestion/setup.py index df6813de8c..f6a6b21f99 100644 --- a/metadata-ingestion/setup.py +++ b/metadata-ingestion/setup.py @@ -92,6 +92,12 @@ plugins: Dict[str, Set[str]] = { "glue": {"boto3"}, } +all_exclude_plugins: Set[str] = { + # SQL Server ODBC requires additional drivers, and so we don't want to keep + # it included in the default "all" installation. + "mssql-odbc", +} + base_dev_requirements = { *base_requirements, *framework_common, @@ -234,7 +240,15 @@ setuptools.setup( plugin: list(framework_common | dependencies) for (plugin, dependencies) in plugins.items() }, - "all": list(framework_common.union(*plugins.values())), + "all": list( + framework_common.union( + *[ + requirements + for plugin, requirements in plugins.items() + if plugin not in all_exclude_plugins + ] + ) + ), "dev": list(dev_requirements), "dev-airflow2": list(dev_requirements_airflow_2), },