This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 3ba35c75b28 feat: add `polling_period_seconds` and `timeout_seconds` 
to the template fields of `CloudRunExecuteJobOperator` (#49704)
3ba35c75b28 is described below

commit 3ba35c75b28c1de3934d5b81ee6388b60ae7af53
Author: Ramon Vermeulen <[email protected]>
AuthorDate: Thu Apr 24 17:50:16 2025 +0200

    feat: add `polling_period_seconds` and `timeout_seconds` to the template 
fields of `CloudRunExecuteJobOperator` (#49704)
---
 .../src/airflow/providers/google/cloud/operators/cloud_run.py | 11 ++++++++++-
 .../tests/unit/google/cloud/operators/test_cloud_run.py       |  2 ++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git 
a/providers/google/src/airflow/providers/google/cloud/operators/cloud_run.py 
b/providers/google/src/airflow/providers/google/cloud/operators/cloud_run.py
index 1e0e03d52ef..580a6c0f708 100644
--- a/providers/google/src/airflow/providers/google/cloud/operators/cloud_run.py
+++ b/providers/google/src/airflow/providers/google/cloud/operators/cloud_run.py
@@ -265,7 +265,16 @@ class CloudRunExecuteJobOperator(GoogleCloudBaseOperator):
     :param deferrable: Run the operator in deferrable mode.
     """
 
-    template_fields = ("project_id", "region", "gcp_conn_id", 
"impersonation_chain", "job_name", "overrides")
+    template_fields = (
+        "project_id",
+        "region",
+        "gcp_conn_id",
+        "impersonation_chain",
+        "job_name",
+        "overrides",
+        "polling_period_seconds",
+        "timeout_seconds",
+    )
 
     def __init__(
         self,
diff --git 
a/providers/google/tests/unit/google/cloud/operators/test_cloud_run.py 
b/providers/google/tests/unit/google/cloud/operators/test_cloud_run.py
index 236ed0112c6..25496119f44 100644
--- a/providers/google/tests/unit/google/cloud/operators/test_cloud_run.py
+++ b/providers/google/tests/unit/google/cloud/operators/test_cloud_run.py
@@ -101,6 +101,8 @@ class TestCloudRunExecuteJobOperator:
         _assert_common_template_fields(operator.template_fields)
         assert "job_name" in operator.template_fields
         assert "overrides" in operator.template_fields
+        assert "polling_period_seconds" in operator.template_fields
+        assert "timeout_seconds" in operator.template_fields
 
     @mock.patch(CLOUD_RUN_HOOK_PATH)
     def test_execute_success(self, hook_mock):

Reply via email to