Skip to content

Commit b5878d0

Browse files
authored
GH-46343: [CI] Avoid installing gdb 16.3 on python 3.10 jobs to fix CI (#46511)
### Rationale for this change The Python 3.10 jobs are currently failing due to conda gdb==16.3 being installed and having an issue. ### What changes are included in this PR? Pin gdb<16.3 for python==3.10 to fix CI. ### Are these changes tested? On CI ### Are there any user-facing changes? No * GitHub Issue: #46343 Authored-by: Raúl Cumplido <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent a1707db commit b5878d0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ci/docker/conda-python.dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,19 @@ FROM ${repo}:${arch}-conda-cpp
2323
ARG python=3.9
2424
COPY ci/conda_env_python.txt \
2525
/arrow/ci/
26+
# If the Python version being used is 3.10 we need to install gdb<16.3 (GH-46343).
2627
# If the Python version being tested is the same as the Python used by the system gdb,
2728
# we need to install the conda-forge gdb instead (GH-38323).
28-
RUN mamba install -q -y \
29+
RUN if [ "$python" == "3.10" ]; then \
30+
GDB_PACKAGE="gdb<16.3"; \
31+
elif [ "$python" == "$(gdb --batch --eval-command 'python import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')" ]; then \
32+
GDB_PACKAGE="gdb"; \
33+
else \
34+
GDB_PACKAGE=""; \
35+
fi && \
36+
mamba install -q -y \
2937
--file arrow/ci/conda_env_python.txt \
30-
$([ "$python" == $(gdb --batch --eval-command 'python import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') ] && echo "gdb") \
38+
$([[ -n "$GDB_PACKAGE" ]] && echo "$GDB_PACKAGE") \
3139
"python=${python}.*=*_cp*" \
3240
nomkl && \
3341
mamba clean --all --yes

0 commit comments

Comments
 (0)