diff --git a/docker/datahub-actions/Dockerfile b/docker/datahub-actions/Dockerfile index 43d867c3ed..b2638e1878 100644 --- a/docker/datahub-actions/Dockerfile +++ b/docker/datahub-actions/Dockerfile @@ -147,6 +147,7 @@ RUN mkdir -p $DATAHUB_BUNDLED_VENV_PATH && \ # Copy the self-contained venv build scripts COPY --chown=datahub:datahub ./docker/snippets/ingestion/build_bundled_venvs_unified.py /tmp/ COPY --chown=datahub:datahub ./docker/snippets/ingestion/build_bundled_venvs_unified.sh /tmp/ +COPY --chown=datahub:datahub ./docker/snippets/ingestion/constraints.txt ${DATAHUB_BUNDLED_VENV_PATH}/ # Make scripts executable RUN chmod +x /tmp/build_bundled_venvs_unified.sh && \ diff --git a/docker/snippets/ingestion/build_bundled_venvs_unified.py b/docker/snippets/ingestion/build_bundled_venvs_unified.py index d6075185da..e38cebc314 100644 --- a/docker/snippets/ingestion/build_bundled_venvs_unified.py +++ b/docker/snippets/ingestion/build_bundled_venvs_unified.py @@ -43,7 +43,8 @@ def create_venv(plugin: str, venv_name: str, bundled_cli_version: str, venv_base # Install DataHub with the specific plugin print(f" → Installing datahub with {plugin} plugin...") datahub_package = f'acryl-datahub[datahub-rest,datahub-kafka,file,{plugin}]=={bundled_cli_version}' - install_cmd = f'source {venv_path}/bin/activate && uv pip install "{datahub_package}"' + constraints_path = os.path.join(venv_base_path, "constraints.txt") + install_cmd = f'source {venv_path}/bin/activate && uv pip install "{datahub_package}" --constraints {constraints_path}' subprocess.run(['bash', '-c', install_cmd], check=True, capture_output=True) print(f" ✅ Successfully created {venv_name}") diff --git a/docker/snippets/ingestion/constraints.txt b/docker/snippets/ingestion/constraints.txt new file mode 100644 index 0000000000..c5cb3e3901 --- /dev/null +++ b/docker/snippets/ingestion/constraints.txt @@ -0,0 +1 @@ +pydantic_core!=2.41.3