Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kafka-setup): workaround for pyyaml dependencies in kafka-setup #118

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docker/kafka-setup/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ENV SCALA_VERSION 2.13
ENV CUB_CLASSPATH='"/usr/share/java/cp-base-new/*"'

# Confluent Docker Utils Version (Namely the tag or branch to grab from git to install)
ARG PYTHON_CONFLUENT_DOCKER_UTILS_VERSION="v0.0.58"
ARG PYTHON_CONFLUENT_DOCKER_UTILS_VERSION="v0.0.60"

# This can be overriden for an offline/air-gapped builds
ARG PYTHON_CONFLUENT_DOCKER_UTILS_INSTALL_SPEC="git+https://github.com/confluentinc/confluent-docker-utils@${PYTHON_CONFLUENT_DOCKER_UTILS_VERSION}"
Expand All @@ -36,7 +36,9 @@ RUN mkdir -p /opt \
&& adduser -DH -s /sbin/nologin kafka \
&& chown -R kafka: /opt/kafka \
&& echo "===> Installing python packages ..." \
&& pip install --no-cache-dir jinja2 requests \
&& pip install --no-cache-dir --upgrade pip wheel setuptools \
&& pip install jinja2 requests \
&& pip install "Cython<3.0" "PyYAML<6" --no-build-isolation \
&& pip install --prefer-binary --prefix=/usr/local --upgrade "${PYTHON_CONFLUENT_DOCKER_UTILS_INSTALL_SPEC}" \
&& rm -rf /tmp/* \
&& apk del --purge .build-deps
Expand Down
1 change: 1 addition & 0 deletions docker/quickstart/generate_and_compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ set -euxo pipefail
python3 -m venv venv
source venv/bin/activate

pip install --upgrade pip wheel setuptools
pip install -r requirements.txt
python generate_docker_quickstart.py check-all
2 changes: 1 addition & 1 deletion docker/quickstart/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PyYAML==5.4.1
PyYAML==6.0
python-dotenv==0.17.0
click
4 changes: 4 additions & 0 deletions metadata-ingestion-modules/airflow-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ task environmentSetup(type: Exec, dependsOn: checkPythonVersion) {
task installPackage(type: Exec, dependsOn: environmentSetup) {
inputs.file file('setup.py')
outputs.dir("${venv_name}")
// Workaround for https://github.com/yaml/pyyaml/issues/601.
// See https://github.com/yaml/pyyaml/issues/601#issuecomment-1638509577.
// and https://github.com/datahub-project/datahub/pull/8435.
commandLine 'bash', '-x', '-c', "${pip_install_command} install 'Cython<3.0' 'PyYAML<6' --no-build-isolation"
commandLine 'bash', '-x', '-c', "${pip_install_command} -e ."
}

Expand Down
Loading