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

Fix check served logs logic #41272

Merged
merged 5 commits into from
Aug 6, 2024

Conversation

dstandish
Copy link
Contributor

Background:

In #31101, I added logic to check for served logs when we did not find either local or remote logs.

In #32561, contributor @Khrol observed that for a task with multiple tries, if the user was looking at the logs for a non-running try, the UI would show an erroneous and potentially confusing 404 error. @Khrol attempted a fix that would suppress this error message.

In #39177, contributor @kahlstrm reported a bug introduced by #32562 and attempted to fix it.

The bug was reportedly that “non-running task try logs weren’t shown in the UI for running tasks”. This I think refers to when you are looking at the logs for a failed attempt. The contributor added, “This is due to us storing the logs on the worker with a Persistent Volume”. I assume this means that we did not check served logs in that case.

One question: why couldn’t the webserver access the PV? In #39496 same user added more conditions.

Problem:

We can't see logs served from triggerer when task deferred.

This PR:

This PR essentially restores the behavior to what it was prior to #32561. So we undo the enhancement in #32561, the first attempted fix #39177, and the second attempted fix #39496.

This means that while a task is in running state, if you look at logs for prior failed attempts, you may see a "checked served logs and did not find any" message. This can be mildly confusing but it's more important to restore access to logs.

@kahlstrm
Copy link
Contributor

kahlstrm commented Aug 6, 2024

One question: why couldn’t the webserver access the PV? In #39496 same user added more conditions.

The PV was only mounted to the worker and not on the webserver, hence the need for the the served logs for old attempts to be fetched from the served logs instead from the webserver. This could have been fixed on our end by adding a mount for the PV to the webserver, but instead trying to fix the bug introduced in upstream was chosen.

Copy link
Contributor

@kahlstrm kahlstrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jedcunningham jedcunningham merged commit fdda447 into apache:main Aug 6, 2024
80 checks passed
@jedcunningham jedcunningham deleted the fix-check-served-logs-logic branch August 6, 2024 01:29
@jedcunningham jedcunningham added this to the Airflow 2.10.0 milestone Aug 6, 2024
@utkarsharma2 utkarsharma2 added the type:bug-fix Changelog: Bug Fixes label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logging type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants