josh-fell commented on code in PR #70171:
URL: https://github.com/apache/airflow/pull/70171#discussion_r3910501023
##########
providers/dbt/cloud/src/airflow/providers/dbt/cloud/hooks/dbt.py:
##########
@@ -825,6 +825,62 @@ def get_job_run_status(self, run_id: int, account_id: int
| None = None) -> int:
return job_run_status
+ @staticmethod
+ def _format_run_step_failure(step: dict[str, Any]) -> str:
+ details = [f"step {step.get('index')}: {step.get('name',
'<unknown>')}"]
+ if status_humanized := step.get("status_humanized"):
+ details.append(f"status={status_humanized}")
+ elif status := step.get("status"):
+ details.append(f"status_code={status}")
+ for field in ("status_message", "log", "logs", "debug_logs"):
+ if value := step.get(field):
+ details.append(f"{field}={value}")
+ return " | ".join(details)
+
+ @fallback_to_default_account
Review Comment:
Just curious, is the fallback wrapper necessary here? It's been a while, but
this method seems far enough down the call stack that a previous fallback would
have been encountered.
--
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]