ColtenOuO opened a new pull request, #70474:
URL: https://github.com/apache/airflow/pull/70474

   When `EcsRunTaskOperator` runs with `deferrable=True` and the task 
definition ships its container logs to a different region than the one the task 
runs in (`awslogs_region` != `region_name`), no logs are forwarded during 
deferral -- the trigger just repeats "Tried to get logs from stream ... but it 
didn't exist (yet)" for the whole task duration.
   
   `TaskDoneTrigger` was given a single `region_name` and used it for two 
different clients: the ECS waiter (correct) and the CloudWatch `get_log_events` 
client (wrong -- the log group lives in the other region).
   
   The operator never passed the logs region to the trigger, so the trigger had 
no way to tell them apart.
   
   This adds a `log_region_name` parameter to `TaskDoneTrigger`, used only for 
the `AwsLogsHook`, and has the operator pass `resolve_awslogs_region()` when 
deferring. The `EcsHook` keeps using `region_name`.
   
   The parameter defaults to `None` and falls back to `region_name`, so 
triggers that were already serialized before this change deserialize without 
the key and keep their current behaviour.
   
   This is the remaining half of the log-region resolution: #70464 fixed the 
post-deferral fetch in `execute_complete`, and the non-deferrable path already 
used `resolve_awslogs_region()` via `_get_task_log_fetcher()`.
   
   closes: #70465
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5) for writing Tests
   


-- 
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]

Reply via email to