You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/12 19:30:19 UTC

[GitHub] [airflow] ramsesrm opened a new issue #18193: /admin/metrics/ fails if using MySQL < 8 as ROW_NUMBER() is not available

ramsesrm opened a new issue #18193:
URL: https://github.com/apache/airflow/issues/18193


   ### Apache Airflow version
   
   2.1.3 (latest released)
   
   ### Operating System
   
   Ubuntu 20.10
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-amazon==2.1.0
   apache-airflow-providers-celery==2.0.0
   apache-airflow-providers-cncf-kubernetes==2.0.2
   apache-airflow-providers-docker==2.1.0
   apache-airflow-providers-elasticsearch==2.0.2
   apache-airflow-providers-ftp==2.0.0
   apache-airflow-providers-google==5.0.0
   apache-airflow-providers-grpc==2.0.0
   apache-airflow-providers-hashicorp==2.0.0
   apache-airflow-providers-http==2.0.0
   apache-airflow-providers-imap==2.0.0
   apache-airflow-providers-microsoft-azure==3.1.0
   apache-airflow-providers-mysql==2.1.0
   apache-airflow-providers-postgres==2.0.0
   apache-airflow-providers-redis==2.0.0
   apache-airflow-providers-sendgrid==2.0.0
   apache-airflow-providers-sftp==2.1.0
   apache-airflow-providers-slack==4.0.0
   apache-airflow-providers-sqlite==2.0.0
   apache-airflow-providers-ssh==2.1.0
   
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   Deployed with MySQL version 5.7
   
   ### What happened
   
   The endpoint /admin/metrics/ fails for an Airflow installation using MySQL 5.7 as the query uses PARTITION BY clauses which are not available until version 8:
   
   _sqlalchemy.exc.ProgrammingError: (MySQLdb._exceptions.ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(PARTITION BY dag_run.dag_id ORDER BY dag_run.execution_date DESC) AS `row_numbe' at line 2")
   [SQL: SELECT anon_1.dag_id AS anon_1_dag_id, anon_1.state AS anon_1_state, anon_1.`row_number` AS anon_1_row_number, dag.owners AS dag_owners 
   FROM (SELECT dag_run.dag_id AS dag_id, dag_run.state AS state, row_number() OVER (PARTITION BY dag_run.dag_id ORDER BY dag_run.execution_date DESC) AS `row_number` 
   FROM dag_run) AS anon_1 INNER JOIN dag ON dag.dag_id = anon_1.dag_id INNER JOIN serialized_dag ON serialized_dag.dag_id = anon_1.dag_id 
   WHERE anon_1.`row_number` = %s]_
   
   
   ### What you expected to happen
   
   Perhaps the documentation should require MySQL version >= 8.0 or at least to state that this particular endpoint won't be available for MySQL 5.7.
   
   ### How to reproduce
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #18193: /admin/metrics/ fails if using MySQL < 8 as ROW_NUMBER() is not available

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #18193:
URL: https://github.com/apache/airflow/issues/18193#issuecomment-917708919


   Just out of the curiosity - where did you take the "/admin/metrics" endpoint from ? I guess it is something you have in your deployment that your admins wrote, because I cannot find such endpoint in airflow. Maybe you can point me to one and I am missing something, but i tried to find it and could not.
   
   I am converting that into discussion until we classify it as an Airflow issue.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed issue #18193: /admin/metrics/ fails if using MySQL < 8 as ROW_NUMBER() is not available

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #18193:
URL: https://github.com/apache/airflow/issues/18193


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org