This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 4482eaefb0 Fix choosing backend versions in breeze's command line
(#24228)
4482eaefb0 is described below
commit 4482eaefb02535317bc0d2378eba6bfcef3c45ff
Author: Jarek Potiuk <[email protected]>
AuthorDate: Tue Jun 7 08:48:23 2022 +0200
Fix choosing backend versions in breeze's command line (#24228)
Choosing version of backend were broken when command line switches
were used. The _VERSION variables were "hard-coded" to defaults
rather than taken from command line. This is a remnant of initial
implementation and converting the parameters to "cacheable" ones.
While looking at the versions we also found that PARAM_NAME_FLAG
is not used any more so we took the opportunity to remove it.
---
dev/breeze/src/airflow_breeze/global_constants.py | 15 ---------------
.../src/airflow_breeze/utils/docker_command_utils.py | 9 +++------
2 files changed, 3 insertions(+), 21 deletions(-)
diff --git a/dev/breeze/src/airflow_breeze/global_constants.py
b/dev/breeze/src/airflow_breeze/global_constants.py
index 49d68528f2..1c9b69c59e 100644
--- a/dev/breeze/src/airflow_breeze/global_constants.py
+++ b/dev/breeze/src/airflow_breeze/global_constants.py
@@ -102,18 +102,6 @@ PARAM_NAME_DESCRIPTION = {
"MSSQL_VERSION": "MSSql version",
}
-PARAM_NAME_FLAG = {
- "BACKEND": "--backend",
- "MYSQL_VERSION": "--mysql-version",
- "KUBERNETES_MODE": "--kubernetes-mode",
- "KUBERNETES_VERSION": "--kubernetes-version",
- "KIND_VERSION": "--kind-version",
- "HELM_VERSION": "--helm-version",
- "EXECUTOR": "--executor",
- "POSTGRES_VERSION": "--postgres-version",
- "MSSQL_VERSION": "--mssql-version",
-}
-
EXCLUDE_DOCS_PACKAGE_FOLDER = [
'exts',
'integration-logos',
@@ -165,9 +153,6 @@ CURRENT_PYTHON_MAJOR_MINOR_VERSIONS = ['3.7', '3.8', '3.9',
'3.10']
CURRENT_POSTGRES_VERSIONS = ['10', '11', '12', '13', '14']
CURRENT_MYSQL_VERSIONS = ['5.7', '8']
CURRENT_MSSQL_VERSIONS = ['2017-latest', '2019-latest']
-POSTGRES_VERSION = CURRENT_POSTGRES_VERSIONS[0]
-MYSQL_VERSION = CURRENT_MYSQL_VERSIONS[0]
-MSSQL_VERSION = CURRENT_MSSQL_VERSIONS[0]
DB_RESET = False
START_AIRFLOW = "false"
LOAD_EXAMPLES = False
diff --git a/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py
b/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py
index f13994c842..d1471aae0e 100644
--- a/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py
+++ b/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py
@@ -45,11 +45,8 @@ from airflow_breeze.global_constants import (
MOUNT_ALL,
MOUNT_SELECTED,
MSSQL_HOST_PORT,
- MSSQL_VERSION,
MYSQL_HOST_PORT,
- MYSQL_VERSION,
POSTGRES_HOST_PORT,
- POSTGRES_VERSION,
REDIS_HOST_PORT,
SSH_PORT,
WEBSERVER_HOST_PORT,
@@ -566,9 +563,12 @@ DERIVE_ENV_VARIABLES_FROM_ATTRIBUTES = {
"ISSUE_ID": "issue_id",
"LOAD_EXAMPLES": "load_example_dags",
"LOAD_DEFAULT_CONNECTIONS": "load_default_connections",
+ "MYSQL_VERSION": "mysql_version",
+ "MSSQL_VERSION": "mssql_version",
"NUM_RUNS": "num_runs",
"PACKAGE_FORMAT": "package_format",
"PYTHON_MAJOR_MINOR_VERSION": "python",
+ "POSTGRES_VERSION": "postgres_version",
"SQLITE_URL": "sqlite_url",
"START_AIRFLOW": "start_airflow",
"SKIP_ENVIRONMENT_INITIALIZATION": "skip_environment_initialization",
@@ -580,11 +580,8 @@ DERIVE_ENV_VARIABLES_FROM_ATTRIBUTES = {
DOCKER_VARIABLE_CONSTANTS = {
"FLOWER_HOST_PORT": FLOWER_HOST_PORT,
"MSSQL_HOST_PORT": MSSQL_HOST_PORT,
- "MSSQL_VERSION": MSSQL_VERSION,
"MYSQL_HOST_PORT": MYSQL_HOST_PORT,
- "MYSQL_VERSION": MYSQL_VERSION,
"POSTGRES_HOST_PORT": POSTGRES_HOST_PORT,
- "POSTGRES_VERSION": POSTGRES_VERSION,
"REDIS_HOST_PORT": REDIS_HOST_PORT,
"SSH_PORT": SSH_PORT,
"WEBSERVER_HOST_PORT": WEBSERVER_HOST_PORT,