Folks, i am triggering a flow run via local prefect server (through UI - “quick run button”) but it ...
a
Folks, i am triggering a flow run via local prefect server (through UI - “quick run button”) but it keeps scheduling (shown yellow dot in graph) and never runs. Task state always shows “pending” any idea what could be wrong?
a
Perhaps there's a label issue? The prefect agent must have a superset of the labels on the flow.
a
@Amanda Wee , I do have label on flow. can you tell me do i need to explicitly assign label to agent?
a
but it did run initially without this config. Later i just removed one task from the flow and it stopped working. strange. well, i’ll try to use
run_config
thanks 🙏
the flow runs if it do 
flow.run()
  in code but triggering from UI is not working 🧐 I tried universal IT solution “*Did you turn it off and on again*” - did not work 🙂
this is my code snippet:
Copy code
with Flow(
    name=flow_name,
    # schedule=schedule,
    state_handlers=[slack_notifier(only_states=[Success]), flow_state_handler],
) as flow:
    ---some logic---
        for sync_type, cmd_parameter in sync_commands:
            ---some logic --
            sync_command = (
                f"{command_prefix} {source_bucket} {destination_bucket} {options}"
            )
            s3_sync_task = ShellTask(
                command=sync_command,
                return_all=True,
                name=task_id,
                slug=task_id,
                timeout=timedelta(minutes=task_execution_timeout),
            )()

            # Create a task to validate sync commands.
            validate_s3_sync_task = FunctionTask(
                fn=validate_s3_sync,
                name="".join(["validate_", task_id]),
                slug="".join(["validate_", task_id]),
            )(
                timeout=timedelta(minutes=task_execution_timeout),
                s3_sync_command=sync_command,
            )

            # Define dependencies between tasks.
            s3_sync_task.set_downstream(validate_s3_sync_task)
            
# flow.run()
flow.register(project_name="demo-project", labels=tags)
a
Let's get the potential label issue out of the way: what are the labels on the flow, and what are the labels on the agent?
a
@Amanda Wee its fixed 🙂 thanks for the followup!
👍 1