fix(build): add ability to specificy constraints for bundled-venvs (#14999)

pydantic v2.41.3 released on oct 7th seems to have uploaded a corrupt whl. pydantic/pydantic-core#1841
Adding the ability to specify constraints to exclude this and in future, any other package that we may need to skip for bundled_venvs.
This commit is contained in:
Chakru 2025-10-14 16:13:37 +05:30 committed by GitHub
parent a85c4ffca8
commit 2b9d250c29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 1 deletions

View File

@ -147,6 +147,7 @@ RUN mkdir -p $DATAHUB_BUNDLED_VENV_PATH && \
# Copy the self-contained venv build scripts # 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.py /tmp/
COPY --chown=datahub:datahub ./docker/snippets/ingestion/build_bundled_venvs_unified.sh /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 # Make scripts executable
RUN chmod +x /tmp/build_bundled_venvs_unified.sh && \ RUN chmod +x /tmp/build_bundled_venvs_unified.sh && \

View File

@ -43,7 +43,8 @@ def create_venv(plugin: str, venv_name: str, bundled_cli_version: str, venv_base
# Install DataHub with the specific plugin # Install DataHub with the specific plugin
print(f" → Installing datahub with {plugin} plugin...") print(f" → Installing datahub with {plugin} plugin...")
datahub_package = f'acryl-datahub[datahub-rest,datahub-kafka,file,{plugin}]=={bundled_cli_version}' 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) subprocess.run(['bash', '-c', install_cmd], check=True, capture_output=True)
print(f" ✅ Successfully created {venv_name}") print(f" ✅ Successfully created {venv_name}")

View File

@ -0,0 +1 @@
pydantic_core!=2.41.3