Skip to content

airflow.models.xcom deprecations removed#41803

Merged
potiuk merged 10 commits into
apache:mainfrom
dirrao:xcom_deprecations1
Sep 1, 2024
Merged

airflow.models.xcom deprecations removed#41803
potiuk merged 10 commits into
apache:mainfrom
dirrao:xcom_deprecations1

Conversation

@dirrao

@dirrao dirrao commented Aug 27, 2024

Copy link
Copy Markdown
Contributor

airflow.models.xcom deprecations removed

@dirrao

dirrao commented Aug 28, 2024

Copy link
Copy Markdown
Contributor Author

@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?

@potiuk

potiuk commented Aug 29, 2024

Copy link
Copy Markdown
Member

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

Comment thread airflow/models/xcom.py Outdated
Comment thread airflow/models/xcom.py Outdated
@dirrao dirrao force-pushed the xcom_deprecations1 branch from 4f247eb to 9f68178 Compare August 31, 2024 03:59
@dirrao

dirrao commented Aug 31, 2024

Copy link
Copy Markdown
Contributor Author

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

@potiuk

potiuk commented Aug 31, 2024

Copy link
Copy Markdown
Member

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)

@dirrao dirrao force-pushed the xcom_deprecations1 branch from df3cd82 to 062dddd Compare September 1, 2024 12:53
@dirrao dirrao requested a review from uranusjr September 1, 2024 15:46
@dirrao

dirrao commented Sep 1, 2024

Copy link
Copy Markdown
Contributor Author

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.

@potiuk potiuk merged commit 04217f1 into apache:main Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants