yuqian90 opened a new pull request #10421: URL: https://github.com/apache/airflow/pull/10421
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 calls `skip_all_except()` and expects the state to be set to SKIPPED for the skipped tests). --- **^ Add meaningful description above** Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information. In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed. In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
