Taragolis commented on code in PR #34627:
URL: https://github.com/apache/airflow/pull/34627#discussion_r1338907495
##########
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:
> The solution in this PR stops the results of this issue from causing an
infinite loop of restarts
But my point that there is no any loops for restarts `_monitor_logging` it
is only called once in `execute` method and there is not any loops for there
https://github.com/apache/airflow/blob/7bc5988e70ac876ff22dbe244b65f4cca9360cd5/airflow/providers/microsoft/azure/operators/container_instances.py#L265-L267
The creation happen couple lines above invoking `_monitor_logging`
https://github.com/apache/airflow/blob/7bc5988e70ac876ff22dbe244b65f4cca9360cd5/airflow/providers/microsoft/azure/operators/container_instances.py#L261-L263
So there is no legit way to return back from L266 to L262.
In additional I could see teardown in `finally` block
https://github.com/apache/airflow/blob/7bc5988e70ac876ff22dbe244b65f4cca9360cd5/airflow/providers/microsoft/azure/operators/container_instances.py#L276-L280
So many mysterious stuff happen in one place.
It would be nice if you could also provide a bit more detail about your
deploying method and some DAG sample
--
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]