nyxrv0id commented on code in PR #75479: URL: https://github.com/apache/airflow/pull/75479#discussion_r4660100625
########## providers/cncf/kubernetes/docs/operators.rst: ########## @@ -92,14 +92,10 @@ pods in one namespace this adds noticeable API server load. Keeping unrelated high-churn pods (for example Spark executors) in a separate namespace reduces the cost. To turn it off, set ``log_events_on_startup=False``. The parameter is honoured by ``KubernetesPodOperator``, -``KubernetesPodTrigger``, ``@task.kubernetes`` and ``@task.kubernetes_cmd``. In deferrable mode the opt-out -is sent to the trigger, so the triggerer needs a provider version that knows the parameter. ``GKEStartPodOperator`` and -``EksPodOperator`` apply it in synchronous mode only; in deferrable mode their own triggers do not receive -it yet. It is separate from ``log_events_on_failure``, which controls the one-shot read of events after a -failure. - -.. Forwarding the parameter to the GKE and EKS triggers is tracked at - https://github.com/apache/airflow/issues/75014 +``KubernetesPodTrigger``, ``@task.kubernetes`` and ``@task.kubernetes_cmd``, as well as the ``GKEStartPodOperator`` +and ``EksPodOperator`` in both synchronous and deferrable mode. In deferrable mode the opt-out +is sent to the trigger, so the triggerer needs a provider version that knows the parameter. It is separate Review Comment: Updated! Added a clarification that for `EksPodOperator`, the triggerer also requires a version of the Amazon provider that supports the parameter. ########## providers/amazon/tests/unit/amazon/aws/operators/test_eks.py: ########## @@ -1499,6 +1499,38 @@ def test_invoke_defer_method_uses_eks_trigger(self, mock_convert_config): assert trigger._aws_conn_id == "aws_default" assert trigger.pod_name == "test-pod-abc123" assert trigger.pod_namespace == "default" + assert trigger.log_events_on_startup is True + + @mock.patch( + "airflow.providers.cncf.kubernetes.operators.pod.KubernetesPodOperator.convert_config_file_to_dict" + ) + def test_invoke_defer_method_passes_log_events_on_startup_to_trigger(self, mock_convert_config): Review Comment: Updated! Parametrized `test_invoke_defer_method_uses_eks_trigger` with `[True, False]` and removed the duplicated test method. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
