You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vatsrahul1001 (via GitHub)" <gi...@apache.org> on 2025/09/01 12:08:51 UTC
[I] Getting exception in webserver logs when downgraded from Airflow 3 to airflow 2 with dagruns [airflow]
vatsrahul1001 opened a new issue, #55136:
URL: https://github.com/apache/airflow/issues/55136
### Apache Airflow version
main (development)
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
When I downgrade from Airflow 3 to airflow 2 with some dag runs I see below error in webserver
```
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.10/site-packages/connexion/decorators/decorator.py", line 68, in wrapper
response = function(request)
File "/usr/local/lib/python3.10/site-packages/connexion/decorators/uri_parsing.py", line 149, in wrapper
response = function(request)
File "/usr/local/lib/python3.10/site-packages/connexion/decorators/validation.py", line 399, in wrapper
return function(request)
File "/usr/local/lib/python3.10/site-packages/connexion/decorators/response.py", line 112, in wrapper
response = function(request)
File "/usr/local/lib/python3.10/site-packages/connexion/decorators/parameter.py", line 120, in wrapper
return function(**kwargs)
File "/opt/airflow/airflow/api_connexion/security.py", line 171, in decorated
return _requires_access(
File "/opt/airflow/airflow/api_connexion/security.py", line 98, in _requires_access
return func(*args, **kwargs)
File "/opt/airflow/airflow/utils/session.py", line 97, in wrapper
return func(*args, session=session, **kwargs)
File "/opt/airflow/airflow/api_connexion/endpoints/task_instance_endpoint.py", line 99, in get_task_instance
task_instance = session.execute(query).one_or_none()
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1717, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1710, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
return connection._execute_clauseelement(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1577, in _execute_clauseelement
ret = self._execute_context(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1953, in _execute_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2134, in _handle_dbapi_exception
util.raise_(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
raise exception
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "sla_miss" does not exist
LINE 2: ...run.run_id = task_instance.run_id LEFT OUTER JOIN sla_miss O...
^
[SQL: SELECT task_instance.task_display_name, task_instance.task_id, task_instance.dag_id, task_instance.run_id, task_instance.map_index, task_instance.start_date, task_instance.end_date, task_instance.duration, task_instance.state, task_instance.try_number, task_instance.max_tries, task_instance.hostname, task_instance.unixname, task_instance.job_id, task_instance.pool, task_instance.pool_slots, task_instance.queue, task_instance.priority_weight, task_instance.operator, task_instance.custom_operator_name, task_instance.queued_dttm, task_instance.queued_by_job_id, task_instance.pid, task_instance.executor, task_instance.executor_config, task_instance.updated_at, task_instance.rendered_map_index, task_instance.external_executor_id, task_instance.trigger_id, task_instance.trigger_timeout, task_instance.next_method, task_instance.next_kwargs, sla_miss.task_id AS task_id_1, sla_miss.dag_id AS dag_id_1, sla_miss.execution_date, sla_miss.email_sent, sla_miss.timestamp, sla_miss.descript
ion, sla_miss.notification_sent, dag_run_1.state AS state_1, dag_run_1.id, dag_run_1.dag_id AS dag_id_2, dag_run_1.queued_at, dag_run_1.execution_date AS execution_date_1, dag_run_1.start_date AS start_date_1, dag_run_1.end_date AS end_date_1, dag_run_1.run_id AS run_id_1, dag_run_1.creating_job_id, dag_run_1.external_trigger, dag_run_1.run_type, dag_run_1.conf, dag_run_1.data_interval_start, dag_run_1.data_interval_end, dag_run_1.last_scheduling_decision, dag_run_1.dag_hash, dag_run_1.log_template_id, dag_run_1.updated_at AS updated_at_1, dag_run_1.clear_number, rendered_task_instance_fields_1.dag_id AS dag_id_3, rendered_task_instance_fields_1.task_id AS task_id_2, rendered_task_instance_fields_1.run_id AS run_id_2, rendered_task_instance_fields_1.map_index AS map_index_1, rendered_task_instance_fields_1.rendered_fields, rendered_task_instance_fields_1.k8s_pod_yaml
FROM task_instance JOIN dag_run ON dag_run.dag_id = task_instance.dag_id AND dag_run.run_id = task_instance.run_id LEFT OUTER JOIN sla_miss ON sla_miss.dag_id = task_instance.dag_id AND sla_miss.execution_date = dag_run.execution_date AND sla_miss.task_id = task_instance.task_id JOIN dag_run AS dag_run_1 ON dag_run_1.dag_id = task_instance.dag_id AND dag_run_1.run_id = task_instance.run_id LEFT OUTER JOIN rendered_task_instance_fields AS rendered_task_instance_fields_1 ON task_instance.dag_id = rendered_task_instance_fields_1.dag_id AND task_instance.task_id = rendered_task_instance_fields_1.task_id AND task_instance.run_id = rendered_task_instance_fields_1.run_id AND task_instance.map_index = rendered_task_instance_fields_1.map_index
WHERE task_instance.dag_id = %(dag_id_4)s AND task_instance.run_id = %(run_id_3)s AND task_instance.task_id = %(task_id_3)s]
[parameters: {'dag_id_4': 'example_xcom_args', 'run_id_3': 'manual__2025-09-01T11:02:45.209577+00:00', 'task_id_3': 'generate_value'}]
(Background on this error at: https://sqlalche.me/e/14/f405)
192.168.97.1 - - [01/Sep/2025:11:20:00 +0000] "GET /api/v1/dags/example_xcom_args/dagRuns/manual__2025-09-01T11:02:45.209577+00:00/taskInstances/generate_value HTTP/1.1" 500 1589 "http://localhost:28080/dags/example_xcom_args/grid?search=example_xcom_args&dag_run_id=manual__2025-09-01T11%3A02%3A45.209577%2B00%3A00&task_id=generate_value&tab=logs" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"
[2025-09-01 11:20:02 +0000] [159] [INFO] Handling signal: winch
```
c
### What you think should happen instead?
_No response_
### How to reproduce
1. Run airflow with `breeze start-airflow --executor CeleryExecutor --backend postgres --load-examp
le-dags`
2. Trigger some dag runs.
3. run `airflow db downgrade -n 2.11`
4. run `stop_airflow`
5. switch to `v2-11-stable` branch
6. run `breeze start-airflow --executor CeleryExecutor --backend postgres --load-examp
le-dags`
7. Login to airflow2 and open any existing DAG run
### Operating System
linux
### Versions of Apache Airflow Providers
_No response_
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Getting exception in webserver logs when downgraded from Airflow 3 to airflow 2 with dagruns [airflow]
Posted by "atul-astronomer (via GitHub)" <gi...@apache.org>.
atul-astronomer commented on issue #55136:
URL: https://github.com/apache/airflow/issues/55136#issuecomment-3595564842
I am facing some problem with my breeze setup maybe,
No containers are running after downgrade
--
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
Re: [I] Getting exception in webserver logs when downgraded from Airflow 3 to airflow 2 with dagruns [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 closed issue #55136: Getting exception in webserver logs when downgraded from Airflow 3 to airflow 2 with dagruns
URL: https://github.com/apache/airflow/issues/55136
--
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
Re: [I] Getting exception in webserver logs when downgraded from Airflow 3 to airflow 2 with dagruns [airflow]
Posted by "phanikumv (via GitHub)" <gi...@apache.org>.
phanikumv commented on issue #55136:
URL: https://github.com/apache/airflow/issues/55136#issuecomment-3280732918
@ephraimbuddy need your input here.could you please take a look when you get a chance?
--
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
Re: [I] Getting exception in webserver logs when downgraded from Airflow 3 to airflow 2 with dagruns [airflow]
Posted by "sjyangkevin (via GitHub)" <gi...@apache.org>.
sjyangkevin commented on issue #55136:
URL: https://github.com/apache/airflow/issues/55136#issuecomment-3268889623
It looks like the db downgrade didn’t restore the table which is dropped in af3 but used in af2. Usually when switching between major version in breeze, I also run with the db reset flag. But wondering if this could be a failure scenario when users had upgraded to af3 but want to downgrade to af2.
--
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
Re: [I] Getting exception in webserver logs when downgraded from Airflow 3 to airflow 2 with dagruns [airflow]
Posted by "phanikumv (via GitHub)" <gi...@apache.org>.
phanikumv commented on issue #55136:
URL: https://github.com/apache/airflow/issues/55136#issuecomment-3449770193
@atul-astronomer could you please test this?
--
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
Re: [I] Getting exception in webserver logs when downgraded from Airflow 3 to airflow 2 with dagruns [airflow]
Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on issue #55136:
URL: https://github.com/apache/airflow/issues/55136#issuecomment-3281769411
> [@ephraimbuddy](https://github.com/ephraimbuddy) need your input here.could you please take a look when you get a chance?
I'm not able to reproduce this. @vatsrahul1001 , did you run some specific dags?
--
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
Re: [I] Getting exception in webserver logs when downgraded from Airflow 3 to airflow 2 with dagruns [airflow]
Posted by "phanikumv (via GitHub)" <gi...@apache.org>.
phanikumv commented on issue #55136:
URL: https://github.com/apache/airflow/issues/55136#issuecomment-3595337254
Are we still getting this issue in the latest release? cc @vatsrahul1001
--
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
Re: [I] Getting exception in webserver logs when downgraded from Airflow 3 to airflow 2 with dagruns [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on issue #55136:
URL: https://github.com/apache/airflow/issues/55136#issuecomment-3596136309
Not able to replicate with the latest release. Closing this
--
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