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

   ## Summary
   - Add `skip_on_exit_code` parameter to `EcsRunTaskOperator`, allowing users 
to specify exit codes that should mark the task as skipped 
(`AirflowSkipException`) instead of failed.
   - This is consistent with the existing `skip_on_exit_code` parameter in 
`DockerOperator` and `KubernetesPodOperator`.
   - Accepts a single int or a container of ints (e.g., `skip_on_exit_code=2` 
or `skip_on_exit_code=[2, 3]`).
   
   ## Motivation
   Currently, any non-zero exit code from an ECS task raises 
`AirflowException`. There is no way to skip a task based on a specific exit 
code, unlike `DockerOperator` and `KubernetesPodOperator` which already support 
this.
   
   This was originally proposed in #47256 by @mariotaddeucci but went stale. 
This PR rebases the idea onto the current codebase and aligns the interface 
with DockerOperator and KubernetesPodOperator.
   
   ## Test plan
   - [x] `test_check_success_task_raises_skip_exception` — exit code in 
`skip_on_exit_code` raises `AirflowSkipException`
   - [x] `test_check_success_task_skip_exception_with_logs` — same behavior 
when CloudWatch logs are present
   - [x] `test_check_success_task_unmatched_exit_code_raises_airflow_exception` 
— unmatched exit codes still raise `AirflowException`
   - [x] All existing `TestEcsRunTaskOperator` tests pass
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code
   
   Generated-by: Claude Code following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


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