You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently using airflow version "2.7.0-python3.11" with the chart version "8.8.0" and I am using an external MySQL database. I am getting "WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version." logs from my airflow cluster.
After some research, I realized that these warning logs are coming because of the database driver I use. When I wanted to change the driver I use for database connection to "mysql-connector-python" from "mysqlclient" I had some problems with changing the database connection string since it is given as DATABASE_SQLALCHEMY_CMD: {{ `echo -n "mysql+mysqldb://$(eval $DATABASE_USER_CMD):$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"` | b64enc | quote }}
with hardcoded database driver in the "secret-configs-env-yaml" file in the chart.
Checks
User-Community Airflow Helm Chart
.Motivation
I am currently using airflow version "2.7.0-python3.11" with the chart version "8.8.0" and I am using an external MySQL database. I am getting "WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version." logs from my airflow cluster.
After some research, I realized that these warning logs are coming because of the database driver I use. When I wanted to change the driver I use for database connection to "mysql-connector-python" from "mysqlclient" I had some problems with changing the database connection string since it is given as
DATABASE_SQLALCHEMY_CMD: {{ `echo -n "mysql+mysqldb://$(eval $DATABASE_USER_CMD):$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"` | b64enc | quote }}
with hardcoded database driver in the "secret-configs-env-yaml" file in the chart.
As a workaround, I overrode this "DATABASE_SQLALCHEMY_CMD" env variable using airflow.extraEnv in the values.yaml as:
Since it is available in Airflow 2.7.0 https://airflow.apache.org/docs/apache-airflow/2.7.0/howto/set-up-database.html#setting-up-a-mysql-database
Could this driver parameter in database connection string also be a variable which can be set in the values.yaml?
Implementation
No response
Are you willing & able to help?
The text was updated successfully, but these errors were encountered: