jessica_fosler
10/12/2023, 9:12 AMjessica_fosler
10/12/2023, 8:36 PM# The oscrypto package does not support OpenSSL versions with two digits
# And the maintainer refuses (Oct 2023) to rev pypl.
echo "patching snowflake_connector for target-snowflake"
SCRIPT=$(realpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
echo $SCRIPTPATH
cd "$SCRIPTPATH/.meltano/loaders/target-snowflake/venv/bin"
echo "...activating target-snowflake venv"
source "$SCRIPTPATH/.meltano/loaders/target-snowflake/venv/bin/activate"
echo "...pip installing custom patch"
./pip install --force-reinstall git+<https://github.com/wbond/oscrypto.git@1547f535001ba568b239b8797465536759c742a3>
deactivate
mykola_zavada
01/12/2024, 7:43 PM# <http://registry.gitlab.com/meltano/meltano:latest|registry.gitlab.com/meltano/meltano:latest> is also available in GitLab Registry
ARG MELTANO_IMAGE=meltano/meltano:latest
FROM $MELTANO_IMAGE
WORKDIR /artera
# Install any additional requirements
COPY ./requirements.txt .
RUN pip install -r requirements.txt
# Copy over Meltano project directory
COPY . .
RUN meltano install
#####################
##########FIX: oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto
########## related to Snowflake Connector
# We need a newer version of oscrypto than the one released to get a fix for a bug
# that gets triggered when having double digits on the OpenSSL version
# (<https://github.com/wbond/oscrypto/issues/75>).
# We can remove the oscrypto pinning once the fix becomes part of a new release.
ENV PATH="/artera/.meltano/loaders/target-snowflake/venv/bin:$PATH"
RUN pip install --force-reinstall git+<https://github.com/wbond/oscrypto.git@1547f535001ba568b239b8797465536759c742a3>
# Don't allow changes to containerized project files
#ENV MELTANO_PROJECT_READONLY 1
ENTRYPOINT ["/bin/bash"]