You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/09/04 08:34:12 UTC

[airflow] branch main updated: Use proper default airflow_constraints_reference (#26148)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new f74a2236f4 Use proper default airflow_constraints_reference (#26148)
f74a2236f4 is described below

commit f74a2236f42fbaa83c1ad8bf4fe9bce045f67571
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Sun Sep 4 10:33:46 2022 +0200

    Use proper default airflow_constraints_reference (#26148)
    
    In case image was built by `breeze` and not by `build` command.
    default value of the arg was wrong (empty) rather than default
    constraint branch. That led to early cache invalidation and much
    longer image build than necessary.
---
 dev/breeze/src/airflow_breeze/params/build_ci_params.py   | 3 ++-
 dev/breeze/src/airflow_breeze/params/build_prod_params.py | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dev/breeze/src/airflow_breeze/params/build_ci_params.py b/dev/breeze/src/airflow_breeze/params/build_ci_params.py
index 53ae1cbc64..4999d6ba8b 100644
--- a/dev/breeze/src/airflow_breeze/params/build_ci_params.py
+++ b/dev/breeze/src/airflow_breeze/params/build_ci_params.py
@@ -18,6 +18,7 @@ from dataclasses import dataclass
 from pathlib import Path
 from typing import List
 
+from airflow_breeze.branch_defaults import DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
 from airflow_breeze.global_constants import get_airflow_version
 from airflow_breeze.params.common_build_params import CommonBuildParams
 from airflow_breeze.utils.path_utils import BUILD_CACHE_DIR
@@ -30,7 +31,7 @@ class BuildCiParams(CommonBuildParams):
     """
 
     airflow_constraints_mode: str = "constraints-source-providers"
-    airflow_constraints_reference: str = ""
+    airflow_constraints_reference: str = DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
     airflow_extras: str = "devel_ci"
     airflow_pre_cached_pip_packages: bool = True
     force_build: bool = False
diff --git a/dev/breeze/src/airflow_breeze/params/build_prod_params.py b/dev/breeze/src/airflow_breeze/params/build_prod_params.py
index 19c3441c4e..847746fc5c 100644
--- a/dev/breeze/src/airflow_breeze/params/build_prod_params.py
+++ b/dev/breeze/src/airflow_breeze/params/build_prod_params.py
@@ -21,7 +21,7 @@ import sys
 from dataclasses import dataclass
 from typing import List
 
-from airflow_breeze.branch_defaults import AIRFLOW_BRANCH
+from airflow_breeze.branch_defaults import AIRFLOW_BRANCH, DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
 from airflow_breeze.global_constants import (
     AIRFLOW_SOURCES_FROM,
     AIRFLOW_SOURCES_TO,
@@ -42,7 +42,7 @@ class BuildProdParams(CommonBuildParams):
     additional_runtime_apt_deps: str = ""
     additional_runtime_apt_env: str = ""
     airflow_constraints_mode: str = "constraints"
-    airflow_constraints_reference: str = ""
+    airflow_constraints_reference: str = DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
     cleanup_context: bool = False
     airflow_extras: str = get_airflow_extras()
     disable_airflow_repo_cache: bool = False