Skip to content

Commit d11a943

Browse files
authored
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.
1 parent b06f401 commit d11a943

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: ${{steps.selective-checks.outputs.runs-on}}
@@ -186,7 +186,7 @@ jobs:
186186
branch: ${{ needs.build-info.outputs.default-branch }}
187187
constraints-branch: ${{ needs.build-info.outputs.constraints-branch }}
188188
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
189-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
189+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
190190

191191
build-prod-images:
192192
name: Build PROD images
@@ -220,4 +220,4 @@ jobs:
220220
build-provider-packages: "true"
221221
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
222222
chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
223-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
223+
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
@@ -57,7 +57,7 @@ jobs:
5757
GITHUB_CONTEXT: ${{ toJson(github) }}
5858
outputs:
5959
image-tag: ${{ github.event.pull_request.head.sha || github.sha }}
60-
cache-directive: ${{ steps.selective-checks.outputs.cache-directive }}
60+
docker-cache: ${{ steps.selective-checks.outputs.docker-cache }}
6161
affected-providers-list-as-string: >-
6262
${{ steps.selective-checks.outputs.affected-providers-list-as-string }}
6363
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
@@ -246,7 +246,7 @@ jobs:
246246
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
247247
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
248248
skip-pre-commits: ${{ needs.build-info.outputs.skip-pre-commits }}
249-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
249+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
250250
canary-run: ${{ needs.build-info.outputs.canary-run }}
251251
mypy-folders: ${{ needs.build-info.outputs.mypy-folders }}
252252
needs-mypy: ${{ needs.build-info.outputs.needs-mypy }}
@@ -502,7 +502,7 @@ jobs:
502502
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
503503
chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
504504
constraints-branch: ${{ needs.build-info.outputs.default-constraints-branch }}
505-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
505+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
506506

507507
wait-for-prod-images:
508508
timeout-minutes: 80
@@ -558,7 +558,7 @@ jobs:
558558
image-tag: ${{ needs.build-info.outputs.image-tag }}
559559
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
560560
chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
561-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
561+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
562562
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
563563
canary-run: ${{ needs.build-info.outputs.canary-run }}
564564
if: needs.build-info.outputs.prod-image-build == 'true'
@@ -613,5 +613,5 @@ jobs:
613613
in-workflow-build: ${{ needs.build-info.outputs.in-workflow-build }}
614614
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
615615
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
616-
docker-cache: ${{ needs.build-info.outputs.cache-directive }}
616+
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
617617
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 | |
@@ -301,7 +301,7 @@ am overview of possible labels and their meaning:
301301
| canary | is-canary-run | If set, the PR run from apache/airflow repo behaves as `canary` run (can only be run by maintainer). |
302302
| debug ci resources | debug-ci-resources | If set, then debugging resources is enabled during parallel tests and you can see them in the output. |
303303
| 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. |
304-
| disable image cache | cache-directive | If set, the image cache is disables when building the image. |
304+
| disable image cache | docker-cache | If set, the image cache is disables when building the image. |
305305
| include success outputs | include-success-outputs | By default, outputs of successful parallel tests are not shown - enabling this flag will make then shown. |
306306
| 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. |
307307
| 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
@@ -1069,7 +1069,7 @@ def skip_provider_tests(self) -> bool:
10691069
return True
10701070

10711071
@cached_property
1072-
def cache_directive(self) -> str:
1072+
def docker_cache(self) -> str:
10731073
return (
10741074
"disabled"
10751075
if (self._github_event == GithubEvents.SCHEDULE or DISABLE_IMAGE_CACHE_LABEL in self._pr_labels)

0 commit comments

Comments
 (0)