diff --git a/dev/breeze/src/airflow_breeze/breeze.py b/dev/breeze/src/airflow_breeze/breeze.py index 8f70ae99bb..92aec99922 100755 --- a/dev/breeze/src/airflow_breeze/breeze.py +++ b/dev/breeze/src/airflow_breeze/breeze.py @@ -302,7 +302,7 @@ def build_ci_image( build_cache: Optional[str], platform: Optional[str], debian_version: Optional[str], - upgrade_to_newer_dependencies: Optional[str], + upgrade_to_newer_dependencies: str = "false", ): """Builds docker CI image without entering the container.""" @@ -331,7 +331,7 @@ def build_ci_image( docker_cache=build_cache, platform=platform, debian_version=debian_version, - upgrade_newer_dependencies=upgrade_to_newer_dependencies, + upgrade_to_newer_dependencies=upgrade_to_newer_dependencies, ) @@ -409,7 +409,7 @@ def build_prod_image( github_repository: Optional[str], platform: Optional[str], debian_version: Optional[str], - upgrade_to_newer_dependencies: bool, + upgrade_to_newer_dependencies: str, prepare_buildx_cache: bool, skip_installing_airflow_providers_from_sources: bool, disable_pypi_when_building: bool, @@ -454,7 +454,7 @@ def build_prod_image( github_repository=github_repository, platform=platform, debian_version=debian_version, - upgrade_newer_dependencies=upgrade_to_newer_dependencies, + upgrade_to_newer_dependencies=upgrade_to_newer_dependencies, prepare_buildx_cache=prepare_buildx_cache, skip_installing_airflow_providers_from_sources=skip_installing_airflow_providers_from_sources, disable_pypi_when_building=disable_pypi_when_building, diff --git a/dev/breeze/src/airflow_breeze/ci/build_params.py b/dev/breeze/src/airflow_breeze/ci/build_params.py index fd4c9bb458..23eef6f37c 100644 --- a/dev/breeze/src/airflow_breeze/ci/build_params.py +++ b/dev/breeze/src/airflow_breeze/ci/build_params.py @@ -27,7 +27,7 @@ @dataclass class BuildParams: # To construct ci_image_name - upgrade_newer_dependencies: bool = False + upgrade_to_newer_dependencies: str = "false" python_version: str = "3.7" airflow_branch: str = AIRFLOW_BRANCH build_id: int = 0 @@ -121,10 +121,3 @@ def docker_cache_ci_directive(self) -> List: @property def airflow_version(self): return get_airflow_version() - - @property - def upgrade_to_newer_dependencies(self) -> str: - upgrade_to_newer_dependencies = 'false' - if self.upgrade_newer_dependencies: - upgrade_to_newer_dependencies = 'true' - return upgrade_to_newer_dependencies diff --git a/dev/breeze/src/airflow_breeze/prod/prod_params.py b/dev/breeze/src/airflow_breeze/prod/prod_params.py index 51986a72d7..73d5305ed6 100644 --- a/dev/breeze/src/airflow_breeze/prod/prod_params.py +++ b/dev/breeze/src/airflow_breeze/prod/prod_params.py @@ -47,7 +47,7 @@ class ProdParams: install_docker_context_files: bool disable_pypi_when_building: bool disable_pip_cache: bool - upgrade_newer_dependencies: bool + upgrade_to_newer_dependencies: str skip_installing_airflow_providers_from_sources: bool cleanup_docker_context_files: bool prepare_buildx_cache: bool @@ -364,13 +364,6 @@ def install_from_docker_context_files(self) -> str: install_from_docker_context_files = 'true' return install_from_docker_context_files - @property - def upgrade_to_newer_dependencies(self) -> str: - upgrade_to_newer_dependencies = 'false' - if self.upgrade_newer_dependencies: - upgrade_to_newer_dependencies = 'true' - return upgrade_to_newer_dependencies - @property def airflow_extras(self): return get_airflow_extras() diff --git a/dev/breeze/tests/test_prod_image.py b/dev/breeze/tests/test_prod_image.py index a3b8d5b5e4..09507709f4 100644 --- a/dev/breeze/tests/test_prod_image.py +++ b/dev/breeze/tests/test_prod_image.py @@ -32,7 +32,7 @@ 'install_docker_context_files': False, 'disable_pypi_when_building': False, 'disable_pip_cache': False, - 'upgrade_newer_dependencies': False, + 'upgrade_to_newer_dependencies': False, 'skip_installing_airflow_providers_from_sources': False, 'cleanup_docker_context_files': False, 'prepare_buildx_cache': False,