Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions dev/breeze/doc/images/output_start-airflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dev/breeze/doc/images/output_start-airflow.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6d48fc396beb2ab18c5e85071656a293
bafda7edfe9d6ac17297d32f90fa87a3
13 changes: 13 additions & 0 deletions dev/breeze/src/airflow_breeze/commands/developer_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
DEFAULT_ALLOWED_EXECUTOR,
DEFAULT_CELERY_BROKER,
DEFAULT_PYTHON_MAJOR_MINOR_VERSION,
DEFAULT_TEMPLATE_SEARCHPATH,
GITHUB_REPO_BRANCH_PATTERN,
MOUNT_ALL,
START_AIRFLOW_ALLOWED_EXECUTORS,
Expand Down Expand Up @@ -498,6 +499,15 @@ def shell(
show_default=True,
)

option_template_searchpath = click.option(
"--template-searchpath",
type=str,
help="Specify the template search path to use inside Airflow.",
default=DEFAULT_TEMPLATE_SEARCHPATH,
envvar="AIRFLOW__CORE__TEMPLATE_SEARCHPATH",
show_default=True,
)


@main.command(name="start-airflow")
@click.option(
Expand Down Expand Up @@ -557,6 +567,7 @@ def shell(
@option_allow_pre_releases
@option_use_distributions_from_dist
@option_verbose
@option_template_searchpath
def start_airflow(
airflow_constraints_mode: str,
airflow_constraints_location: str,
Expand Down Expand Up @@ -602,6 +613,7 @@ def start_airflow(
use_distributions_from_dist: bool,
use_uv: bool,
uv_http_timeout: int,
template_searchpath: str,
):
"""
Enter breeze environment and starts all Airflow components in the tmux session.
Expand Down Expand Up @@ -675,6 +687,7 @@ def start_airflow(
use_distributions_from_dist=use_distributions_from_dist,
use_uv=use_uv,
uv_http_timeout=uv_http_timeout,
template_searchpath=template_searchpath,
)
rebuild_or_pull_ci_image_if_needed(command_params=shell_params)
result = enter_shell(shell_params=shell_params)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@
"name": "Debugging options",
"options": ["--debug", "--debugger"],
},
{"name": "config", "options": ["--template-searchpath"]},
],
"breeze exec": [
{"name": "Drops in the interactive shell of active airflow container"},
Expand Down
4 changes: 4 additions & 0 deletions dev/breeze/src/airflow_breeze/global_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,3 +794,7 @@ class GithubEvents(Enum):
@clearable_cache
def github_events() -> list[str]:
return [e.value for e in GithubEvents]


# Define the default template path
DEFAULT_TEMPLATE_SEARCHPATH = "/opt/airflow/dags/include"
Loading