-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
SkipMixin: Add missing session.commit() and test #10421
Conversation
Hi @kaxil this bug affects |
The reason is this: https://github.com/apache/airflow/blob/master/airflow/models/xcom.py#L101 . The xcom_push method performs "expunge_all()" which removes all modified object from the session. Not sure why though :) @kaxill - I believe it''s not a case for 1.10.12rc4, but we should definitely merge it if there are other changes. :) |
I see. Thanks @potiuk for pointing out! |
I would say this can wait for 1.10.13. If we have a major bug report (hopefully not 🤞 ) for 1.10.12rc3 -- then we can include this for rc4 -- but I seriously hope not :D |
Marked it as 1.10.13 then :) |
(cherry picked from commit 423a382)
(cherry picked from commit 423a382)
(cherry picked from commit 423a382)
I don't know the reason, but if we omit the
session.commit()
that I just added,test_skip_all_except
fails because task3 state is None instead of SKIPPED. I think it's an issue with sqlalchemy or sqlite and not much to do with Airflow itself.(NOTE: The impact of this bug being fixed here is pretty minimal and hard to catch because even though this line does not set the state to SKIPPED, the newly introduced
NotPreviouslySkippedDep
actually causes the scheduler to skip the task that are supposed to be skipped. So to the user, this bug being fixed here had almost no impact other than in some test cases. But this session.commit() is needed in case in the future someone callsskip_all_except()
and expects the state to be set to SKIPPED for the skipped tests).