-
Notifications
You must be signed in to change notification settings - Fork 15.9k
Update useLog to support application/x-ndjson #54445
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
Conversation
|
Why would a user want to turn streaming off? |
I’ve also wondered about the possibility of this. I’m not sure, so I added the functionality first. But I feel like there’s probably no real need for it, so I've removed it. |
cec82fc to
5739493
Compare
|
Is this actually streaming and rendering logs as they stream in or just reading the first stream? I suspect it is the latter but I am a bit new to this format. |
The API should stream the log until the end, but there are still some errors with this process. I will work on a fix later. The root cause is that when the FileTaskHandler opens the file, it can only read content that has already been flushed to the file, and cannot access content that is still being written. There should be a polling mechanism to check for new changes to the file, or perhaps the connection could remain open so the API can continuously poll for new content and stream it to the frontend. |
Regardless of this error, the frontend should adapt to |
Yes, this is not real streaming. I misunderstood and also confirmed more details with @jason810496. After offline discussion and test, we confirmed that the streaming implementation still has some issues that need to be addressed. But switching from |
5739493 to
35d5939
Compare
|
Thanks for the clarification. lgtm with the updated title |
Related PR
Why
application/x-ndjsonwould reduce the load of api-server when processing large logHow
application/x-ndjsonas default but it would not change any previous user experiencebefore

after

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.