Skip to content

Add a log message when a trigger is canceled for timeout #31720

Description

@dstandish

Body

The trigger log doesn't show that a trigger timed out when it is canceled due to timeout.

We should try to see if we can add a log message that would show up in the right place. If we emit it from the trigger process, it might show up out of order.

But then again, if we ultimately don't need to go back to the task, that would not be a problem.

Additionally if we ultimately can "log from anywhere" then again, this would provide a clean solution.

This came up in PR discussion here: #30853 (comment)

The relevant trigger code is here: https://github.com/apache/airflow/blob/main/airflow/jobs/triggerer_job_runner.py#L598-L619

I think we could add logic so that when we receive a cancelled error (which could be for a few different reasons) then we can log the reason for the cancellation. I think we could just add an except CancelledError and then log the reason. We might need also to update the code in the location where we actually initiate the cancellation to add sufficient information for the log message.

cc @syedahsn @phanikumv @jedcunningham @pankajastro

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions