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 @@
57b0317e9a21d5524cb8498570247fd1
b1115609582f2ea9f9c71d29906127cf
316 changes: 164 additions & 152 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 @@
ca703f8ce014bd7636fecc403ebe85b7
40b11309f7c2d8a67de9bacafc961c78
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 @@
9611c6de6a5a68ad1a4ef06d020f9e45
80d95cab6af3617620014698aa1275ee
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 @@ -525,6 +526,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 @@ -88,7 +89,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 @@ -290,6 +290,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 @@ -346,6 +347,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 @@ -419,6 +421,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 @@ -486,14 +489,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 @@ -513,7 +508,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 @@ -208,6 +210,7 @@
"--platform",
"--integration",
"--standalone-dag-processor",
"--auth-manager",
"--load-example-dags",
"--load-default-connections",
],
Expand Down Expand Up @@ -237,12 +240,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_supress_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_supress_status(asciiart_file)}[/]")
get_console().print(f"[info]* Cheatsheet: {get_supress_status(cheatsheet_file)}[/]")
get_console().print()
get_console().print()
get_console().print(f"[info]* Colour: {get_supress_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