cipheraxat commented on code in PR #70636:
URL: https://github.com/apache/airflow/pull/70636#discussion_r3672383497


##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:
##########
@@ -145,7 +146,18 @@ def __init__(
         self.job_poll_interval = job_poll_interval
         self.deferrable = deferrable
         self.on_kill_propagation_policy = on_kill_propagation_policy
-        self.discover_pods_retry_number = discover_pods_retry_number
+        if discover_pods_retry_number is not None:
+            warnings.warn(
+                "`discover_pods_retry_number` is deprecated and has no effect. 
"
+                "Pod discovery waits up to `schedule_timeout_seconds`, polling 
every "
+                "`startup_check_interval_seconds`.",
+                AirflowProviderDeprecationWarning,
+                stacklevel=2,
+            )
+        # Kept for backward compatibility with code that reads the attribute.
+        self.discover_pods_retry_number = (
+            discover_pods_retry_number if discover_pods_retry_number is not 
None else 3
+        )

Review Comment:
   Removed the unused `self.discover_pods_retry_number` assignment. The kwarg 
is still accepted and emits the deprecation warning; the test now only asserts 
that warning. Also rebased onto latest `main`.



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