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:
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:
If I comment out one of the options (ExplorerCanPublish in my example) from the options list, like:
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:
If I add another option (ViewerWithPublish in my example), like:
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:
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?
Code of Conduct
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:
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
HITLOperatoroperator call, but they are nowhere to be seen:If I comment out one of the options (
ExplorerCanPublishin my example) from the options list, like:I can see the 3 options as buttons in the UI:
If I add another option (
ViewerWithPublishin my example), like:I can see all of the options in a dropdown list:
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?
Code of Conduct