farrukh-t opened a new issue, #64413:
URL: https://github.com/apache/airflow/issues/64413

   ### Apache Airflow version
   
   3.1.8
   
   ### What happened and how to reproduce it?
   
   It appears that HITLOperator doesn't always display the options in the UI. I 
think it might be caused either by the length of an individual option string or 
perhaps by the count of options
   
   To reproduce, create a DAG with a HITLOperator:
   ```py
   import pendulum
   from airflow.providers.standard.operators.hitl import HITLOperator
   from airflow.sdk import DAG
   
   with DAG(
       dag_id="hitl_missing_options",
       start_date=pendulum.datetime(2025, 1, 1, tz="UTC"),
       schedule=None,
       catchup=False,
   ):
       choose_environment = HITLOperator(
           task_id="choose_environment",
           subject="Select a role to proceed.",
           body="Please select one of the valid roles below to proceed.",
           options=[
               "Creator",
               "Explorer",
               "ExplorerCanPublish",
               "Viewer",
           ],
       )
   
   ```
   In the UI, trigger the DAG, then navigate over to Required Action tab - it's 
supposed to let you select one of the options specified in the `HITLOperator` 
operator call, but they are nowhere to be seen:
   
   <img width="1512" height="667" alt="Image" 
src="https://github.com/user-attachments/assets/a50fa35b-121c-40b1-9604-0fd6ea4de7cf";
 />
   
   If I comment out one of the options (`ExplorerCanPublish` in my example) 
from the options list, like:
   ```py
       choose_environment = HITLOperator(
           task_id="choose_environment",
           subject="Select a role to proceed.",
           body="Please select one of the valid roles below to proceed.",
           options=[
               "Creator",
               "Explorer",
               # "ExplorerCanPublish",
               "Viewer",
           ],
       )
   ```
   I can see the 3 options as buttons in the UI:
   
   <img width="1454" height="525" alt="Image" 
src="https://github.com/user-attachments/assets/d4331c21-8337-4e93-8ec0-3a591c888b61";
 />
   
   If I add another option (`ViewerWithPublish ` in my example), like:
   ```py
       choose_environment = HITLOperator(
           task_id="choose_environment",
           subject="Select a role to proceed.",
           body="Please select one of the valid roles below to proceed.",
           options=[
               "Creator",
               "Explorer",
               "ExplorerCanPublish",
               "Viewer",
               "ViewerWithPublish",
           ],
       )
   ```
   I can see all of the options in a dropdown list:
   
   <img width="1450" height="643" alt="Image" 
src="https://github.com/user-attachments/assets/32c96ab6-7850-4766-ae9a-4fce0f6bec3f";
 />
   
   ### What you think should happen instead?
   
   The options should be shown either in a dropdown or as buttons, and the user 
should be able to select an option for the DAG to proceed.
   
   ### Operating System
   
   Debian GNU/Linux 12 (bookworm)
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Other Docker-based deployment
   
   ### Deployment details
   
   A VSCode devcontainer environment that runs db migrations and starts 
scheduler, api-server, dag processor and a triggerer for local development.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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