mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-27 00:40:06 +00:00
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:
parent
a85c4ffca8
commit
2b9d250c29
@ -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 && \
|
||||
|
||||
@ -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}")
|
||||
|
||||
1
docker/snippets/ingestion/constraints.txt
Normal file
1
docker/snippets/ingestion/constraints.txt
Normal file
@ -0,0 +1 @@
|
||||
pydantic_core!=2.41.3
|
||||
Loading…
x
Reference in New Issue
Block a user