Skip to content
Permalink
Browse files
Add missing "airflow-constraints-reference" parameter (#23844)
The build commands were missing "airflow-constraints-reference"
parameter and it always defaulted to constraints-main
  • Loading branch information
potiuk committed May 21, 2022
1 parent 5802e4e commit cc3ab432e32485e491d81c180ec807b275a0cafa
Showing 6 changed files with 172 additions and 156 deletions.
@@ -22,6 +22,7 @@

import click

from airflow_breeze.branch_defaults import DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
from airflow_breeze.commands.main_command import main
from airflow_breeze.params.build_ci_params import BuildCiParams
from airflow_breeze.params.shell_params import ShellParams
@@ -124,6 +125,7 @@
"options": [
"--install-providers-from-sources",
"--airflow-constraints-mode",
"--airflow-constraints-reference",
"--additional-python-deps",
"--runtime-apt-deps",
"--runtime-apt-command",
@@ -219,6 +221,12 @@
@option_runtime_apt_deps
@option_force_build
@option_airflow_constraints_mode_ci
@click.option(
"--airflow-constraints-reference",
default=DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH,
help="Constraint reference to use when building the image.",
envvar='AIRFLOW_CONSTRAINTS_REFERENCE',
)
@option_tag_as_latest
def build_image(
verbose: bool,
@@ -21,6 +21,7 @@

import click

from airflow_breeze.branch_defaults import DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
from airflow_breeze.commands.main_command import main
from airflow_breeze.global_constants import ALLOWED_INSTALLATION_METHODS, DEFAULT_EXTRAS
from airflow_breeze.params.build_prod_params import BuildProdParams
@@ -113,6 +114,7 @@
"--install-providers-from-sources",
"--airflow-extras",
"--airflow-constraints-mode",
"--airflow-constraints-reference",
"--additional-python-deps",
"--additional-extras",
"--additional-runtime-apt-deps",
@@ -247,6 +249,12 @@
'--install-airflow-reference',
help="Install Airflow using GitHub tag or branch.",
)
@click.option(
"--airflow-constraints-reference",
default=DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH,
help="Constraint reference to use when building the image.",
envvar='AIRFLOW_CONSTRAINTS_REFERENCE',
)
@click.option('-V', '--install-airflow-version', help="Install version of Airflow from PyPI.")
@option_additional_extras
@option_additional_dev_apt_deps
@@ -19,7 +19,6 @@

import click

from airflow_breeze.branch_defaults import DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
from airflow_breeze.global_constants import (
ALLOWED_BACKENDS,
ALLOWED_BUILD_CACHE,
@@ -414,7 +413,6 @@
)
option_airflow_constraints_reference = click.option(
"--airflow-constraints-reference",
default=DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH,
help="Constraint reference to use. Useful with --use-airflow-version parameter to specify "
"constraints for the installed version and to find newer dependencies",
envvar='AIRFLOW_CONSTRAINTS_REFERENCE',

0 comments on commit cc3ab43

Please sign in to comment.