Repository navigation
Fix OpenSearch provider log pagination - #73947
Conversation
|
Hi I have successfully investigated, resolved, and submitted a patch for this log truncation bug. |
|
Please share images shows this works with real opensearch. This just feel like a PR from AI tool. |
|
@eladkal Thanks for the feedback. I’ll add a screenshot showing the task logs retrieved from a real OpenSearch backend, including log entries beyond the 1,000 line boundary |
|
@eladkal, I tried to reproduce this with a real OpenSearch instance as requested. OpenSearch 2.19.0 is running successfully locally on localhost:9200, but I wasn't able to complete the full Airflow UI integration because the Airflow/Breeze Docker image build fails in my local WSL environment with a Docker BuildKit connection error. |
|
cc @Owen-CH-Leung can you take a look? |
i am still trying to solve that disck stoarge and docker wsl2 things once my all images i will share the updates . thank for your support |
|
@kadubhumika Thanks for your PR! While reviewing your PR, I find that the opensearch provider integration test is not triggered. I'll create a PR to fix it |
|
I will try to fix that integration test which is not triggered by the
evening only. And will update PR thank you for your feedback and reviews on
my pr
…On Thu, Oct 1, 2026, 1:51 PM Owen Leung ***@***.***> wrote:
*Owen-CH-Leung* left a comment (apache/airflow#73947)
<#73947 (comment)>
@kadubhumika <https://github.com/kadubhumika> Thanks for your PR!
While reviewing your PR, I find that the opensearch provider integration
test is not triggered. I'll create a PR to fix it
—
Reply to this email directly, view it on GitHub
<#73947?email_source=notifications&email_token=BMB777IU5YM7LSUV3VF773D5RYHZNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOJSG42TSNJVGQ42M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5927595549>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BMB777I33BR2O7MYZWU4TQL5RYHZNAVCNFSNUABEKJSXA33TNF2G64TZHMZTGOBYGQ4DSMJ3JFZXG5LFHM2TMNBUGAYDCNBUHCQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/BMB777OHHYI5N2QK7DOLIM35RYHZNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOJSG42TSNJVGQ42M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/BMB777JQBHK73C7MOQJMZGL5RYHZNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOJSG42TSNJVGQ42M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Ok thanks |
|
@Owen-CH-Leung @eladkal l I dug into the Breeze core configurations to find out why the OpenSearch integration tests weren't executing on this PR. |
|
Hi @Owen-CH-Leung and @eladkal , I investigated why the OpenSearch provider integration test was not being triggered and found that opensearch was categorized under OTHER_PROVIDERS_INTEGRATIONS instead of TESTABLE_PROVIDERS_INTEGRATIONS. |
|
@Owen-CH-Leung If my code needed nay changes please do tell i ma ready to fix edit it. Thank you ! |
|
Hi @eladkal ! I checked the two CI failures and have fixed both. |
|
@kadubhumika can you check the failing test? |
Yes @eladkal Sure i will start fixing it by now thank you! |
|
Hi @eladkal , I checked and fixed the failing Breeze unit test. The issue was that the expected testable-providers-integrations output was missing opensearch after adding it as a testable provider integration. |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |


Brief Description
Fixes #73721
This PR resolves the OpenSearch remote log truncation bug by replacing the single-page log reader call with a continuous sliding-window pagination loop inside the orchestrator handler.
Problem
When a task instance generated more than 1,000 log lines, the Apache Airflow OpenSearch remote log viewer capped the output at exactly 1,000 lines in the UI. This happened because
OpensearchRemoteLogIO.read()called_os_read()exactly once with a hardcoded starting offset of0. Since_os_read()executes a query capped to a fixedMAX_LINE_PER_PAGEsize of 1,000 documents, any remaining log records (lines 1001+) remained completely stranded inside the OpenSearch index.Solution Implemented
Instead of blindly increasing page boundaries or relying on deep offset pagination (
from_) which harms cluster search performance, I resolved this by utilizing the provider's pre-existing, efficient sliding-window sorting logic:read(): Re-engineered the coreread()method to execute a continuous page-aggregatingwhile Trueloop.offset_fieldof the final document hit usingattrgetter. It then shifts the running tracking window parameters to automatically request the next batch from OpenSearch where"gt": last_seen_offset.Testing & Environment Validation
test_read_returns_all_logs_when_exceeding_page_sizeinsidetest_os_task_handler.py. It explicitly simulates a split multi-page JSON response payload (Page 1 = 1,000 hits, Page 2 = 500 hits, Page 3 = Empty) and asserts that the offset values iterate correctly (0->1000->1500).Was generative AI tooling used to co-author this PR?
Generated-by: Gemini following the guidelines