FrankYang0529 commented on PR #68902:
URL: https://github.com/apache/airflow/pull/68902#issuecomment-4900579763
@jason810496 Thanks for the review. I tested with following dag and we don't
have error message in the first try `Post Execute` now.
```python
from __future__ import annotations
import datetime
from airflow.sdk import DAG
from airflow.sdk.bases.operator import BaseOperator
class FailingOverwriteRTIFOperator(BaseOperator):
template_fields = ("message",)
overwrite_rtif_after_execution = True
def __init__(self, *, message: str = "hello {{ ds }}", **kwargs):
super().__init__(**kwargs)
self.message = message
def execute(self, context):
raise RuntimeError("Intentional failure to reproduce RTIF finalize
bug")
with DAG(
dag_id="repro_rtif_finalize",
start_date=datetime.datetime(2024, 1, 1),
schedule=None,
catchup=False,
):
FailingOverwriteRTIFOperator(
task_id="boom",
retries=1, # ← 關鍵:讓 try 1 進
UP_FOR_RETRY
retry_delay=datetime.timedelta(seconds=5), # 短一點,快點看到 retry
)
```
<img width="1312" height="726" alt="Screenshot 2026-07-07 at 2 46 01 PM"
src="https://github.com/user-attachments/assets/a3f084b4-b406-4473-8843-48ae33d758e1"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]