-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Fix task_log_sources naming for test_remote_logging_s3 #56869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix task_log_sources naming for test_remote_logging_s3 #56869
Conversation
jason810496
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I add area:API label explicitly to trigger test_remote_loggin_s3 test.
|
This looks to me issue with api, the tests here explicitly we are validating s3 log source path returning correctly or not. To me i am not sure why the api returning local log location? instead of s3 source |
Good point. I found why sometime we will get local source path instead of s3 path: The airflow/airflow-core/src/airflow/utils/log/file_task_handler.py Lines 607 to 646 in 7f2704b
It's not an issue in API but a fallback feature for fetching logs. |
jason810496
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the retry logic before we call get_task_logs, which should prevent read path of FileTaskHandler go to _read_from_local.
By the way, may I ask how can trigger Additional PROD image tests / Remote logging tests with PROD image / test-e2e-integration-tests test? I add area:API label but it doesn't work.
Thanks!
This is the conditions : https://github.com/apache/airflow/blob/main/.github/workflows/ci-amd.yml#L752 and https://github.com/apache/airflow/blob/main/dev/breeze/src/airflow_breeze/utils/selective_checks.py#L872 You could probably update the |
potiuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
|
The reason why we are comparing the name is whether API able to read the log by fetching connection, the last release we have this issue, writing log to remote is fine but, reading part broken as its not able to fetch the connection . |
Shouldn't Fix Connection or Variable access in Server context #56602 resolve the issue? |
|
CI keep failing because of docker registry service error after a few rerun |
seems docker has issues active incidents here: https://www.dockerstatus.com/ |
|
Last CI run was success: https://github.com/apache/airflow/actions/runs/18646187207/job/53164831625?pr=56869 Just merged! |
* Fix task_log_sources naming for test_remote_logging_s3 * Move retry before get_task_logs
* Fix task_log_sources naming for test_remote_logging_s3 * Move retry before get_task_logs
related: #56811
Why
After #56811, we can ensure there are 6 files present in S3 (the same amount of tasks in
example_xcom_testDag) before validating sourcetask_log_sourcesandlog_files. However the any CI withAdditional PROD image tests / Remote logging tests with PROD image / test-e2e-integration-testsis still failing.IMO, the main root cause is the
/opt/airflow/logs/prefix intask_log_sources, which make theany(source in log_files for source in task_log_sources)condition always fail.Example fail runs:
There are already 6 files in
log_files(which should be success) but the test still fail in above traceback.What
/opt/airflow/logs/prefix fromtask_log_sourcestask_log_sourcesformat before fix:/opt/airflow/logs/dag_id=example_xcom_test/run_id=manual__2025-10-20T03:24:32.261538+00:00/task_id=bash_pull/attempt=1.logtask_log_sourcesformat after fix:dag_id=example_xcom_test/run_id=manual__2025-10-20T03:24:32.261538+00:00/task_id=bash_pull/attempt=1.loglog_filesformat:s3://test-airflow-logs/dag_id=example_xcom_test/run_id=manual__2025-10-20T03:24:32.261538+00:00/task_id=bash_pull/attempt=1.log