Skip to content

Flow Run continues to run after cancelled #17482

@gscholtes-relativity

Description

@gscholtes-relativity

Bug summary

A Flow Run in the running state can be cancelled (via API call to Prefect) and the Flow Run will continue to run, including new Tasks which start after the cancellation time.

Similar issues:

Version info

Version:             3.1.3
API version:         0.8.4
Python version:      3.10.12
Git commit:          39b6028c
Built:               Tue, Nov 19, 2024 3:25 PM
OS/Arch:             linux/x86_64
Profile:             ephemeral
Server type:         cloud
Pydantic version:    2.9.2
Integrations:
  prefect-azure:     0.4.2

Additional context

Some additional details:

  • In the Prefect UI and logs, we can see a prefect.flow-run.Cancelled log at the correct time
  • The Start and End time in the UI show the true start of the run and the End time is the cancellation time. Duration is based on start to cancel time.
  • New tasks Start and End after the cancellation time. Visible in logs and in UI

I will provide screenshots as possible (all from the same Flow Run):

Full run time visualized:
Image

Start and End agree with cancelled log but not above screenshot:
Image
Image
Image

The logs for the final Tasks of this Flow Run, which were scheduled to start, started, and ended after the cancel time and entered a completed state:
Image

Reproduction steps

I have not identified a reliable way to reproduce this. Any insight appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions