wilson-wang-appier commented on code in PR #56845:
URL: https://github.com/apache/airflow/pull/56845#discussion_r2472288305
##########
providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py:
##########
@@ -60,6 +60,15 @@
if TYPE_CHECKING:
from airflow.models import Connection
+ class DatabricksConnectionT(Connection):
Review Comment:
That's cool, thanks for pointing out. I've updated it.
##########
providers/databricks/src/airflow/providers/databricks/plugins/databricks_workflow.py:
##########
@@ -148,7 +148,10 @@ def _get_dagrun(dag, run_id: str, session: Session) ->
DagRun:
if not session:
raise AirflowException("Session not provided.")
- return session.query(DagRun).filter(DagRun.dag_id == dag.dag_id,
DagRun.run_id == run_id).first()
+ dag_run = session.query(DagRun).filter(DagRun.dag_id == dag.dag_id,
DagRun.run_id == run_id).first()
+ if not dag_run:
+ raise AirflowException("DagRun not found.")
Review Comment:
Thanks! I've updated it.
--
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]