vladimirbinshtok commented on issue #52943:
URL: https://github.com/apache/airflow/issues/52943#issuecomment-3048871184
@fweilun I'm getting the following log messages:
```
Starting call to
'***.providers.amazon.aws.operators.ecs.EcsRunTask0perator._check_success_task',
this is the lst time calling it.
ECS Task stopped, check status: ('tasks': [{'attachments': [...
Finished call to
'***.providers.amazon.aws.operators.ecs.EcsRunTask0perator._check_success_task'
after 0.395(s), this was the ist time cal
Starting call to
'***.providers.amazon.aws.operators.ecs.EcsRunTask0perator._check_success_task',
this is the 2nd time calling it.
Marking task as SUCCESS. dag_id=.... task_id=main_task,
execution_date=20250706T080803, start_date=2025076
```
Starting/Finished call logs come from the `tenacity_before_logger` and
`tenacity_after_logger` functions that are defined here
```Python
@staticmethod
def retry(should_retry: Callable[[Exception], bool]):
"""Repeat requests in response to exceeding a temporary quote limit."""
def retry_decorator(fun: Callable):
@wraps(fun)
def decorator_f(self, *args, **kwargs):
retry_args = getattr(self, "retry_args", None)
if retry_args is None:
return fun(self, *args, **kwargs)
multiplier = retry_args.get("multiplier", 1)
min_limit = retry_args.get("min", 1)
max_limit = retry_args.get("max", 1)
stop_after_delay = retry_args.get("stop_after_delay", 10)
tenacity_before_logger = tenacity.before_log(self.log,
logging.INFO) if self.log else None
tenacity_after_logger = tenacity.after_log(self.log,
logging.INFO) if self.log else None
default_kwargs = {
"wait": tenacity.wait_exponential(multiplier=multiplier,
max=max_limit, min=min_limit),
"retry": tenacity.retry_if_exception(should_retry),
"stop": tenacity.stop_after_delay(stop_after_delay),
"before": tenacity_before_logger,
"after": tenacity_after_logger,
}
return tenacity.retry(**default_kwargs)(fun)(self, *args,
**kwargs)
return decorator_f
return retry_decorator
```
Also, I missed in the description that I'm using ECS operator in deferable
mode.
--
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]