Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with Airflow: 2.2 #54

Open
KulykDmytro opened this issue Nov 2, 2021 · 0 comments
Open

Incompatible with Airflow: 2.2 #54

KulykDmytro opened this issue Nov 2, 2021 · 0 comments

Comments

@KulykDmytro
Copy link

After upgrade to Airflow 2.2.x exporter failing to expose metrics
Seems like ORM model needs to be adapted to core changes

Python version: 3.9.7
Airflow version: 2.2.0
Node: airflow-webserver-84659cd4c4-9xtf7
-------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/airflow/.local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/airflow/.local/lib/python3.9/site-packages/airflow_prometheus_exporter/prometheus_exporter.py", line 492, in list
    return Response(generate_latest(), mimetype='text')
  File "/home/airflow/.local/lib/python3.9/site-packages/prometheus_client/exposition.py", line 177, in generate_latest
    for metric in registry.collect():
  File "/home/airflow/.local/lib/python3.9/site-packages/prometheus_client/registry.py", line 83, in collect
    for metric in collector.collect():
  File "/home/airflow/.local/lib/python3.9/site-packages/airflow_prometheus_exporter/prometheus_exporter.py", line 378, in collect
    for task in get_task_duration_info():
  File "/home/airflow/.local/lib/python3.9/site-packages/airflow_prometheus_exporter/prometheus_exporter.py", line 259, in get_task_duration_info
    session.query(
  File "/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/orm/scoping.py", line 163, in do
    return getattr(self.registry(), name)(*args, **kwargs)
  File "/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1589, in query
    return self._query_cls(entities, self, **kwargs)
  File "/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 197, in __init__
    self._set_entities(entities)
  File "/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 223, in _set_entities
    entity_wrapper(self, ent)
  File "/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 4720, in __init__
    raise sa_exc.InvalidRequestError(
sqlalchemy.exc.InvalidRequestError: SQL expression, column, or mapped entity expected - got 'ColumnAssociationProxyInstance(AssociationProxy('dag_run', 'execution_date'))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant