-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TriggerDagRunOperator
with deferrable parameter
#30406
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. A small question on potentially modifying the unit tests slightly to match the desired exception message.
TriggerDagRunOperator
with deferrable parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solution is based on the result of self.serialize()
, I wonder if we can add a test for this method (without mocking it) to make sure that when someone change it, a test for trigger dagrun blocks him until update the code which use it. WDYT?
* readding after borked it * pre-commit * finally fixing after the github issue last week * push fix * feedback from hussein
Fixes a bug in the
TriggerDagRunOperator
when operating wheredeferrable=True
.The cause of the bug was a misunderstanding in which execution date was being brought through with the context + a bad mocked value in the original tests.
The suggested remedy (here) is to have the Trigger instance return a serialized version of itself and then use that to validate the exit status of the external dag.
Functional test below