You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sa...@apache.org on 2021/03/03 13:44:31 UTC

[cassandra-builds] branch trunk updated: Don't build cython extensions for cassandra-driver in testing images (#37)

This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 9f1755c  Don't build cython extensions for cassandra-driver in testing images (#37)
9f1755c is described below

commit 9f1755cf5dcb684579d80d7527a0b758fbf1d675
Author: Sam Tunnicliffe <sa...@beobal.com>
AuthorDate: Wed Mar 3 13:44:24 2021 +0000

    Don't build cython extensions for cassandra-driver in testing images (#37)
    
    Patch by Sam Tunnicliffe; reviewed by Mick Semb Wever for CASSANDRA-16474
---
 docker/testing/ubuntu2004_j11.docker | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/docker/testing/ubuntu2004_j11.docker b/docker/testing/ubuntu2004_j11.docker
index 3672cbf..d442d21 100644
--- a/docker/testing/ubuntu2004_j11.docker
+++ b/docker/testing/ubuntu2004_j11.docker
@@ -95,17 +95,23 @@ ENV ANT_HOME=/usr/share/ant
 
 # run pip commands and setup virtualenv (note we do this after we switch to cassandra user so we
 # setup the virtualenv for the cassandra user and not the root user by accident) for Python 3.6/3.7/3.8
+# Don't build cython extensions when installing cassandra-driver. During test execution the driver
+# dependency is refreshed via pip install --upgrade, so that driver changes can be pulled in without
+# requiring the image to be rebuilt. Rebuilding compiled extensions is costly and is disabled by
+# default in test jobs using the CASS_DRIVER_X env vars below. However, if the extensions are
+# included in the base image, the compiled objects are not updated by pip at run time, which can
+# cause errors if the tests rely on new driver functionality or bug fixes.
 RUN virtualenv --python=python3.6 env3.6
 RUN chmod +x env3.6/bin/activate
-RUN /bin/bash -c "source ~/env3.6/bin/activate && pip3 install --upgrade pip && pip3 install Cython && pip3 install -r /opt/requirements.txt && pip3 freeze --user"
+RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 && source ~/env3.6/bin/activate && pip3 install --upgrade pip && pip3 install -r /opt/requirements.txt && pip3 freeze --user"
 
 RUN virtualenv --python=python3.7 env3.7
 RUN chmod +x env3.7/bin/activate
-RUN /bin/bash -c "source ~/env3.7/bin/activate && pip3 install --upgrade pip && pip3 install Cython && pip3 install -r /opt/requirements.txt && pip3 freeze --user"
+RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 && source ~/env3.7/bin/activate && pip3 install --upgrade pip && pip3 install -r /opt/requirements.txt && pip3 freeze --user"
 
 RUN virtualenv --python=python3.8 env3.8
 RUN chmod +x env3.8/bin/activate
-RUN /bin/bash -c "source ~/env3.8/bin/activate && pip3 install --upgrade pip && pip3 install Cython && pip3 install -r /opt/requirements.txt && pip3 freeze --user"
+RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 && source ~/env3.8/bin/activate && pip3 install --upgrade pip && pip3 install -r /opt/requirements.txt && pip3 freeze --user"
 
 # we need to make SSH less strict to prevent various dtests from failing when they attempt to
 # git clone a given commit/tag/etc


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org