This is an automated email from the ASF dual-hosted git repository.
o-nikolas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new e5ce464abab Fix S3 remote log test for streaming responses (#76632)
e5ce464abab is described below
commit e5ce464abab56a5c8aab210cc074391a481942ea
Author: Aaron Chen <[email protected]>
AuthorDate: Fri Nov 6 14:56:24 2026 -0800
Fix S3 remote log test for streaming responses (#76632)
After #73517 added S3RemoteLogIO.stream(),
FileTaskHandler._read_remote_logs() returns a generator of log lines for S3
logs. The integration test still compares that generator directly with a
string, causing consistent core CI failures.
Consume the stream within the existing mock_aws() context and compare its
lines with the expected content.
---
airflow-core/tests/unit/utils/test_log_handlers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow-core/tests/unit/utils/test_log_handlers.py
b/airflow-core/tests/unit/utils/test_log_handlers.py
index 412323cbf7e..ccefedf8055 100644
--- a/airflow-core/tests/unit/utils/test_log_handlers.py
+++ b/airflow-core/tests/unit/utils/test_log_handlers.py
@@ -848,7 +848,7 @@ class TestFileTaskLogHandler:
assert len(sources) > 0, f"Expected sources but got:
{sources}"
assert len(logs) > 0, f"Expected logs but got: {logs}"
- assert logs[0] == log_content
+ assert list(logs[0]) == log_content.split("\n")
assert f"s3://test-airflow-logs/logs/{log_relative_path}"
in sources[0]