Content-Length: 301674 | pFad | http://github.com/apache/airflow/issues/50815

EF Getting Duplicate entry issue in dag_tag · Issue #50815 · apache/airflow · GitHub
Skip to content

Getting Duplicate entry issue in dag_tag #50815

Open
@AshutoshSrivastavaDev

Description

@AshutoshSrivastavaDev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:MetaDBMeta Database related issues.area:corekind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/apache/airflow/issues/50815

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy