Copilot commented on code in PR #64393:
URL: https://github.com/apache/airflow/pull/64393#discussion_r3025328196


##########
providers/dbt/cloud/src/airflow/providers/dbt/cloud/operators/dbt.py:
##########
@@ -176,24 +176,52 @@ def execute(self, context: Context):
                     "order_by": "-created_at",
                 },
             ).json()["data"]
+
             if non_terminal_runs:
-                self.run_id = non_terminal_runs[0]["id"]
+                run_id = non_terminal_runs[0]["id"]
                 job_run_url = non_terminal_runs[0]["href"]
+                return run_id, job_run_url
 
         is_retry = context["ti"].try_number != 1
 
-        if not self.reuse_existing_run or not non_terminal_runs:
-            trigger_job_response = self.hook.trigger_job_run(
-                account_id=self.account_id,
-                job_id=self.job_id,
-                cause=self.trigger_reason,
-                steps_override=self.steps_override,
-                schema_override=self.schema_override,
-                retry_from_failure=is_retry and self.retry_from_failure,
-                additional_run_config=self.additional_run_config,
+        trigger_job_response = self.hook.trigger_job_run(
+            account_id=self.account_id,
+            job_id=self.job_id,
+            cause=self.trigger_reason,
+            steps_override=self.steps_override,
+            schema_override=self.schema_override,
+            retry_from_failure=is_retry and self.retry_from_failure,
+            additional_run_config=self.additional_run_config,
+        )
+
+        run_id = trigger_job_response.json()["data"]["id"]
+        job_run_url = trigger_job_response.json()["data"]["href"]
+
+        return run_id, job_run_url
+
+    def _handle_terminal_status(self, status: int) -> int | None:
+

Review Comment:
   There is an extra blank line at the start of `_handle_terminal_status`, 
which is not Black-compliant and will cause formatting checks to fail. Please 
remove the blank line (or re-run `black`/pre-commit) so the function body 
starts immediately after the signature.
   ```suggestion
   
   ```



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