[jira] [Commented] (CASSANDRA-18472) Docker images can no longer be built due to python2.7

2023-04-25 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17716337#comment-17716337
 ] 

Brandon Williams commented on CASSANDRA-18472:
--

[~djoshi] I agree we don't want to be in this situation again, but it's 
probably a nuanced enough topic worth raising on dev.

After removing python2, I encountered the same issue I opened this ticket with, 
except for python3.6! This revealed the real culprit, virtualenv. It appears to 
be specific to virtualenv from pip on 3.11, so I installed the Ubuntu package 
instead which should be more stable and allowed removal of my previous 
2.7-specific hack.  This just left paring the 2.7 requirements down to only 
cassandra-driver, which I did 
[here|https://github.com/driftx/cassandra-builds/tree/CASSANDRA-18472] and 
built and pushed the image to my docker.

||Branch||CI||
|[3.0|https://github.com/driftx/cassandra/tree/CASSANDRA-18472-3.0]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/982/workflows/9240e8b6-bc0e-4fb6-8081-8ec1eef3a6a7]|
|[3.11|https://github.com/driftx/cassandra/tree/CASSANDRA-18472-3.11]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/983/workflows/e9ce73ea-50a5-4f08-8b33-6d52e42b5366]|
|[4.0|https://github.com/driftx/cassandra/tree/CASSANDRA-18472-4.0]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/980/workflows/d35e83b3-e59e-41ee-af08-e1324271037f],
 
[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/980/workflows/836841a0-ebd3-4cef-a123-14c21b424174]|
|[4.1|https://github.com/driftx/cassandra/tree/CASSANDRA-18472-4.1]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/979/workflows/a2d0a0c7-5ca3-4877-ae36-6d5c4a2434d9],
 
[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/979/workflows/298c67a3-0c43-4e7d-9f2d-bd148c868a2b]|
|[trunk|https://github.com/driftx/cassandra/tree/CASSANDRA-18472-trunk]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/981/workflows/4dfe9389-856e-4035-a18c-9adbc1e95617],
 
[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/981/workflows/18ae1bd8-9630-4579-885d-2785a98508dd]|


> Docker images can no longer be built due to python2.7
> -
>
> Key: CASSANDRA-18472
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18472
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.x
>
>
> {noformat}
>  => [linux/amd64 35/56] WORKDIR /home/cassandra   
>   
>  0.1s
>  => [linux/amd64 36/56] RUN echo 'export ANT_HOME=/usr/share/ant' >> 
> /home/cassandra/.bashrc && echo 'export 
> JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)' >> 
> /home/cassandra/.b  0.2s
>  => ERROR [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7
>   
>  0.5s
> --
>  > [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7:
> #100 0.424 RuntimeError: failed to find interpreter for Builtin discover of 
> python_spec='python2.7'
> --
> ubuntu2004_j11.docker:128
> 
>  126 | # included in the base image, the compiled objects are not updated 
> by pip at run time, which can
>  127 | # cause errors if the tests rely on new driver functionality or 
> bug fixes.
>  128 | >>> RUN virtualenv --python=python2.7 env2.7
>  129 | RUN chmod +x env2.7/bin/activate
>  130 | RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 
> CASS_DRIVER_NO_EXTENSIONS=1 && source ~/env2.7/bin/activate && pip2 install 
> --upgrade pip && pip2 install -r /opt/requirements.txt && pip2 freeze --user"
> 
> error: failed to solve: rpc error: code = Unknown desc = process "/bin/sh -c 
> virtualenv --python=python2.7 env2.7" did not complete successfully: exit 
> code: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18472) Docker images can no longer be built due to python2.7

2023-04-21 Thread Dinesh Joshi (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17715187#comment-17715187
 ] 

Dinesh Joshi commented on CASSANDRA-18472:
--

It would have been great if we would've had cqlsh as a separate repo / 
sub-project. It would be easy to avoid issues such as these. Having Python 2 
dependency for 3.0 and 3.11 is not great.

> Docker images can no longer be built due to python2.7
> -
>
> Key: CASSANDRA-18472
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18472
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.x
>
>
> {noformat}
>  => [linux/amd64 35/56] WORKDIR /home/cassandra   
>   
>  0.1s
>  => [linux/amd64 36/56] RUN echo 'export ANT_HOME=/usr/share/ant' >> 
> /home/cassandra/.bashrc && echo 'export 
> JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)' >> 
> /home/cassandra/.b  0.2s
>  => ERROR [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7
>   
>  0.5s
> --
>  > [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7:
> #100 0.424 RuntimeError: failed to find interpreter for Builtin discover of 
> python_spec='python2.7'
> --
> ubuntu2004_j11.docker:128
> 
>  126 | # included in the base image, the compiled objects are not updated 
> by pip at run time, which can
>  127 | # cause errors if the tests rely on new driver functionality or 
> bug fixes.
>  128 | >>> RUN virtualenv --python=python2.7 env2.7
>  129 | RUN chmod +x env2.7/bin/activate
>  130 | RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 
> CASS_DRIVER_NO_EXTENSIONS=1 && source ~/env2.7/bin/activate && pip2 install 
> --upgrade pip && pip2 install -r /opt/requirements.txt && pip2 freeze --user"
> 
> error: failed to solve: rpc error: code = Unknown desc = process "/bin/sh -c 
> virtualenv --python=python2.7 env2.7" did not complete successfully: exit 
> code: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18472) Docker images can no longer be built due to python2.7

2023-04-21 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17715168#comment-17715168
 ] 

Brandon Williams commented on CASSANDRA-18472:
--

Yes, 3.0 and 3.11 still need python2 for cqlsh.  But the dtests don't, and this 
is getting [those 
dependencies|https://github.com/apache/cassandra-builds/blob/trunk/docker/testing/ubuntu2004_j11.docker#L74]
 from the dtests.  I guess I will see about making it only get what is needed, 
then do an image upload to my account and run the test gamut to make sure it 
works.

> Docker images can no longer be built due to python2.7
> -
>
> Key: CASSANDRA-18472
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18472
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.x
>
>
> {noformat}
>  => [linux/amd64 35/56] WORKDIR /home/cassandra   
>   
>  0.1s
>  => [linux/amd64 36/56] RUN echo 'export ANT_HOME=/usr/share/ant' >> 
> /home/cassandra/.bashrc && echo 'export 
> JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)' >> 
> /home/cassandra/.b  0.2s
>  => ERROR [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7
>   
>  0.5s
> --
>  > [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7:
> #100 0.424 RuntimeError: failed to find interpreter for Builtin discover of 
> python_spec='python2.7'
> --
> ubuntu2004_j11.docker:128
> 
>  126 | # included in the base image, the compiled objects are not updated 
> by pip at run time, which can
>  127 | # cause errors if the tests rely on new driver functionality or 
> bug fixes.
>  128 | >>> RUN virtualenv --python=python2.7 env2.7
>  129 | RUN chmod +x env2.7/bin/activate
>  130 | RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 
> CASS_DRIVER_NO_EXTENSIONS=1 && source ~/env2.7/bin/activate && pip2 install 
> --upgrade pip && pip2 install -r /opt/requirements.txt && pip2 freeze --user"
> 
> error: failed to solve: rpc error: code = Unknown desc = process "/bin/sh -c 
> virtualenv --python=python2.7 env2.7" did not complete successfully: exit 
> code: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18472) Docker images can no longer be built due to python2.7

2023-04-21 Thread Michael Semb Wever (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17715167#comment-17715167
 ] 

Michael Semb Wever commented on CASSANDRA-18472:


do older cassandra branches need 2.7 in any part of their building/testing? 
(ant jar/artifacts, cqlshlib, ?)

> Docker images can no longer be built due to python2.7
> -
>
> Key: CASSANDRA-18472
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18472
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.x
>
>
> {noformat}
>  => [linux/amd64 35/56] WORKDIR /home/cassandra   
>   
>  0.1s
>  => [linux/amd64 36/56] RUN echo 'export ANT_HOME=/usr/share/ant' >> 
> /home/cassandra/.bashrc && echo 'export 
> JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)' >> 
> /home/cassandra/.b  0.2s
>  => ERROR [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7
>   
>  0.5s
> --
>  > [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7:
> #100 0.424 RuntimeError: failed to find interpreter for Builtin discover of 
> python_spec='python2.7'
> --
> ubuntu2004_j11.docker:128
> 
>  126 | # included in the base image, the compiled objects are not updated 
> by pip at run time, which can
>  127 | # cause errors if the tests rely on new driver functionality or 
> bug fixes.
>  128 | >>> RUN virtualenv --python=python2.7 env2.7
>  129 | RUN chmod +x env2.7/bin/activate
>  130 | RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 
> CASS_DRIVER_NO_EXTENSIONS=1 && source ~/env2.7/bin/activate && pip2 install 
> --upgrade pip && pip2 install -r /opt/requirements.txt && pip2 freeze --user"
> 
> error: failed to solve: rpc error: code = Unknown desc = process "/bin/sh -c 
> virtualenv --python=python2.7 env2.7" did not complete successfully: exit 
> code: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18472) Docker images can no longer be built due to python2.7

2023-04-21 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17715133#comment-17715133
 ] 

Brandon Williams commented on CASSANDRA-18472:
--

Now we have the problem of 2.7 being unable to find a pytest version high 
enough to meet the cassandra-dtest requirement:

{noformat}
#101 11.45 ERROR: Could not find a version that satisfies the requirement 
pytest>=6.5.0 (from -r /opt/requirements.txt (line 18)) (from versions: 2.0.0, 
2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 
2.2.4, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.4.0, 2.4.1, 2.4.2, 2.5.0, 
2.5.1, 2.5.2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 
2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.8.7, 2.9.0, 2.9.1, 2.9.2, 
3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.1.0, 3.1.1, 3.1.2, 
3.1.3, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.3.0, 3.3.1, 3.3.2, 3.4.0, 
3.4.1, 3.4.2, 3.5.0, 3.5.1, 3.6.0, 3.6.1, 3.6.2, 3.6.3, 3.6.4, 3.7.0, 3.7.1, 
3.7.2, 3.7.3, 3.7.4, 3.8.0, 3.8.1, 3.8.2, 3.9.1, 3.9.2, 3.9.3, 3.10.0, 3.10.1, 
4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.3.0, 4.3.1, 4.4.0, 4.4.1, 
4.4.2, 4.5.0, 4.6.0, 4.6.1, 4.6.2, 4.6.3, 4.6.4, 4.6.5, 4.6.6, 4.6.7, 4.6.8, 
4.6.9, 4.6.10, 4.6.11)
#101 11.45 ERROR: No matching distribution found for pytest>=6.5.0 (from -r 
/opt/requirements.txt (line 18))
{noformat}

I bumped this in CASSANDRA-18121 when adding 3.11 support, and there probably 
is not a version higher than 4.6.11 that will work with python2.  I don't think 
there should be any reason python2 needs to track the dtest requirements 
though, since we aren't running python2 there.  I'm actually not sure what we 
need python2.7 for here, [~mck] ?

> Docker images can no longer be built due to python2.7
> -
>
> Key: CASSANDRA-18472
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18472
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.x
>
>
> {noformat}
>  => [linux/amd64 35/56] WORKDIR /home/cassandra   
>   
>  0.1s
>  => [linux/amd64 36/56] RUN echo 'export ANT_HOME=/usr/share/ant' >> 
> /home/cassandra/.bashrc && echo 'export 
> JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)' >> 
> /home/cassandra/.b  0.2s
>  => ERROR [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7
>   
>  0.5s
> --
>  > [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7:
> #100 0.424 RuntimeError: failed to find interpreter for Builtin discover of 
> python_spec='python2.7'
> --
> ubuntu2004_j11.docker:128
> 
>  126 | # included in the base image, the compiled objects are not updated 
> by pip at run time, which can
>  127 | # cause errors if the tests rely on new driver functionality or 
> bug fixes.
>  128 | >>> RUN virtualenv --python=python2.7 env2.7
>  129 | RUN chmod +x env2.7/bin/activate
>  130 | RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 
> CASS_DRIVER_NO_EXTENSIONS=1 && source ~/env2.7/bin/activate && pip2 install 
> --upgrade pip && pip2 install -r /opt/requirements.txt && pip2 freeze --user"
> 
> error: failed to solve: rpc error: code = Unknown desc = process "/bin/sh -c 
> virtualenv --python=python2.7 env2.7" did not complete successfully: exit 
> code: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18472) Docker images can no longer be built due to python2.7

2023-04-21 Thread Ekaterina Dimitrova (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17715125#comment-17715125
 ] 

Ekaterina Dimitrova commented on CASSANDRA-18472:
-

Great, as you already built an image to test this, can you, please, push it to 
docker hub for testing to ensure there are no other surprises?

Thanks in advance!

> Docker images can no longer be built due to python2.7
> -
>
> Key: CASSANDRA-18472
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18472
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.x
>
>
> {noformat}
>  => [linux/amd64 35/56] WORKDIR /home/cassandra   
>   
>  0.1s
>  => [linux/amd64 36/56] RUN echo 'export ANT_HOME=/usr/share/ant' >> 
> /home/cassandra/.bashrc && echo 'export 
> JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)' >> 
> /home/cassandra/.b  0.2s
>  => ERROR [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7
>   
>  0.5s
> --
>  > [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7:
> #100 0.424 RuntimeError: failed to find interpreter for Builtin discover of 
> python_spec='python2.7'
> --
> ubuntu2004_j11.docker:128
> 
>  126 | # included in the base image, the compiled objects are not updated 
> by pip at run time, which can
>  127 | # cause errors if the tests rely on new driver functionality or 
> bug fixes.
>  128 | >>> RUN virtualenv --python=python2.7 env2.7
>  129 | RUN chmod +x env2.7/bin/activate
>  130 | RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 
> CASS_DRIVER_NO_EXTENSIONS=1 && source ~/env2.7/bin/activate && pip2 install 
> --upgrade pip && pip2 install -r /opt/requirements.txt && pip2 freeze --user"
> 
> error: failed to solve: rpc error: code = Unknown desc = process "/bin/sh -c 
> virtualenv --python=python2.7 env2.7" did not complete successfully: exit 
> code: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18472) Docker images can no longer be built due to python2.7

2023-04-21 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17715048#comment-17715048
 ] 

Brandon Williams commented on CASSANDRA-18472:
--

Indeed, creating the venv by forcing 2.7 to be the virtualenv backend solves 
it.  Patch 
[here|https://github.com/driftx/cassandra-builds/tree/CASSANDRA-18472] that 
does that.

> Docker images can no longer be built due to python2.7
> -
>
> Key: CASSANDRA-18472
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18472
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.x
>
>
> {noformat}
>  => [linux/amd64 35/56] WORKDIR /home/cassandra   
>   
>  0.1s
>  => [linux/amd64 36/56] RUN echo 'export ANT_HOME=/usr/share/ant' >> 
> /home/cassandra/.bashrc && echo 'export 
> JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)' >> 
> /home/cassandra/.b  0.2s
>  => ERROR [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7
>   
>  0.5s
> --
>  > [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7:
> #100 0.424 RuntimeError: failed to find interpreter for Builtin discover of 
> python_spec='python2.7'
> --
> ubuntu2004_j11.docker:128
> 
>  126 | # included in the base image, the compiled objects are not updated 
> by pip at run time, which can
>  127 | # cause errors if the tests rely on new driver functionality or 
> bug fixes.
>  128 | >>> RUN virtualenv --python=python2.7 env2.7
>  129 | RUN chmod +x env2.7/bin/activate
>  130 | RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 
> CASS_DRIVER_NO_EXTENSIONS=1 && source ~/env2.7/bin/activate && pip2 install 
> --upgrade pip && pip2 install -r /opt/requirements.txt && pip2 freeze --user"
> 
> error: failed to solve: rpc error: code = Unknown desc = process "/bin/sh -c 
> virtualenv --python=python2.7 env2.7" did not complete successfully: exit 
> code: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18472) Docker images can no longer be built due to python2.7

2023-04-21 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17715045#comment-17715045
 ] 

Brandon Williams commented on CASSANDRA-18472:
--

I think adding debugging to venv has revealed something:

{noformat}
#99 0.208 80 failed to query /usr/bin/python2.7 with code 1 err: '  File 
"/usr/local/lib/python3.11/dist-packages/virtualenv/discovery/py_info.py", line 
152\nos.path.join(base_dir, exe) for exe in (f"python{major}", 
f"python{major}.{minor}")\n 
  ^\nSyntaxError: invalid syntax\n' [INFO cached_py_info:35]
{noformat}

So the problem seems to be using python 3.11 to discover python2.7 (which is 
indeed at that location.)

> Docker images can no longer be built due to python2.7
> -
>
> Key: CASSANDRA-18472
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18472
> Project: Cassandra
>  Issue Type: Bug
>  Components: CI
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.x
>
>
> {noformat}
>  => [linux/amd64 35/56] WORKDIR /home/cassandra   
>   
>  0.1s
>  => [linux/amd64 36/56] RUN echo 'export ANT_HOME=/usr/share/ant' >> 
> /home/cassandra/.bashrc && echo 'export 
> JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)' >> 
> /home/cassandra/.b  0.2s
>  => ERROR [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7
>   
>  0.5s
> --
>  > [linux/amd64 37/56] RUN virtualenv --python=python2.7 env2.7:
> #100 0.424 RuntimeError: failed to find interpreter for Builtin discover of 
> python_spec='python2.7'
> --
> ubuntu2004_j11.docker:128
> 
>  126 | # included in the base image, the compiled objects are not updated 
> by pip at run time, which can
>  127 | # cause errors if the tests rely on new driver functionality or 
> bug fixes.
>  128 | >>> RUN virtualenv --python=python2.7 env2.7
>  129 | RUN chmod +x env2.7/bin/activate
>  130 | RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 
> CASS_DRIVER_NO_EXTENSIONS=1 && source ~/env2.7/bin/activate && pip2 install 
> --upgrade pip && pip2 install -r /opt/requirements.txt && pip2 freeze --user"
> 
> error: failed to solve: rpc error: code = Unknown desc = process "/bin/sh -c 
> virtualenv --python=python2.7 env2.7" did not complete successfully: exit 
> code: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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