Description
Apache Airflow version
Other Airflow 2 version (please specify below)
If "Other Airflow 2 version" selected, which one?
2.5.0
What happened?
When updating the tags for a dag for upper-case to lower-case the scheduler give this info and the Dag does not appear on the UI.
sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (MySQLdb._exceptions.IntegrityError) (1062, "Duplicate entry 'pacman-Campaign-711_PRD-1671' for key 'dag_tag.PRIMARY'") [parameters: (('pacman', 'Campaign-711_PRD-1671'), ('pu', 'Campaign-711_PRD-1671'))]
What you think should happen instead?
There should be no such error if the Dag tag is updated
How to reproduce
Im using MYSQL Server version: 8.0.28 Source distribution
CREATE TABLE `dag_tag` ( `name` varchar(100) NOT NULL, `dag_id` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, PRIMARY KEY (`name`,`dag_id`), KEY `dag_tag_dag_id_fkey` (`dag_id`), CONSTRAINT `dag_tag_dag_id_fkey` FOREIGN KEY (`dag_id`) REFERENCES `dag` (`dag_id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE=InnoDB DEFAULT CHARSET=latin1
Update the tags of a dag from upper-case to lower-case.
Operating System
centos 7
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
- I agree to follow this project's Code of Conduct