Skip to content

fix DagPriorityParsingRequest unique constraint error when dataset aliases are resolved into new datasets - #41398

Merged
utkarsharma2 merged 3 commits into
apache:mainfrom
astronomer:fix-dag-parsing-request-unique-constraint-error
Aug 12, 2024
Merged

fix DagPriorityParsingRequest unique constraint error when dataset aliases are resolved into new datasets#41398
utkarsharma2 merged 3 commits into
apache:mainfrom
astronomer:fix-dag-parsing-request-unique-constraint-error

Conversation

@Lee-W

Copy link
Copy Markdown
Member

Why

This happens when dynamic task mapping is used as each task create the exact same DagPriorityParsingRequests.

What

Follow how dataset queue a DagRun. ignore the conflict trasctions


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@Lee-W

Copy link
Copy Markdown
MemberAuthor

will create another PR point to main once merged

@potiuk

Copy link
Copy Markdown
Member

FYI - this one has a lot more commits than intended I think

@Lee-W

Copy link
Copy Markdown
MemberAuthor

ah yes, I should rebase from v2-10-test once. Thanks for reminding me!

@Lee-W
Lee-Wforce-pushed the fix-dag-parsing-request-unique-constraint-error branch from 342bc09 to de5e735CompareAugust 12, 2024 07:33
@utkarsharma2
utkarsharma2 changed the base branch from v2-10-test to mainAugust 12, 2024 08:06
@utkarsharma2
utkarsharma2 changed the base branch from main to v2-10-testAugust 12, 2024 08:06
@utkarsharma2

utkarsharma2 commented Aug 12, 2024

Copy link
Copy Markdown
Contributor

@Lee-W We should raise this PR against the main and once merged, we'll do a cherry-pick to v2-10-test branch.

@Lee-W

Copy link
Copy Markdown
MemberAuthor

Got it. Thanks @utkarsharma2 ! let me change it

@Lee-W
Lee-W changed the base branch from v2-10-test to mainAugust 12, 2024 08:11
@Lee-W
Lee-Wforce-pushed the fix-dag-parsing-request-unique-constraint-error branch from de5e735 to ad2f621CompareAugust 12, 2024 08:11
Comment threadairflow/datasets/manager.py Outdated
Comment threadairflow/datasets/manager.py Outdated
@Lee-W
Lee-Wforce-pushed the fix-dag-parsing-request-unique-constraint-error branch from 0c54643 to c62728cCompareAugust 12, 2024 08:44
Lee-Wand others added 3 commits August 12, 2024 16:53
…t error when dataset aliases are resolved into new datasets
this happens when dynamic task mapping is used
Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
@Lee-W
Lee-Wforce-pushed the fix-dag-parsing-request-unique-constraint-error branch from c62728c to 82d86f0CompareAugust 12, 2024 08:53
@utkarsharma2
utkarsharma2 merged commit bf64cb6 into apache:mainAug 12, 2024
@utkarsharma2
utkarsharma2 deleted the fix-dag-parsing-request-unique-constraint-error branch August 12, 2024 09:25
@utkarsharma2utkarsharma2 added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Aug 12, 2024
utkarsharma2 pushed a commit that referenced this pull request Aug 12, 2024
…iases are resolved into new datasets (#41398)
* fix(datasets/manager): fix DagPriorityParsingRequest unique constraint error when dataset aliases are resolved into new datasets
this happens when dynamic task mapping is used
* refactor(dataset/manager): reword debug log
Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
* refactor(dataset/manager): remove unnecessary logging
Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
---------
Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
(cherry picked from commit bf64cb6)
@utkarsharma2utkarsharma2 added this to the Airflow 2.10.0 milestone Aug 29, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:skipChanges that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Lee-W@potiuk@utkarsharma2@ephraimbuddy@eladkal