Skip to content

Fix retries causing constraint violation on MySQL with DAG Serialization#9336

Merged
kaxil merged 1 commit intoapache:masterfrom
astronomer:fix-mysql-bug-in-1.10.10
Jun 17, 2020
Merged

Fix retries causing constraint violation on MySQL with DAG Serialization#9336
kaxil merged 1 commit intoapache:masterfrom
astronomer:fix-mysql-bug-in-1.10.10

Conversation

@kaxil
Copy link
Copy Markdown
Member

@kaxil kaxil commented Jun 16, 2020

The issue was caused because the rendered_task_instance_fields table did not have precision and hence causing _mysql_exceptions.IntegrityError.

closes #9148

Issue:

(Pdb) p session.query(RTIF).all()[-1].execution_date
datetime.datetime(2020, 6, 16, 20, 1, 30, tzinfo=Timezone('UTC'))
(Pdb)  p rttif.execution_date
datetime.datetime(2020, 6, 16, 20, 1, 29, 759742, tzinfo=Timezone('UTC'))
(Pdb)

Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Unit tests coverage for changes (not needed for documentation changes)
  • Target Github ISSUE in description if exists
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

@kaxil kaxil requested a review from ashb June 16, 2020 21:10
@kaxil kaxil added this to the Airflow 1.10.11 milestone Jun 16, 2020
@kaxil kaxil force-pushed the fix-mysql-bug-in-1.10.10 branch 2 times, most recently from 99fa08f to a15973d Compare June 16, 2020 21:28
The issue was caused because the `rendered_task_instance_fields` table did not have precision and hence causing `_mysql_exceptions.IntegrityError`.

closes apache#9148
@kaxil kaxil force-pushed the fix-mysql-bug-in-1.10.10 branch from a15973d to 18ed703 Compare June 16, 2020 21:29
@kaxil kaxil merged commit 9e6b5ab into apache:master Jun 17, 2020
@kaxil kaxil deleted the fix-mysql-bug-in-1.10.10 branch June 17, 2020 10:22
potiuk pushed a commit that referenced this pull request Jun 20, 2020
…ion (#9336)

The issue was caused because the `rendered_task_instance_fields` table did not have precision and hence causing `_mysql_exceptions.IntegrityError`.

closes #9148

(cherry picked from commit 9e6b5ab)
potiuk pushed a commit that referenced this pull request Jun 29, 2020
…ion (#9336)

The issue was caused because the `rendered_task_instance_fields` table did not have precision and hence causing `_mysql_exceptions.IntegrityError`.

closes #9148

(cherry picked from commit 9e6b5ab)
kaxil added a commit that referenced this pull request Jul 1, 2020
…ion (#9336)

The issue was caused because the `rendered_task_instance_fields` table did not have precision and hence causing `_mysql_exceptions.IntegrityError`.

closes #9148

(cherry picked from commit 9e6b5ab)
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
…ion (apache#9336)

The issue was caused because the `rendered_task_instance_fields` table did not have precision and hence causing `_mysql_exceptions.IntegrityError`.

closes apache#9148

(cherry picked from commit 9e6b5ab)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retries are causing constraint violation (Airflow 1.10.10)

2 participants