SameerMesiah97 opened a new pull request, #63394:
URL: https://github.com/apache/airflow/pull/63394

   **Description**
   
   This change fixes incorrect handling of empty container logs in 
`AzureContainerInstanceHook.get_logs`. Previously, when the Azure SDK returned 
`Logs(content=None)`, the hook returned `[None]`. The hook now returns an empty 
list (`[]`) to correctly represent the absence of log messages.
   
   **Rationale**
   
   The hook documentation specifies that `get_logs` returns a list of log 
messages. Returning `[None]` introduces a non-string value and can break 
downstream code expecting log lines to be strings. Aligning the `None` case 
with the existing `"" → []` behavior ensures consistent semantics for empty 
logs.
   
   **Tests**
   
   Refactored the existing `test_get_logs` test to use parametrization and 
added coverage for the `Logs(content=None)` case.
   
   **Backwards Compatibility**
   
   Only affects the edge case where `Logs.content` is `None`, returning `[]` 
instead of `[None]`. Original behavior is otherwise preserved. 


-- 
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]

Reply via email to