jscheffl commented on code in PR #66711:
URL: https://github.com/apache/airflow/pull/66711#discussion_r3221992308
##########
dev/breeze/src/airflow_breeze/commands/common_options.py:
##########
@@ -325,6 +327,26 @@ def _set_default_from_parent(ctx: click.core.Context,
option: click.core.Option,
envvar="MYSQL_VERSION",
show_default=True,
)
+option_mysql_flavor = click.option(
+ "--mysql-flavor",
+ help=(
+ "Flavor of the mysql backend to run. 'mysql' (default) uses upstream
MySQL with "
+ "--mysql-version. 'mariadb' substitutes a MariaDB image (selected with
--mariadb-version) "
+ "but airflow still connects via mysql+pymysql:// — SQLAlchemy detects
MariaDB at runtime."
+ ),
+ type=CacheableChoice(ALLOWED_MYSQL_FLAVORS),
+ default=CacheableDefault(ALLOWED_MYSQL_FLAVORS[0]),
+ envvar="MYSQL_FLAVOR",
+ show_default=True,
+)
+option_mariadb_version = click.option(
+ "--mariadb-version",
+ help="Version of MariaDB to run when --mysql-flavor=mariadb. Ignored
otherwise.",
+ type=BackendVersionChoice(ALLOWED_MARIADB_VERSIONS),
+ default=CacheableDefault(ALLOWED_MARIADB_VERSIONS[-1]),
+ envvar="MARIADB_VERSION",
+ show_default=True,
+)
Review Comment:
Instead of adding two CLI options would it be maybe rather favorable to add
one switch `--flavor [mariadb|mysql]`? Then we only need one additional CLI
argument. Defaulting to `mysql`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]