Prefect 3.7.3: Scheduler Performance and Dependency Changes


Prefect 3.7.3 was released on June 1 2026, bringing targeted performance improvements to the scheduler and a significant change to how the runner handles project dependencies. This version focuses on database efficiency for high volume environments and provides operators with more granular control over the execution environment.

The full release notes and downloads are on the GitHub release page.

The headline change in this release is the activation of a partial index for the scheduler. This update is designed to speed up scheduling queries by reducing the scan space for task runs and flow runs that require immediate processing. For platform operators managing large scale deployments with thousands of concurrent tasks, this change reduces database load and improves the responsiveness of the orchestration engine.

Import times for the prefect.server package have also been optimized. By lazifying exports, the project has reduced the overhead of loading server side components. This change benefits both local development workflows and serverless execution environments where fast cold starts are critical for maintaining low latency pipelines.

A major behavioral change in this release affects how the runner handles code deployments. Previously, in version 3.7.2, the runner would automatically attempt to install dependencies when pulling code that contained a pyproject.toml file. While convenient for some users, this automated behavior could lead to unexpected side effects in controlled production environments or when using pre built container images.

In Prefect 3.7.3, automatic dependency installation is now disabled by default. This change ensures that the runner does not modify the execution environment unless explicitly instructed to do so. Operators who rely on this feature must now explicitly enable it using the PREFECT_RUNNER_AUTO_INSTALL_DEPENDENCIES environment variable or by setting runner.auto_install_dependencies = true in their configuration profile.

The release exposes new settings for fine tuning WebSocket connections when running with uvicorn. Operators can now configure the ping interval and ping timeout directly. This is particularly useful for maintaining stable connections between workers and the server in environments with aggressive load balancer timeouts or unstable network paths.

A fix for an OverflowError in the reconnect_delay exponent logic ensures that long running clients do not crash when attempting to reconnect after extended outages. The exponent is now capped to a safe range, preventing the reconnection delay from exceeding the limits of the Python integer type. This is a critical fix for distributed agents operating over unreliable wide area network links.

This release includes a security update for the Starlette dependency, bumping it to version 1.2.0 to address CVE-2026-48710. Operators running Prefect in exposed environments should upgrade to ensure they are protected against potential vulnerabilities in the underlying web framework.

Additional improvements have been made to the safety of API communication. The client now redacts user information from API URLs in error messages, preventing sensitive credentials from being leaked into logs or monitoring systems. This follows a general trend in the project toward better default security for distributed deployments and improved compliance with data privacy standards.

Prefect 3.7.3 improves how metadata is handled for persisted results. A bug fix in the result persistence layer ensures that metadata is preserved correctly throughout the task lifecycle. This is critical for data engineers who rely on result inspection for debugging or for building downstream processing steps based on task output.

The order of upserts in the TaskRunRecorder is now preserved. This change addresses potential race conditions or ordering issues when multiple task runs are recorded in rapid succession. Maintaining strict ordering ensures that the state of the workflow remains consistent with the actual execution sequence as observed by the scheduler.

The development team has implemented several changes to improve the maintainability and testability of the project. This includes adding a server side cleanup queue for storage used in worker communication. This architectural improvement helps manage resources more effectively as workers connect and disconnect from the server.

The integration test suite has also seen updates, with several tests transitioning to use direct API calls instead of higher level abstractions. This change makes the tests more robust and less susceptible to failures caused by unrelated changes in the client logic. Timing tolerances in flaky tests have been widened to account for jitter in CI environments, ensuring more reliable build signals for the core maintainers.

The shift to an opt in model for dependency installation is a breaking change for users who expected the runner to prepare the environment automatically. Before upgrading to 3.7.3, verify if your deployment pipelines rely on the automatic installation of packages from pyproject.toml. If they do, you must update your environment configuration to enable the feature.

Users of the RetryFailedTasks logic should also note a fix for a potential ZeroDivisionError. This error occurred when a retry_jitter_factor was configured without an accompanying retry_delay. The logic now includes a guard to prevent crashes in this specific configuration state, providing more robust error handling during task retries.