amoghrajesh commented on code in PR #77162:
URL: https://github.com/apache/airflow/pull/77162#discussion_r4595808731
##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/data_factory.py:
##########
@@ -181,11 +199,28 @@ def execute(self, context: Context) -> None:
start_from_failure=self.start_from_failure,
parameters=self.parameters,
)
- self.run_id = response.run_id
- # Push the ``run_id`` value to XCom regardless of what happens during
execution. This allows for
- # retrieval the executed pipeline's ``run_id`` for downstream tasks
especially if performing an
- # asynchronous wait.
- context["ti"].xcom_push(key="run_id", value=self.run_id)
+ self._record_run_id(response.run_id, context)
+ return response.run_id
+
+ def get_job_status(self, external_id: JsonValue, context: Context) -> str:
+ try:
+ return self.hook.get_pipeline_run_status(
+ str(external_id), self.resource_group_name, self.factory_name
+ )
+ except ResourceNotFoundError:
+ return "NotFound"
+
+ def is_job_active(self, status: str) -> bool:
+ return self.wait_for_termination and status in
AzureDataFactoryPipelineRunStatus.INTERMEDIATE_STATES
Review Comment:
A retry now starts a new run when the stored run is `Canceling`.
AzureDataFactoryTrigger gained `cancel_on_error`, and the operator passes `not
self.durable`, same as Power BI, so a polling error no longer cancels a run the
retry can reconnect to.
--
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]