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: [email protected]

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

Reply via email to