Skip to content

AIP-72: Remove redundant handling of AirflowException#45505

Merged
kaxil merged 1 commit intoapache:mainfrom
astronomer:remove-redundant-af-exception
Jan 9, 2025
Merged

AIP-72: Remove redundant handling of AirflowException#45505
kaxil merged 1 commit intoapache:mainfrom
astronomer:remove-redundant-af-exception

Conversation

@kaxil
Copy link
Member

@kaxil kaxil commented Jan 9, 2025

This is already handled in the code below:

except (AirflowTaskTimeout, AirflowException):
# We should allow retries if the task has defined it.
log.exception("Task failed with exception")
msg = TaskState(
state=TerminalTIState.FAILED,
end_date=datetime.now(tz=timezone.utc),
)
# TODO: Run task failure callbacks here

So it will never reach

except AirflowException:
# TODO: handle the case of up_for_retry here
log.exception("Task failed with exception")
msg = TaskState(
state=TerminalTIState.FAILED,
end_date=datetime.now(tz=timezone.utc),
)


^ 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.

@kaxil kaxil merged commit 92c72db into apache:main Jan 9, 2025
@kaxil kaxil deleted the remove-redundant-af-exception branch January 9, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants