Taragolis commented on code in PR #34627:
URL: https://github.com/apache/airflow/pull/34627#discussion_r1338797309
##########
airflow/providers/microsoft/azure/operators/container_instances.py:
##########
@@ -319,6 +319,9 @@ def _monitor_logging(self, resource_group: str, name: str)
-> int:
if state in ["Running", "Terminated", "Succeeded"]:
try:
logs = self._ci_hook.get_logs(resource_group, name)
+ if logs is None:
+ self.log.exception("Container log is broken,
marking as failed.")
Review Comment:
I've just wondering are broken logs in container mean that container can't
change it status to `Terminated` or `Failed`? So this code would be unavailable
(interesting fact there is not condition for `Succeeded`
https://github.com/apache/airflow/blob/0722698a30e3fec1543670e93d0acb114f1897d7/airflow/providers/microsoft/azure/operators/container_instances.py#L331-L337
If it can than basically we need just need to skip write logs into the task,
but it is optionally because `AzureContainerInstancesOperator._log_last` could
work with `None` values.
--
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]