Skip to content

Commit 894202c

Browse files
potiukephraimbuddy
authored andcommitted
Fix inconsistency of cache-directive vs. docker-cache (#38580)
This was the same parameter but inconsistently named across the CI/Selective checks. This PR fixes the inconsistency and changes it to `docker-cache` across the board. (cherry picked from commit d11a943)
1 parent 8f7d891 commit 894202c

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

.github/workflows/build-images.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
run-kubernetes-tests: ${{ steps.selective-checks.outputs.run-kubernetes-tests }}
6666
ci-image-build: ${{ steps.selective-checks.outputs.ci-image-build }}
6767
prod-image-build: ${{ steps.selective-checks.outputs.prod-image-build }}
68-
cache-directive: ${{ steps.selective-checks.outputs.cache-directive }}
68+
docker-cache: ${{ steps.selective-checks.outputs.docker-cache }}
6969
default-branch: ${{ steps.selective-checks.outputs.default-branch }}
7070
constraints-branch: ${{ steps.selective-checks.outputs.default-constraints-branch }}
7171
runs-on-as-json-default: ${{ steps.selective-checks.outputs.runs-on-as-json-default }}
@@ -188,7 +188,7 @@ jobs:
188188
branch: ${{ needs.build-info.outputs.default-branch }}
189189
constraints-branch: ${{ needs.build-info.outputs.constraints-branch }}
190190
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
191-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
191+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
192192

193193
generate-constraints:
194194
name: "Generate constraints"
@@ -234,4 +234,4 @@ jobs:
234234
build-provider-packages: "true"
235235
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
236236
chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
237-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
237+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
GITHUB_CONTEXT: ${{ toJson(github) }}
5555
outputs:
5656
image-tag: ${{ github.event.pull_request.head.sha || github.sha }}
57-
cache-directive: ${{ steps.selective-checks.outputs.cache-directive }}
57+
docker-cache: ${{ steps.selective-checks.outputs.docker-cache }}
5858
affected-providers-list-as-string: >-
5959
${{ steps.selective-checks.outputs.affected-providers-list-as-string }}
6060
upgrade-to-newer-dependencies: ${{ steps.selective-checks.outputs.upgrade-to-newer-dependencies }}
@@ -193,7 +193,7 @@ jobs:
193193
use-uv: "true"
194194
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
195195
constraints-branch: ${{ needs.build-info.outputs.default-constraints-branch }}
196-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
196+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
197197

198198
wait-for-ci-images:
199199
timeout-minutes: 120
@@ -249,7 +249,7 @@ jobs:
249249
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
250250
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
251251
skip-pre-commits: ${{ needs.build-info.outputs.skip-pre-commits }}
252-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
252+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
253253
canary-run: ${{ needs.build-info.outputs.canary-run }}
254254
latest-versions-only: ${{ needs.build-info.outputs.latest-versions-only }}
255255
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
@@ -509,7 +509,7 @@ jobs:
509509
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
510510
chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
511511
constraints-branch: ${{ needs.build-info.outputs.default-constraints-branch }}
512-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
512+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
513513

514514
wait-for-prod-images:
515515
timeout-minutes: 80
@@ -565,7 +565,7 @@ jobs:
565565
image-tag: ${{ needs.build-info.outputs.image-tag }}
566566
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
567567
chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
568-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
568+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
569569
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
570570
canary-run: ${{ needs.build-info.outputs.canary-run }}
571571
if: needs.build-info.outputs.prod-image-build == 'true'
@@ -621,5 +621,5 @@ jobs:
621621
in-workflow-build: ${{ needs.build-info.outputs.in-workflow-build }}
622622
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
623623
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
624-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
624+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
625625
canary-run: ${{ needs.build-info.outputs.canary-run }}

dev/breeze/doc/ci/04_selective_checks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ Github Actions to pass the list of parameters to a command to execute
172172
| all-versions | If set to true, then all python, k8s, DB versions are used for tests. | false | |
173173
| basic-checks-only | Whether to run all static checks ("false") or only basic set of static checks ("true") | false | |
174174
| build_system_changed_in_pyproject_toml | When builds system dependencies changed in pyproject.toml changed in the PR. | false | |
175-
| cache-directive | Which cache should be used for images ("registry", "local" , "disabled") | registry | |
176175
| chicken-egg-providers | List of providers that should be considered as "chicken-egg" - expecting development Airflow version | | |
177176
| ci-image-build | Whether CI image build is needed | true | |
178177
| debug-resources | Whether resources usage should be printed during parallel job execution ("true"/ "false") | false | |
@@ -184,6 +183,7 @@ Github Actions to pass the list of parameters to a command to execute
184183
| default-mysql-version | Which MySQL version to use as default | 5.7 | |
185184
| default-postgres-version | Which Postgres version to use as default | 10 | |
186185
| default-python-version | Which Python version to use as default | 3.8 | |
186+
| docker-cache | Which cache should be used for images ("registry", "local" , "disabled") | registry | |
187187
| docs-build | Whether to build documentation ("true"/"false") | true | |
188188
| docs-list-as-string | What filter to apply to docs building - based on which documentation packages should be built | apache-airflow helm-chart google | |
189189
| full-tests-needed | Whether this build runs complete set of tests or only subset (for faster PR builds) [1] | false | |
@@ -303,7 +303,7 @@ am overview of possible labels and their meaning:
303303
| canary | is-canary-run | If set, the PR run from apache/airflow repo behaves as `canary` run (can only be run by maintainer). |
304304
| debug ci resources | debug-ci-resources | If set, then debugging resources is enabled during parallel tests and you can see them in the output. |
305305
| default versions only | all-versions, *-versions-* | If set, the number of Python and Kubernetes, DB versions used by the build will be limited to the default ones. |
306-
| disable image cache | cache-directive | If set, the image cache is disables when building the image. |
306+
| disable image cache | docker-cache | If set, the image cache is disables when building the image. |
307307
| include success outputs | include-success-outputs | By default, outputs of successful parallel tests are not shown - enabling this flag will make then shown. |
308308
| latest versions only | *-versions-*, *-versions-* | If set, the number of Python, Kubernetes, DB versions used by the build will be limited to the latest ones. |
309309
| all versions | all-versions, *-versions-* | Run tests for all python and k8s versions. |

dev/breeze/src/airflow_breeze/utils/selective_checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ def skip_provider_tests(self) -> bool:
10771077
return True
10781078

10791079
@cached_property
1080-
def cache_directive(self) -> str:
1080+
def docker_cache(self) -> str:
10811081
return (
10821082
"disabled"
10831083
if (self._github_event == GithubEvents.SCHEDULE or DISABLE_IMAGE_CACHE_LABEL in self._pr_labels)

0 commit comments

Comments
 (0)