Skip to content

Commit 51a84ce

Browse files
authored
More diagnostics and more logical name for cleaning up the runner (#50540)
When we are starting the runner on CI we are cleaning it up and preparing the /mnt directory to be used for all kind of disk storage we need during CI build. This is happening in the step that was named "cleanup docker" but it did more than that. The script and all references to it are renamed, also more diagnostics is printed just before we restore CI image from cache to see how much space we have available, because for some reason we seem to have problems with disk space there in some jobs
1 parent 0da1106 commit 51a84ce

18 files changed

+62
-59
lines changed

.github/actions/prepare_breeze_and_image/action.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,19 @@ outputs:
3838
runs:
3939
using: "composite"
4040
steps:
41-
- name: "Cleanup docker"
42-
run: ./scripts/ci/cleanup_docker.sh
41+
- name: "Prepare and cleanup runner"
42+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
4343
shell: bash
4444
- name: "Install Breeze"
4545
uses: ./.github/actions/breeze
4646
with:
4747
use-uv: ${{ inputs.use-uv }}
4848
id: breeze
49+
- name: "Check free space"
50+
shell: bash
51+
run: |
52+
echo "Checking free space!"
53+
df -H
4954
- name: "Restore ${{ inputs.image-type }} docker image ${{ inputs.platform }}:${{ inputs.python }}"
5055
uses: apache/infrastructure-actions/stash/restore@1c35b5ccf8fba5d4c3fdf25a045ca91aa0cbc468
5156
with:

.github/workflows/additional-ci-image-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ jobs:
138138
uses: actions/checkout@v4
139139
with:
140140
persist-credentials: false
141-
- name: "Cleanup docker"
142-
run: ./scripts/ci/cleanup_docker.sh
141+
- name: "Prepare and cleanup runner"
142+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
143143
- name: "Install Breeze"
144144
uses: ./.github/actions/breeze
145145
with:

.github/workflows/additional-prod-image-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ jobs:
113113
with:
114114
fetch-depth: 2
115115
persist-credentials: false
116-
- name: "Cleanup docker"
117-
run: ./scripts/ci/cleanup_docker.sh
118116
- name: "Prepare breeze & PROD image: ${{ inputs.default-python-version }}"
119117
uses: ./.github/actions/prepare_breeze_and_image
120118
with:

.github/workflows/basic-tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ jobs:
7676
# Need to fetch all history for selective checks tests
7777
fetch-depth: 0
7878
persist-credentials: false
79-
- name: "Cleanup docker"
80-
run: ./scripts/ci/cleanup_docker.sh
79+
- name: "Prepare and cleanup runner"
80+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
8181
- name: "Install Breeze"
8282
uses: ./.github/actions/breeze
8383
with:
@@ -97,8 +97,8 @@ jobs:
9797
uses: actions/checkout@v4
9898
with:
9999
persist-credentials: false
100-
- name: "Cleanup docker"
101-
run: ./scripts/ci/cleanup_docker.sh
100+
- name: "Prepare and cleanup runner"
101+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
102102
- name: Setup pnpm
103103
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
104104
with:
@@ -194,8 +194,8 @@ jobs:
194194
uses: actions/checkout@v4
195195
with:
196196
persist-credentials: false
197-
- name: "Cleanup docker"
198-
run: ./scripts/ci/cleanup_docker.sh
197+
- name: "Prepare and cleanup runner"
198+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
199199
- name: "Install Breeze"
200200
uses: ./.github/actions/breeze
201201
with:
@@ -249,8 +249,8 @@ jobs:
249249
uses: actions/checkout@v4
250250
with:
251251
persist-credentials: false
252-
- name: "Cleanup docker"
253-
run: ./scripts/ci/cleanup_docker.sh
252+
- name: "Prepare and cleanup runner"
253+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
254254
- name: "Install Breeze"
255255
uses: ./.github/actions/breeze
256256
with:
@@ -322,8 +322,8 @@ jobs:
322322
uses: actions/checkout@v4
323323
with:
324324
persist-credentials: false
325-
- name: "Cleanup docker"
326-
run: ./scripts/ci/cleanup_docker.sh
325+
- name: "Prepare and cleanup runner"
326+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
327327
- name: "Install Breeze"
328328
uses: ./.github/actions/breeze
329329
with:

.github/workflows/ci-amd.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ jobs:
137137
uses: actions/checkout@v4
138138
with:
139139
persist-credentials: false
140-
- name: "Cleanup docker"
141-
run: ./scripts/ci/cleanup_docker.sh
140+
- name: "Prepare and cleanup runner"
141+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
142142
- name: Fetch incoming commit ${{ github.sha }} with its parent
143143
uses: actions/checkout@v4
144144
with:
@@ -864,8 +864,8 @@ jobs:
864864
uses: actions/checkout@v4
865865
with:
866866
persist-credentials: false
867-
- name: "Cleanup docker"
868-
run: ./scripts/ci/cleanup_docker.sh
867+
- name: "Prepare and cleanup runner"
868+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
869869
- name: "Free up disk space"
870870
shell: bash
871871
run: ./scripts/tools/free_up_disk_space.sh

.github/workflows/ci-arm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ jobs:
130130
uses: actions/checkout@v4
131131
with:
132132
persist-credentials: false
133-
- name: "Cleanup docker"
134-
run: ./scripts/ci/cleanup_docker.sh
133+
- name: "Prepare and cleanup runner"
134+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
135135
- name: Fetch incoming commit ${{ github.sha }} with its parent
136136
uses: actions/checkout@v4
137137
with:

.github/workflows/ci-image-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ jobs:
120120
uses: actions/checkout@v4
121121
with:
122122
persist-credentials: false
123-
- name: "Cleanup docker"
124-
run: ./scripts/ci/cleanup_docker.sh
123+
- name: "Prepare and cleanup runner"
124+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
125125
- name: "Install Breeze"
126126
uses: ./.github/actions/breeze
127127
with:

.github/workflows/ci-image-checks.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,15 @@ jobs:
330330
uses: actions/checkout@v4
331331
with:
332332
persist-credentials: false
333-
- name: "Cleanup docker"
334-
run: ./scripts/ci/cleanup_docker.sh
333+
- name: "Prepare and cleanup runner"
334+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
335335
- name: "Download docs prepared as artifacts"
336336
uses: actions/download-artifact@v4
337337
with:
338338
name: airflow-docs
339339
path: './generated/_build'
340340
- name: Check disk space available
341-
run: df -h
341+
run: df -H
342342
- name: Create /mnt/airflow-site directory
343343
run: sudo mkdir -p /mnt/airflow-site && sudo chown -R "${USER}" /mnt/airflow-site
344344
- name: "Clone airflow-site"
@@ -358,7 +358,7 @@ jobs:
358358
breeze release-management publish-docs --override-versioned --run-in-parallel
359359
${DOCS_LIST_AS_STRING}
360360
- name: Check disk space available
361-
run: df -h
361+
run: df -H
362362
- name: "Generate back references for providers"
363363
run: breeze release-management add-back-references all-providers
364364
- name: "Generate back references for apache-airflow"
@@ -408,8 +408,6 @@ jobs:
408408
with:
409409
fetch-depth: 2
410410
persist-credentials: false
411-
- name: "Cleanup docker"
412-
run: ./scripts/ci/cleanup_docker.sh
413411
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
414412
uses: actions/checkout@v4
415413
with:

.github/workflows/finalize-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ jobs:
103103
with:
104104
# Needed to perform push action
105105
persist-credentials: false
106-
- name: "Cleanup docker"
107-
run: ./scripts/ci/cleanup_docker.sh
106+
- name: "Prepare and cleanup runner"
107+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
108108
- name: "Set constraints branch name"
109109
id: constraints-branch
110110
run: ./scripts/ci/constraints/ci_branch_constraints.sh >> ${GITHUB_OUTPUT}

.github/workflows/generate-constraints.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ jobs:
6767
uses: actions/checkout@v4
6868
with:
6969
persist-credentials: false
70-
- name: "Cleanup docker"
71-
run: ./scripts/ci/cleanup_docker.sh
70+
- name: "Prepare and cleanup runner"
71+
run: ./scripts/ci/prepare_and_cleanup_runner.sh
7272
shell: bash
7373
- name: "Install Breeze"
7474
uses: ./.github/actions/breeze

0 commit comments

Comments
 (0)