zappallot opened a new issue #14262:
URL: https://github.com/apache/airflow/issues/14262


   **Apache Airflow version**: 1.10.14 with AWS RDS mysql 5.7.26 as metastore db
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl 
version`): v1.16.15
   
   **Environment**: DEV
   
   - **Cloud provider or hardware configuration**: AWS
   - **OS** (e.g. from /etc/os-release): Debian GNU/Linux 10 (buster)
   - **Kernel** (e.g. `uname -a`): Linux airflow-scheduler-765f664c56-4bsfq 
4.14.186-146.268.amzn2.x86_64 #1 SMP Tue Jul 14 18:16:52 UTC 2020 x86_64 
GNU/Linux
   - **Install tools**: 
   - **Others**: Running on K8S as docker container with apache/airflow:1.10.14 
as base
   
   **What happened**: Running `airflow upgrade_check` returns the following 
error:
   ```
   airflow@airflow-web-54d6577c8b-g9vcn:/opt/airflow$ airflow upgrade_check
   
   ==================================================== STATUS 
====================================================
   Check for latest versions of apache-airflow and 
checker...............................................SUCCESS
   Remove airflow.AirflowMacroPlugin 
class...............................................................SUCCESS
   
/home/airflow/.local/lib/python3.6/site-packages/airflow/utils/helpers.py:442: 
DeprecationWarning: Importing 'DummyOperator' directly from 'airflow.operators' 
has been deprecated. Please import from 'airflow.operators.[operator_module]' 
instead. Support for direct imports will be dropped entirely in Airflow 2.0.
     DeprecationWarning)
   Ensure users are not using custom metaclasses in custom 
operators.....................................SUCCESS
   Chain between DAG and operator not 
allowed............................................................SUCCESS
   Connection.conn_type is not 
nullable..................................................................SUCCESS
   Custom Executors now require full 
path................................................................SUCCESS
   Traceback (most recent call last):
     File "/home/airflow/.local/bin/airflow", line 37, in <module>
       args.func(args)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/upgrade/checker.py", 
line 118, in run
       all_problems = check_upgrade(formatter, rules)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/upgrade/checker.py", 
line 38, in check_upgrade
       rule_status = RuleStatus.from_rule(rule)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/upgrade/problem.py", 
line 44, in from_rule
       result = rule.check()
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/utils/db.py", line 
74, in wrapper
       return func(*args, **kwargs)
     File 
"/home/airflow/.local/lib/python3.6/site-packages/airflow/upgrade/rules/postgres_mysql_sqlite_version_upgrade_check.py",
 line 56, in check
       installed_mysql_version = Version(session.execute('SELECT 
VERSION();').scalar())
     File 
"/home/airflow/.local/lib/python3.6/site-packages/packaging/version.py", line 
298, in __init__
       raise InvalidVersion("Invalid version: '{0}'".format(version))
   packaging.version.InvalidVersion: Invalid version: '5.7.26-log'
   airflow@airflow-web-54d6577c8b-g9vcn:/opt/airflow$
   ```
   
   **What you expected to happen**: commands runs through and prints helpful 
messages
   
   <!-- What do you think went wrong? -->
   Running `SELECT VERSION();').scalar()` against the metastore db returns 
"5.7.26-log' which is possibly not a valid value for Version class `__init__` 
function because of the "-log" ending?
   
   ```
   mysql> select VERSION();
   +------------+
   | VERSION()  |
   +------------+
   | 5.7.26-log |
   +------------+
   1 row in set (0.00 sec)
   ```
   
   **How to reproduce it**: Run `airflow upgrade_check` again.
   
   **Anything else we need to know**: 
   Dockerfile snippet:
   ```
   FROM apache/airflow:1.10.14
   ...
   USER ${AIRFLOW_UID}
   RUN pip install --user \
       airflow-kubernetes-job-operator \
       apache-airflow-backport-providers-cncf-kubernetes \
       apache-airflow-backport-providers-ssh \
       apache-airflow-upgrade-check
   ```
   
   How often does this problem occur? Once? Every time etc?: Every time since 
last week. Has worked before.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to