abhinav-phi opened a new pull request, #73109:
URL: https://github.com/apache/airflow/pull/73109
Sub-item of #72982 (EKS trigger/operator status mismatch).
**Root cause:** `EksDeleteClusterTrigger` yields `{"status": "deleted"}`
when the cluster is gone, but `EksDeleteClusterOperator.execute_complete` only
logs the success message when the status is `"success"` — so the "Cluster
deleted successfully." log line was unreachable. The trigger's other consumer,
`EksCreateClusterOperator.execute_failed`, already checks for `"deleted"`
correctly, which is why the fix goes on the operator side: changing the
trigger's yielded status would break that path.
**Changes**
- `providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py`:
accept the `"deleted"` status the trigger actually yields.
- `providers/amazon/tests/unit/amazon/aws/operators/test_eks.py`:
`test_execute_complete_when_trigger_yields_deleted` asserts the success log
fires for the trigger's real event.
**Testing**
- The new test fails on the old code and passes on the new code.
- `TestEksDeleteClusterOperator` (9 tests) + the full EKS trigger suite
(`tests/unit/amazon/aws/triggers/test_eks.py`, 18 tests): 27 passed locally.
- `ruff check` and `ruff format --check` clean on both files.
I checked the other EKS trigger/operator pairs (create
cluster/nodegroup/fargate profile, delete nodegroup/fargate profile): their
`AwsBaseWaiterTrigger` events carry `"success"`/`"error"` and the operators
match, so this was the only mismatch in the EKS family.
--
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]