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 2022/08/24 19:29:34 UTC
[GitHub] [airflow] amalberty opened a new issue, #25947: DB migration c97c2ab6aa23 -> 4eaab2fe6582 rendered_task_instance_fields.run_id update is incorrect
amalberty opened a new issue, #25947:
URL: https://github.com/apache/airflow/issues/25947
### Apache Airflow version
Other Airflow 2 version
### What happened
Updating Airflow from 2.2.5 to 2.3.3 encounter a db upgrade issue.
During alembic upgrade c97c2ab6aa23 -> 4eaab2fe6582 there is SQL statement to update rendered_task_instance_fields.run_id:
UPDATE rendered_task_instance_fields, dag_run SET rendered_task_instance_fields.run_id=dag_run.run_id WHERE dag_run.dag_id = rendered_task_instance_fields.dag_id AND dag_run.execution_date = rendered_task_instance_fields.execution_date;
This update will leave some run_id as NULL.
Then the following SQL statement fails:
ALTER TABLE rendered_task_instance_fields MODIFY run_id VARCHAR(250) COLLATE utf8mb3_bin NOT NULL;
### What you think should happen instead
It seems like rendered_task_instance_fields.run_id should be updated from task_instance and not from dag_run.
### How to reproduce
I tried running airflow db update after upgrading to Airflow 2.3.3
### Operating System
ID_LIKE="centos rhel fedora"
### Versions of Apache Airflow Providers
apache-airflow-providers-amazon==4.0.0
apache-airflow-providers-celery==2.1.3
apache-airflow-providers-ftp==2.1.2
apache-airflow-providers-http==2.1.2
apache-airflow-providers-imap==2.2.3
apache-airflow-providers-jdbc==2.1.3
apache-airflow-providers-mysql==2.2.3
apache-airflow-providers-postgres==2.2.0
apache-airflow-providers-redis==2.0.4
apache-airflow-providers-sftp==2.1.1
apache-airflow-providers-slack==4.2.3
apache-airflow-providers-sqlite==2.1.3
apache-airflow-providers-ssh==2.4.3
### Deployment
Virtualenv installation
### Deployment details
1 x server running scheduler and webserver.
3x servers running workers.
### 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
[GitHub] [airflow] boring-cyborg[bot] commented on issue #25947: DB migration c97c2ab6aa23 -> 4eaab2fe6582 rendered_task_instance_fields.run_id update is incorrect
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #25947:
URL: https://github.com/apache/airflow/issues/25947#issuecomment-1226151974
Thanks for opening your first issue here! Be sure to follow the issue template!
--
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] amalberty closed issue #25947: DB migration c97c2ab6aa23 -> 4eaab2fe6582 rendered_task_instance_fields.run_id update is incorrect
Posted by GitBox <gi...@apache.org>.
amalberty closed issue #25947: DB migration c97c2ab6aa23 -> 4eaab2fe6582 rendered_task_instance_fields.run_id update is incorrect
URL: https://github.com/apache/airflow/issues/25947
--
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] atrbgithub commented on issue #25947: DB migration c97c2ab6aa23 -> 4eaab2fe6582 rendered_task_instance_fields.run_id update is incorrect
Posted by GitBox <gi...@apache.org>.
atrbgithub commented on issue #25947:
URL: https://github.com/apache/airflow/issues/25947#issuecomment-1273306799
@amalberty are you able to provide any more info around how you solved 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
[GitHub] [airflow] amalberty commented on issue #25947: DB migration c97c2ab6aa23 -> 4eaab2fe6582 rendered_task_instance_fields.run_id update is incorrect
Posted by GitBox <gi...@apache.org>.
amalberty commented on issue #25947:
URL: https://github.com/apache/airflow/issues/25947#issuecomment-1226213575
This issue has been resolved. The fields in the DB were in different timezone.
--
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