Skip to content

Commit b6a0ed5

Browse files
committed
Bring back providers compatibility checks
The compatibility checks were removed in #52072 accidentally. This one brings them back: * Python 3.10 * do not add cloudant (it was not working for Python 3.9)
1 parent 9140bd6 commit b6a0ed5

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

dev/breeze/src/airflow_breeze/global_constants.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,26 @@ def generate_provider_dependencies_if_needed():
732732
# END OF EXTRAS LIST UPDATED BY PRE COMMIT
733733
]
734734

735-
PROVIDERS_COMPATIBILITY_TESTS_MATRIX: list[dict[str, str | list[str]]] = []
735+
PROVIDERS_COMPATIBILITY_TESTS_MATRIX: list[dict[str, str | list[str]]] = [
736+
{
737+
"python-version": "3.10",
738+
"airflow-version": "2.10.5",
739+
"remove-providers": "common.messaging fab git keycloak",
740+
"run-tests": "true",
741+
},
742+
{
743+
"python-version": "3.10",
744+
"airflow-version": "2.11.0",
745+
"remove-providers": "common.messaging fab git keycloak",
746+
"run-tests": "true",
747+
},
748+
{
749+
"python-version": "3.10",
750+
"airflow-version": "3.0.2",
751+
"remove-providers": "",
752+
"run-tests": "true",
753+
},
754+
]
736755

737756
# Number of slices for low dep tests
738757
NUMBER_OF_LOW_DEP_SLICES = 5

providers/google/src/airflow/providers/google/cloud/links/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def persist(cls, context: Context, **value):
7474
params = {}
7575
# TODO: remove after Airflow v2 support dropped
7676
if not AIRFLOW_V_3_0_PLUS:
77-
common_params = getattr(context["task"], "extra_links_params", None)
77+
common_params = getattr(context["ti"], "extra_links_params", None)
7878
if common_params:
7979
params.update(common_params)
8080

providers/google/tests/unit/google/cloud/operators/test_bigquery_dts.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
BigQueryDeleteDataTransferConfigOperator,
3030
)
3131

32-
from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS
33-
3432
PROJECT_ID = "id"
3533

3634
TRANSFER_CONFIG = {
@@ -73,10 +71,7 @@ def test_execute(self, mock_hook):
7371
retry=DEFAULT,
7472
timeout=None,
7573
)
76-
if AIRFLOW_V_3_0_PLUS:
77-
ti.xcom_push.assert_called_with(key="transfer_config_id", value="1a2b3c")
78-
else:
79-
ti.xcom_push.assert_called_with(key="transfer_config_id", value="1a2b3c", execution_date=None)
74+
ti.xcom_push.assert_called_with(key="transfer_config_id", value="1a2b3c")
8075

8176
assert "secret_access_key" not in return_value.get("params", {})
8277
assert "access_key_id" not in return_value.get("params", {})
@@ -131,10 +126,7 @@ def test_execute(self, mock_hook):
131126
retry=DEFAULT,
132127
timeout=None,
133128
)
134-
if AIRFLOW_V_3_0_PLUS:
135-
ti.xcom_push.assert_called_with(key="run_id", value="123")
136-
else:
137-
ti.xcom_push.assert_called_with(key="run_id", value="123", execution_date=None)
129+
ti.xcom_push.assert_called_with(key="run_id", value="123")
138130

139131
@mock.patch(
140132
f"{OPERATOR_MODULE_PATH}.BiqQueryDataTransferServiceHook",

0 commit comments

Comments
 (0)