Skip to content
Merged
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
162 changes: 87 additions & 75 deletions dev/breeze/doc/images/output-commands.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 18 additions & 10 deletions dev/breeze/doc/images/output_setup_config.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_setup_config.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cd3fabb1a38538e7a9d0e7b58426864a
56e7d6da2cb474fc0bc61f9004966c8e
318 changes: 165 additions & 153 deletions dev/breeze/doc/images/output_shell.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_shell.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7ec5626b3d45d0ca4ae3dbac837b9f02
8e478b2245f79a47dddb863a3d5a5479
262 changes: 129 additions & 133 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
e84a22cb90aa0fd0d9a9f1deba6a5456
10 changes: 10 additions & 0 deletions dev/breeze/src/airflow_breeze/commands/common_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

from airflow_breeze.global_constants import (
ALL_HISTORICAL_PYTHON_VERSIONS,
ALLOWED_AUTH_MANAGERS,
ALLOWED_BACKENDS,
ALLOWED_DOCKER_COMPOSE_PROJECTS,
ALLOWED_INSTALLATION_DISTRIBUTION_FORMATS,
Expand Down Expand Up @@ -531,6 +532,15 @@ def _validate_version_suffix(ctx: click.core.Context, param: click.core.Option,
)


option_auth_manager = click.option(
"--auth-manager",
type=CacheableChoice(ALLOWED_AUTH_MANAGERS, case_sensitive=False),
help="Specify the auth manager to set",
default=CacheableDefault(ALLOWED_AUTH_MANAGERS[0]),
show_default=True,
)


def _normalize_platform(ctx: click.core.Context, param: click.core.Option, value: str):
if not value:
return value
Expand Down
15 changes: 5 additions & 10 deletions dev/breeze/src/airflow_breeze/commands/developer_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
option_all_integration,
option_allow_pre_releases,
option_answer,
option_auth_manager,
option_backend,
option_builder,
option_clean_airflow_installation,
Expand Down Expand Up @@ -89,7 +90,6 @@
from airflow_breeze.commands.main_command import cleanup, main
from airflow_breeze.commands.testing_commands import option_test_type
from airflow_breeze.global_constants import (
ALLOWED_AUTH_MANAGERS,
ALLOWED_CELERY_BROKERS,
ALLOWED_CELERY_EXECUTORS,
ALLOWED_EXECUTORS,
Expand Down Expand Up @@ -291,6 +291,7 @@ def run(self):
@option_airflow_constraints_reference
@option_airflow_extras
@option_answer
@option_auth_manager
@option_backend
@option_builder
@option_celery_broker
Expand Down Expand Up @@ -348,6 +349,7 @@ def shell(
airflow_constraints_mode: str,
airflow_constraints_reference: str,
airflow_extras: str,
auth_manager: str,
backend: str,
builder: str,
celery_broker: str,
Expand Down Expand Up @@ -422,6 +424,7 @@ def shell(
airflow_constraints_reference=airflow_constraints_reference,
airflow_extras=airflow_extras,
allow_pre_releases=allow_pre_releases,
auth_manager=auth_manager,
backend=backend,
builder=builder,
celery_broker=celery_broker,
Expand Down Expand Up @@ -490,14 +493,6 @@ def shell(
"or CeleryExecutor depending on the integration used).",
)

option_auth_manager_start_airflow = click.option(
"--auth-manager",
type=click.Choice(ALLOWED_AUTH_MANAGERS, case_sensitive=False),
help="Specify the auth manager to use with start-airflow",
default=ALLOWED_AUTH_MANAGERS[0],
show_default=True,
)


@main.command(name="start-airflow")
@click.option(
Expand All @@ -517,7 +512,7 @@ def shell(
@option_airflow_constraints_mode_ci
@option_airflow_constraints_reference
@option_airflow_extras
@option_auth_manager_start_airflow
@option_auth_manager
@option_answer
@option_backend
@option_builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"--python",
"--integration",
"--standalone-dag-processor",
"--auth-manager",
],
},
{
Expand Down Expand Up @@ -86,6 +87,7 @@
"--load-default-connections",
"--standalone-dag-processor",
"--start-api-server-with-examples",
"--auth-manager",
],
},
{
Expand Down Expand Up @@ -209,6 +211,7 @@
"--platform",
"--integration",
"--standalone-dag-processor",
"--auth-manager",
"--load-example-dags",
"--load-default-connections",
],
Expand Down Expand Up @@ -238,12 +241,6 @@
"--celery-flower",
],
},
{
"name": "Auth manager",
"options": [
"--auth-manager",
],
},
{
"name": "Asset compilation options",
"options": [
Expand Down
2 changes: 2 additions & 0 deletions dev/breeze/src/airflow_breeze/commands/main_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from airflow_breeze.commands.common_options import (
option_all_integration,
option_answer,
option_auth_manager,
option_backend,
option_builder,
option_db_reset,
Expand Down Expand Up @@ -106,6 +107,7 @@ def get_command(self, ctx: Context, cmd_name: str):
context_settings={"help_option_names": ["-h", "--help"]},
)
@option_answer
@option_auth_manager
@option_backend
@option_builder
@option_db_reset
Expand Down
8 changes: 4 additions & 4 deletions dev/breeze/src/airflow_breeze/commands/setup_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
option_python,
option_verbose,
)
from airflow_breeze.commands.developer_commands import option_auth_manager
from airflow_breeze.commands.main_command import main
from airflow_breeze.utils.cache import check_if_cache_exists, delete_cache, touch_cache_file
from airflow_breeze.utils.click_utils import BreezeGroup
Expand Down Expand Up @@ -190,6 +191,7 @@ def version():
@option_backend
@option_postgres_version
@option_mysql_version
@option_auth_manager
@click.option("-C/-c", "--cheatsheet/--no-cheatsheet", help="Enable/disable cheatsheet.", default=None)
@click.option("-A/-a", "--asciiart/--no-asciiart", help="Enable/disable ASCIIart.", default=None)
@click.option(
Expand All @@ -202,6 +204,7 @@ def change_config(
backend: str,
postgres_version: str,
mysql_version: str,
auth_manager: str,
cheatsheet: bool,
asciiart: bool,
colour: bool,
Expand Down Expand Up @@ -237,21 +240,18 @@ def change_config(
def get_suppress_status(file: str):
return "disabled" if check_if_cache_exists(file) else "enabled"

def get_status(file: str):
return "enabled" if check_if_cache_exists(file) else "disabled"

get_console().print()
get_console().print("[info]Current configuration:[/]")
get_console().print()
get_console().print(f"[info]* Python: {python}[/]")
get_console().print(f"[info]* Backend: {backend}[/]")
get_console().print(f"[info]* Postgres version: {postgres_version}[/]")
get_console().print(f"[info]* MySQL version: {mysql_version}[/]")
get_console().print(f"[info]* Auth Manager: {auth_manager}[/]")
get_console().print()
get_console().print(f"[info]* ASCIIART: {get_suppress_status(asciiart_file)}[/]")
get_console().print(f"[info]* Cheatsheet: {get_suppress_status(cheatsheet_file)}[/]")
get_console().print()
get_console().print()
get_console().print(f"[info]* Colour: {get_suppress_status(colour_file)}[/]")
get_console().print()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"--backend",
"--postgres-version",
"--mysql-version",
"--auth-manager",
"--cheatsheet",
"--asciiart",
"--colour",
Expand Down
Loading