AshutoshSrivastavaDev opened a new issue, #50815:
URL: https://github.com/apache/airflow/issues/50815
### 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?
- [x] 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]