Repository navigation
Conversation
SameerMesiah97
left a comment
There was a problem hiding this comment.
Approach looks fine to me but someone more familiar with this area should weigh in. I have left some comments.
f59182e to
8f538c8
Compare
8f538c8 to
c47b237
Compare
acfbaf0 to
ce3ab59
Compare
|
@1fanwang This PR has been converted to draft because it does not yet meet our Pull Request quality criteria. Issues found:
What to do next:
Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
ce3ab59 to
22345de
Compare
1f98c4f to
f9d5dd7
Compare
Raising AirflowFailException is the documented way to fail a task without retrying. Until now that signal was silently swallowed when raised from on_retry_callback: the catch-all `except Exception` inside `_run_task_state_change_callbacks` ate it, the task stayed UP_FOR_RETRY, and another attempt was scheduled. The retry path now defers sending its terminal message until after on_retry_callback has run. If the callback raises AirflowFailException, the state is promoted to FAILED, the pending RetryTask is replaced with TaskState(FAILED), and the failure-path finalizers (on_failure_callback, listener.on_task_instance_failed, email_on_failure) run as if the task had failed without ever attempting a retry. Other exceptions from on_retry_callback are still logged and swallowed, so callbacks that optimistically clean up partial data continue to work unchanged. closes: apache#60172 Signed-off-by: 1fanwang <[email protected]>
Separate the log / state-promotion / message-rewrite / failure-finalizer blocks in the on_retry_callback failure path with blank lines. Signed-off-by: 1fanwang <[email protected]>
381c313 to
b61cc42
Compare
|
Hello @1fanwang - thank you for your contributions to Apache Airflow! The Airflow community has introduced a limit of 5 open pull requests at a time for contributors without write access to the repository. You currently have 34 open pull requests, so - as a one-time step of introducing the limit - we closed the ones where maintainers have not engaged yet:
These pull requests stay open because maintainers are already engaged in them - they count towards your limit:
This is not a judgement of you or of your changes. We never told contributors before that opening many pull requests at once was a problem, so there is nothing to feel bad about - and nothing is lost: your branches, commits and the review history stay where they are. What we ask you to do is to make your first prioritization decision: choose which of the pull requests above matter most to you, and reopen them (up to 5 open at a time, including the ones still open) with the "Reopen pull request" button or While your pull requests are waiting for review, the most valuable thing you can do is help in other ways - reviewing other contributors' pull requests, helping with issues, and taking part in the discussions on the devlist and Slack. Why we introduced the limit, what it means for you and how to reopen or restore a pull request is explained in https://github.com/apache/airflow/blob/main/contributing-docs/32_open_pull_request_limit.rst. Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting |
Retry callbacks can now stop a task by raising AirflowFailException. Previously Airflow logged the exception and retried anyway. Other callback exceptions still allow retries.
The worker reports the outcome after callbacks, so failure callbacks, listeners and email use the final state.
Closes #60172.
Testing
SQLite Dag test through the real task runner and Execution API; not a scheduler deployment.
Save as repro.py in callback-proof under the PR checkout:
Dag, commands and raw output
From the repository root:
Before, after, then the ordinary-exception control:
Was generative AI tooling used to co-author this PR?
Generated-by: GitHub Copilot CLI (GPT-6 Astra) following the guidelines