nyxrv0id commented on code in PR #75479:
URL: https://github.com/apache/airflow/pull/75479#discussion_r4660101446


##########
providers/amazon/tests/unit/amazon/aws/triggers/test_eks.py:
##########
@@ -439,6 +439,21 @@ def test_serialize_roundtrip(self):
         assert classpath == classpath2
         assert kwargs == kwargs2
 
+    def test_serialize_emits_log_events_on_startup_only_when_disabled(self):

Review Comment:
   Updated! Parametrized `test_serialize_roundtrip` on `log_events_on_startup` 
and removed `test_serialize_emits_log_events_on_startup_only_when_disabled`.



##########
providers/google/src/airflow/providers/google/cloud/triggers/kubernetes_engine.py:
##########
@@ -135,30 +136,33 @@ def __init__(
         self._ssl_ca_cert = ssl_ca_cert
 
     def serialize(self) -> tuple[str, dict[str, Any]]:
+        kwargs: dict[str, Any] = {
+            "pod_name": self.pod_name,
+            "pod_namespace": self.pod_namespace,
+            "cluster_url": self._cluster_url,
+            "ssl_ca_cert": self._ssl_ca_cert,
+            "poll_interval": self.poll_interval,
+            "cluster_context": self.cluster_context,
+            "in_cluster": self.in_cluster,
+            "use_dns_endpoint": self.use_dns_endpoint,
+            "get_logs": self.get_logs,
+            "startup_timeout": self.startup_timeout,
+            "schedule_timeout": self.schedule_timeout,
+            "trigger_start_time": self.trigger_start_time,
+            "base_container_name": self.base_container_name,
+            "should_delete_pod": None,
+            "on_finish_action": self.on_finish_action.value,
+            "gcp_conn_id": self.gcp_conn_id,
+            "impersonation_chain": self.impersonation_chain,
+            "logging_interval": self.logging_interval,
+            "last_log_time": self.last_log_time,
+            "trigger_kwargs": self.trigger_kwargs,
+        }
+        if not self.log_events_on_startup:

Review Comment:
   Agreed! As @o-nikolas pointed out, refactoring 
`GKEStartPodTrigger.serialize()` to build on `super().serialize()` goes 
hand-in-hand with forwarding `startup_check_interval`, `on_kill_action`, and 
`termination_grace_period`. I will open a dedicated follow-up PR for both right 
after this lands so we can keep this PR focused strictly on #75014.



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

Reply via email to