https://prefect.io logo
Title
a

alex

04/10/2023, 6:52 PM
I am running into an issue where flow runs that have been paused are being marked as complete. Has anyone seen this before? This issue happens randomly for the same flow. I am using Prefect 2.8.
My flow structure is
valid_clients = get_client_list(clients=clients, region=config.region)
    utils.send_slack_alert(slack_block_name, f"Starting deployment for client(s): {valid_clients}")

    wait_start = utils.send_pause_alert(
        webhook_block_name=slack_block_name, context_str="initial confirmation"
    )
    ... 5-6 more tasks
def send_pause_alert(webhook_block_name, context_str: str = None):
    wait_timeout = 60 * 60 * 24
    url = get_ui_flowrun_url()
    flow_name = get_run_context().flow.name

    message = (
        f"A flow run for {flow_name} has been paused. Please approve to continue processing: {url}"
    )
    if context_str:
        message += f". Context: {context_str}"

    send_slack_alert(webhook_block_name, message)
    pause_flow_run(timeout=wait_timeout)
These are the last logs
Executing 'Get valid clients-0' immediately...
10:00:28 AM
prefect.flow_runs

Finished in state Completed()
10:00:32 AM
Get valid clients-0
prefect.task_runs

Pausing flow, execution will continue when this flow run is resumed.
10:00:34 AM
prefect.flow_run
The infra is a Kubernetes Job with image storage