jason810496 opened a new issue, #50333: URL: https://github.com/apache/airflow/issues/50333
### Body ### Why The browser can sometimes crash when rendering large logs on the frontend. After #46827 was merged, the `get_log` endpoint supports the `application/x-ndjson` response type, which allows streaming logs in newline-delimited JSON format. Once #49470 is merged, the API will **fully** support streaming responses. However, the current frontend still uses the default `application/json` header instead of `application/x-ndjson`. When rendering a large JSON response all at once, the browser may crash due to memory overload. Relevant code: https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py#L148-L154 ### What This refactor should include: 1. Set the `Accept` header to `application/x-ndjson` in the frontend request. 2. Use `react-window` or `react-virtualized` to efficiently render large log entries. These changes should be applied to the TaskInstance Log page: `airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/Logs.tsx` ### Committer - [x] I acknowledge that I am a maintainer/committer of the Apache Airflow project. -- 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]
