Skip to content
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

Log-tab under grid view is automatically re-fetching completed logs every 3 sec. #26912

Closed
1 of 2 tasks
hterik opened this issue Oct 6, 2022 · 1 comment · Fixed by #27233
Closed
1 of 2 tasks

Log-tab under grid view is automatically re-fetching completed logs every 3 sec. #26912

hterik opened this issue Oct 6, 2022 · 1 comment · Fixed by #27233
Labels
affected_version:2.4 Issues Reported for 2.4 area:UI Related to UI/UX. For Frontend Developers. kind:bug This is a clearly a bug
Milestone

Comments

@hterik
Copy link
Contributor

hterik commented Oct 6, 2022

Apache Airflow version

2.4.1

What happened

The new inline log-tab under grid view is fantastic.
What's not so great though, is that it is automatically reloading the logs on the /api/v1/dags/.../dagRuns/.../taskInstances/.../logs/1 api endpoint every 3 seconds. Same interval as the reload of the grid status it seems.

This:

  • Makes it difficult for users to scroll in the log panel and to select text in the log panel, because it is replaced all the time
  • Put unnecessary load on the client and the link between client-webserver.
  • Put unnecssary load on the webserver and on the logging-backend, in our case it involves queries to an external Loki server.

This happens even if the TaskLogReader has set metadata["end_of_log"] = True

What you think should happen instead

Logs should not automatically be reloaded if end_of_log=True

For logs which are not at end, some other slower reload or more incremental query/streaming is preferred.

How to reproduce

No response

Operating System

Debian GNU/Linux 11 (bullseye)

Versions of Apache Airflow Providers

apache-airflow-providers-celery==3.0.0
apache-airflow-providers-cncf-kubernetes==4.4.0
apache-airflow-providers-common-sql==1.1.0
apache-airflow-providers-docker==3.2.0
apache-airflow-providers-ftp==3.1.0
apache-airflow-providers-http==4.0.0
apache-airflow-providers-imap==3.0.0
apache-airflow-providers-postgres==5.2.0
apache-airflow-providers-sqlite==3.1.0

Deployment

Other Docker-based deployment

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@hterik hterik added area:core kind:bug This is a clearly a bug labels Oct 6, 2022
@jedcunningham jedcunningham added area:UI Related to UI/UX. For Frontend Developers. affected_version:2.4 Issues Reported for 2.4 and removed area:core labels Oct 10, 2022
@jedcunningham jedcunningham added this to the Airflow 2.4.2 milestone Oct 10, 2022
@bbovenzi
Copy link
Contributor

bbovenzi commented Oct 11, 2022

Oh we should probably include end_of_log in the REST API response.

Edit. end_of_log doesn't work here , but I found a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:2.4 Issues Reported for 2.4 area:UI Related to UI/UX. For Frontend Developers. kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants