Prefect 2.7.10 has been released with a significant upgrade to the cancellation feature, production multi-architecture Docker images and more

Hi everyone!

Prefect 2.7.10 has been released.

We’re excited to announce an upgrade to our flow run cancellation feature, resolving many common issues.

When cancellation is requested, the agent now sends a termination signal (SIGTERM) to the flow run infrastructure. Previously, this signal resulted in the immediate exit of the flow run. Now, we detect the signal and attempt to shut down the process gracefully. This gives the run an opportunity to clean up any resources it is managing. If the flow run does not gracefully exit in a reasonable time, it will be killed.

More details about cancellation improvements:

  1. We improved how we handle runs in the process of cancelling – when a run is cancelled, it’s first placed in a “cancelling” state, then moved to a “cancelled” state when cancellation is complete.
  2. Previously, concurrency slots were released as soon as cancellation was requested. Now, the flow run will continue to occupy concurrency slots until a “cancelled” state is reached.
  3. We added cleanup of tasks and subflows belonging to cancelled flow runs. Previously, these tasks and subflows could be left in a “running” state. This can cause problems with concurrency slot consumption and restarts, so we’ve added a service that updates the states of the children of recently cancelled flow runs.

Additionally, from this release on, we’ll be publishing multi-architecture Docker images to DockerHub not only for development images, but also for production images! You can pull both linux/amd64 and arm64 -based images directly from DockerHub as follows:

You can pull both linux/amd64 and arm64-based images directly from DockerHub as follows:

docker pull prefecthq/prefect:2.7.10-python3.10 # default: linux/amd64
docker pull prefecthq/prefect:2.7.10-python3.10 --platform linux/arm64

And to validate the Prefect version and architecture:

docker run --platform linux/arm64 prefecthq/prefect:2-latest prefect version

Further enhancements and fixes added in this release:

  • added is_schedule_active to the Deployment object
  • added Kubernetes permissions to the prefect agent YAML template to enable it to query the kube-system namespace and retrieve the namespace UUID
  • improved handling of long-running Kubernetes jobs with the KubernetesJob infrastructure block
  • added support for obscuring secrets in nested block fields in the UI
  • several documentation fixes and enhancements incl. KubernetesJob options, contribution page, keep-alive settings, and Prefect Cloud Quickstart guide.

Collection updates:

  • prefect-openai got a new release v0.1.1, with a very cool new use case - you can expect a blog post about it soon!
  • prefect-dask’s landing page has been entirely updated

For all enhancements and fixes, make sure to check the release notes.

Happy engineering!

2 Likes