airflow icon indicating copy to clipboard operation
airflow copied to clipboard

airflow.models.xcom deprecations removed

Open dirrao opened this issue 1 year ago • 1 comments

airflow.models.xcom deprecations removed

dirrao avatar Aug 27 '24 16:08 dirrao

@potiuk / @eladkal, We have updated Xcoms provider tests. Provider tests are failing on earlier Airflow versions. Do we need to add airflow version condition-based checks? WDYT?

dirrao avatar Aug 28 '24 07:08 dirrao

Yes. We are running providers with previous Airflow versions - so ideally we should have them succeeded with older airflows as well. Likely a test_compat could be added to make xcom_push test work on both - see the contributing_docs for back-compatibility tests and tests/test_utils/compat.py

potiuk avatar Aug 29 '24 18:08 potiuk

@potiuk / @uranusjr Provider backward compatibility test is failing. Ideally, it should pass. Something nontrivial to me. Can someone help me with this?

dirrao avatar Aug 31 '24 07:08 dirrao

Looks like mock_context in conftest.py should be modified to accept xcom_push with execution_date when Airflow < 3.0. Likely could be done by adding **kwargs to the xcom_push method and checking if execution_date is not passed when Airflow 3 (but passed when Airflow < 3)

potiuk avatar Aug 31 '24 23:08 potiuk

Looks like mock_context in conftest.py should be modified to accept xcom_push with execution_date when Airflow < 3.0. Likely could be done by adding **kwargs to the xcom_push method and checking if execution_date is not passed when Airflow 3 (but passed when Airflow < 3)

Finally all the tests are passing except one unrelated test. Looks good to me.

dirrao avatar Sep 01 '24 15:09 dirrao