Skip to content

Commit be3b789

Browse files
authored
GH-40954: [CI] Fix use of obsolete docker-compose command on Github Actions (#40949)
### Rationale for this change The `docker-compose` utility is progressively being removed from GHA-provided runners: actions/runner-images#9557 ### What changes are included in this PR? Use `docker` client CLI directly instead of `docker-compose` where possible. ### Are these changes tested? Yes, this should fix the sporadic CI failures because of the above migration. ### Are there any user-facing changes? No, except additional optional env var `ARCHERY_DEBUG`. * GitHub Issue: #40954 Authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent 41a989c commit be3b789

23 files changed

Lines changed: 117 additions & 87 deletions

File tree

.github/workflows/archery.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ on:
3232
- 'docker-compose.yml'
3333

3434
env:
35+
ARCHERY_DEBUG: 1
3536
ARCHERY_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
37+
ARCHERY_USE_DOCKER_CLI: 1
3638

3739
concurrency:
3840
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}

.github/workflows/cpp.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ permissions:
5353
contents: read
5454

5555
env:
56+
ARCHERY_DEBUG: 1
5657
ARROW_ENABLE_TIMING_TESTS: OFF
5758
DOCKER_VOLUME_PREFIX: ".docker/"
5859

@@ -94,6 +95,7 @@ jobs:
9495
cat <<JSON >> "$GITHUB_OUTPUT"
9596
{
9697
"arch": "arm64v8",
98+
"archery-use-docker-cli": "0",
9799
"clang-tools": "10",
98100
"image": "ubuntu-cpp",
99101
"llvm": "10",
@@ -118,6 +120,9 @@ jobs:
118120
include: ${{ fromJson(needs.docker-targets.outputs.targets) }}
119121
env:
120122
ARCH: ${{ matrix.arch }}
123+
# By default, use Docker CLI because docker-compose v1 is obsolete,
124+
# except where the Docker client version is too old.
125+
ARCHERY_USE_DOCKER_CLI: ${{ matrix.archery-use-docker-cli || '1' }}
121126
ARROW_SIMD_LEVEL: ${{ matrix.simd-level }}
122127
CLANG_TOOLS: ${{ matrix.clang-tools }}
123128
LLVM: ${{ matrix.llvm }}

.github/workflows/dev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ concurrency:
2929
permissions:
3030
contents: read
3131

32+
env:
33+
ARCHERY_DEBUG: 1
34+
ARCHERY_USE_DOCKER_CLI: 1
35+
3236
jobs:
3337

3438
lint:

.github/workflows/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ permissions:
2424
contents: read
2525

2626
env:
27+
ARCHERY_DEBUG: 1
28+
ARCHERY_USE_DOCKER_CLI: 1
2729
ARROW_ENABLE_TIMING_TESTS: OFF
2830
DOCKER_VOLUME_PREFIX: ".docker/"
2931

.github/workflows/docs_light.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ permissions:
3333
contents: read
3434

3535
env:
36+
ARCHERY_DEBUG: 1
37+
ARCHERY_USE_DOCKER_CLI: 1
3638
ARROW_ENABLE_TIMING_TESTS: OFF
3739
DOCKER_VOLUME_PREFIX: ".docker/"
3840

.github/workflows/go.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ concurrency:
4141
permissions:
4242
contents: read
4343

44+
env:
45+
ARCHERY_DEBUG: 1
46+
ARCHERY_USE_DOCKER_CLI: 1
47+
4448
jobs:
4549

4650
docker-targets:
@@ -75,12 +79,14 @@ jobs:
7579
{
7680
"arch-label": "ARM64",
7781
"arch": "arm64v8",
82+
"archery-use-docker-cli": "0",
7883
"go": "1.21",
7984
"runs-on": ["self-hosted", "arm", "linux"]
8085
},
8186
{
8287
"arch-label": "ARM64",
8388
"arch": "arm64v8",
89+
"archery-use-docker-cli": "0",
8490
"go": "1.22",
8591
"runs-on": ["self-hosted", "arm", "linux"]
8692
}
@@ -101,6 +107,9 @@ jobs:
101107
include: ${{ fromJson(needs.docker-targets.outputs.targets) }}
102108
env:
103109
ARCH: ${{ matrix.arch }}
110+
# By default, use Docker CLI because docker-compose v1 is obsolete,
111+
# except where the Docker client version is too old.
112+
ARCHERY_USE_DOCKER_CLI: ${{ matrix.archery-use-docker-cli || '1' }}
104113
GO: ${{ matrix.go }}
105114
steps:
106115
- name: Checkout Arrow

.github/workflows/integration.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ permissions:
5151
contents: read
5252

5353
env:
54+
ARCHERY_DEBUG: 1
55+
ARCHERY_USE_DOCKER_CLI: 1
5456
DOCKER_VOLUME_PREFIX: ".docker/"
5557

5658
jobs:

.github/workflows/java.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ permissions:
4545
contents: read
4646

4747
env:
48+
ARCHERY_DEBUG: 1
49+
ARCHERY_USE_DOCKER_CLI: 1
4850
DOCKER_VOLUME_PREFIX: ".docker/"
4951

5052
jobs:

.github/workflows/java_jni.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ permissions:
4545
contents: read
4646

4747
env:
48+
ARCHERY_DEBUG: 1
49+
ARCHERY_USE_DOCKER_CLI: 1
4850
DOCKER_VOLUME_PREFIX: ".docker/"
4951

5052
jobs:

.github/workflows/js.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ concurrency:
3838
permissions:
3939
contents: read
4040

41+
env:
42+
ARCHERY_DEBUG: 1
43+
ARCHERY_USE_DOCKER_CLI: 1
44+
4145
jobs:
4246

4347
docker:

0 commit comments

Comments
 (0)