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

Send important executor logs to task logs #40468

Merged
merged 21 commits into from
Jul 10, 2024

Conversation

vincbeck
Copy link
Contributor

@vincbeck vincbeck commented Jun 27, 2024

If the executor fails to start a task, the user will not see any logs in the UI because the task has not started. This PR leverages TaskContextLogger implemented in #32646. It forwards the important error messages when an executor fail to execute a task to the task logs.

cc @o-nikolas


^ 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.rst or {issue_number}.significant.rst, in newsfragments.

Copy link
Contributor

@o-nikolas o-nikolas left a comment

Choose a reason for hiding this comment

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

Left a few comments. Also what about the Batch executor? Do you plan on fast following with that after this PR?

airflow/executors/base_executor.py Outdated Show resolved Hide resolved
airflow/utils/log/task_context_logger.py Outdated Show resolved Hide resolved
@vincbeck
Copy link
Contributor Author

vincbeck commented Jun 27, 2024

Left a few comments. Also what about the Batch executor? Do you plan on fast following with that after this PR?

Yep, my plan is to first do it with one executor and receive feedbacks, address feedbacks etc ... Then when the direction is set, I'll create another PR for BatchExecutor

@ferruzzi
Copy link
Contributor

Had a look and I don't have anything extra to add; I like the direction this is going. I'd need to see some examples to have any real opinion on the question of one or one-per-executor but otherwise, I think it looks good after that one change to the session creation that Niko mentioned.

@dstandish
Copy link
Contributor

@RNHTTR you might be good person to review from the perspective of "are these circumstances where user would otherwise not have insight into what happened to the task" slash "are these types errors too frequent" re impact to scheduler.

@vincbeck
Copy link
Contributor Author

vincbeck commented Jul 8, 2024

From the different conversations in this PR, are there still some concerns or feedbacks?

@vincbeck vincbeck requested a review from dstandish July 8, 2024 14:31
@o-nikolas
Copy link
Contributor

From the different conversations in this PR, are there still some concerns or feedbacks?

All good from my end 👍

Copy link
Contributor

@dstandish dstandish left a comment

Choose a reason for hiding this comment

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

lgtm

@vincbeck vincbeck merged commit aca140a into apache:main Jul 10, 2024
52 checks passed
@vincbeck vincbeck deleted the vincbeck/task_log_executor branch July 10, 2024 17:32
@utkarsharma2 utkarsharma2 added the type:improvement Changelog: Improvements label Jul 12, 2024
@utkarsharma2 utkarsharma2 added this to the Airflow 2.10.0 milestone Jul 12, 2024
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Executors-core LocalExecutor & SequentialExecutor area:logging area:providers provider:amazon-aws AWS/Amazon - related issues type:improvement Changelog: Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants