Ferdinanddb opened a new issue, #75863:
URL: https://github.com/apache/airflow/issues/75863

   ### Description
   
   Let a HITL task (e.g. `ApprovalOperator`) require approval from a minimum 
number of distinct users among `assigned_users`, instead of completing on the 
first response. For example, with `assigned_users=[a, b, c]` and 
`required_approvals=2`, the task stays in `awaiting_input` until two different 
assigned users have approved; a rejection resolves it as rejected.
   
   ### Use case/motivation
   
   Some manual actions need a four-eyes check: nobody should be able to run 
them alone. Ours is a manually triggered Dag that resets state in a live system 
at any time of day. We want any 2 people out of a pool of 3 (or 5) to approve 
before it runs.
   
   Today a HITL task completes on the first answer from any assigned user. The 
workaround is to chain two `ApprovalOperator`s and assign the second to the 
pool minus whoever answered the first. That needs a subclass, because 
`assigned_users` isn't a template field, and it adds one task per extra 
approval. Native support would also show the approval progress (who approved, 
how many are still needed) in one place on the Required Actions page.
   
   ### Related issues
   
   - #75358 adds `request_input()` inside a Python task, which allows asking 
several times, but each question still completes on one answer.
   - #74652 (closed draft) proposed resolving `assigned_users` from identifiers 
at task start.
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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