You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/11/08 11:55:44 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #27526: Cleanup backcompat code kpo

potiuk commented on code in PR #27526:
URL: https://github.com/apache/airflow/pull/27526#discussion_r1016523494


##########
kubernetes_tests/test_kubernetes_pod_operator.py:
##########
@@ -387,8 +369,53 @@ def test_pod_resources(self):
         }
         assert self.expected_pod == actual_pod
 
-    def test_pod_affinity(self):
-        affinity = {
+    @pytest.mark.parametrize(
+        "val",
+        [
+            param(
+                k8s.V1Affinity(
+                    node_affinity=k8s.V1NodeAffinity(
+                        required_during_scheduling_ignored_during_execution=k8s.V1NodeSelector(
+                            node_selector_terms=[
+                                k8s.V1NodeSelectorTerm(
+                                    match_expressions=[
+                                        k8s.V1NodeSelectorRequirement(
+                                            key="beta.kubernetes.io/os",
+                                            operator="In",
+                                            values=["linux"],
+                                        )
+                                    ]
+                                )
+                            ]
+                        )
+                    )

Review Comment:
   Ugly it is. I agree. What are the benefits in deprecating the old way BTW :) 



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org