-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
Description
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:
- Prefect run runtime not stopped when run is canceled #16939 this issues mentions something about failing tasks (details unclear but in our case no failed tasks). In their case the flow run is cancelled via UI, so possibly a similar root cause?
- Job stuck in Cancelling state #16001 this is for runs stuck in the Cancelling state. In contrast, we saw a run successfully enter the Cancelled state but then continue to run.
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.Cancelledlog 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):
Start and End agree with cancelled log but not above screenshot:



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:

Reproduction steps
I have not identified a reliable way to reproduce this. Any insight appreciated.
mirageAlchemy, Nicolas-Parot-Alvarez-Paidy, TheoBabilon and thoec
