Releases: PrefectHQ/prefect
3.1.10.dev2: Nightly Development Release
What's Changed
Integrations & Dependencies 🤝
- [typing] misc prefect modules by @mjpieters in #16468
Full Changelog: 3.1.10.dev1...3.1.10.dev2
3.1.10.dev1: Nightly Development Release
What's Changed
Development & Tidiness 🧹
- [typing] update
prefect.futures
by @zzstoatzz in #16381
Full Changelog: 3.1.9...3.1.10.dev1
3.1.9: All I Want for Christmas is Queue
What's Changed
Enhancements ➕➕
- Log exceptions when run submission fails in both the runner and worker by @cicdw in #16424
- Refactor
prefect.flow
decorator by @mjpieters in #16405
Bug Fixes 🐞
- use correct async method on storage blocks by @zzstoatzz in #16445
- fix passing
enforce_parameter_schema
inprefect deploy
by @zzstoatzz in #16418 - make
from_source
safe to use concurrently by @zzstoatzz in #16458 - pass auth headers to
/csrf
by @aaazzam in #16464
Integrations & Dependencies 🤝
- fix
MattermostWebhook
tests by @zzstoatzz in #16433 - Add redis causal ordering implementation by @zangell44 in #16416
- Wrap
OTLPLogExporter
andOTLPSpanExporter
in aQueueService
to pull them out of the main thread by @bunchesofdonald in #16439
Development & Tidiness 🧹
- Update @prefecthq/prefect-ui-library to version 3.11.28 by @marvin-robot in #16437
- Update worker to use orchestration client for updating labels by @bunchesofdonald in #16426
- [typing] Remove overload from inject_client by @mjpieters in #16463
- [typing] prefect.exceptions by @mjpieters in #16456
- [typing] Annotate all getattr_migration callsites by @mjpieters in #16457
- [typing] clean up prefect init.py by @mjpieters in #16451
- Update @prefecthq/prefect-ui-library to version 3.11.30 by @marvin-robot in #16470
Documentation 📓
- Add an example for creating an automation to mark zombie flow runs as crashed by @desertaxle in #16425
- Add a tutorial showing how to set up an email alert in Prefect Cloud by @daniel-prefect in #16345
- Add tutorials to the overview page of the docs by @daniel-prefect in #16454
Full Changelog: 3.1.8...3.1.9
3.1.9.dev3: Nightly Development Release
What's Changed
Enhancements ➕➕
Integrations & Dependencies 🤝
- Refactor prefect.flow decorator by @mjpieters in #16405
Development & Tidiness 🧹
- Update worker to use orchestration client for updating labels by @bunchesofdonald in #16426
- [typing] Remove overload from inject_client by @mjpieters in #16463
- [typing] prefect.exceptions by @mjpieters in #16456
- [typing] Annotate all getattr_migration callsites by @mjpieters in #16457
Documentation 📓
- Add tutorials to the overview page of the docs by @daniel-prefect in #16454
Full Changelog: 3.1.9.dev2...3.1.9.dev3
2.20.16: Back to the 2.x Future
What's Changed
Bug Fixes 🐞
- backport retry delay type fix by @zzstoatzz in #16377
- Backport: deleting flows in python client prefect 2.0 by @paulusaptus in #16311
- Backport: Prevent workers from running flow runs scheduled for in process retry by @desertaxle in #16453
Integrations & Dependencies 🤝
- backport #16149 by @zzstoatzz in #16317
- Update typer requirement from !=0.12.2,<0.14.0,>=0.12.0 to >=0.12.0,!=0.12.2,<0.16.0 by @dependabot in #16207
Full Changelog: 2.20.15...2.20.16
3.1.9.dev2: Nightly Development Release
What's Changed
Integrations & Dependencies 🤝
- fix
MattermostWebhook
tests by @zzstoatzz in #16433
Development & Tidiness 🧹
- Update @prefecthq/prefect-ui-library to version 3.11.28 by @marvin-robot in #16437
Documentation 📓
- Add an example for creating an automation to mark zombie flow runs as crashed by @desertaxle in #16425
- Add a tutorial showing how to set up an email alert in Prefect Cloud by @daniel-prefect in #16345
Uncategorized
- Wrap OTLPLogExporter and OTLPSpanExporter in a QueueService to pull them out of the main thread by @bunchesofdonald in #16439
- Add redis causal ordering implementation by @zangell44 in #16416
Full Changelog: 3.1.9.dev1...3.1.9.dev2
3.1.9.dev1: Nightly Development Release
What's Changed
Bug Fixes 🐞
- fix passing
enforce_parameter_schema
inprefect deploy
by @zzstoatzz in #16418
Full Changelog: 3.1.8...3.1.9.dev1
3.1.8: A Tale of Two Features
What's Changed
Runner Heartbeats for Flow Run Monitoring
Flow runs can now emit heartbeat events to detect infrastructure failures (crashed machines, evicted containers, etc). When enabled, an automation can automatically mark flows as crashed when heartbeats stop, preventing stuck "zombie" flows in the running state.
Enable with:
- Set
PREFECT_RUNNER_HEARTBEAT_FREQUENCY
(requires Prefect 3.1.8+) - Deploy the provided automation script to update flow states when heartbeats stop
from prefect.automations import Automation
from prefect.client.schemas.objects import StateType
from prefect.events.actions import ChangeFlowRunState
from prefect.events.schemas.automations import EventTrigger, Posture
my_automation = Automation(
name="Crash zombie flows",
trigger=EventTrigger(
after={"prefect.flow-run.heartbeat"},
expect={
"prefect.flow-run.heartbeat",
"prefect.flow-run.Completed",
"prefect.flow-run.Failed",
"prefect.flow-run.Cancelled",
"prefect.flow-run.Crashed",
},
match={"prefect.resource.id": ["prefect.flow-run.*"]},
for_each={"prefect.resource.id"},
posture=Posture.Proactive,
threshold=1,
within=90,
),
actions=[
ChangeFlowRunState(
state=StateType.CRASHED,
message="Flow run marked as crashed due to missing heartbeats.",
)
],
)
my_automation.create()
Basic Authentication
We have also added a long requested feature: basic authentication support for the Prefect API. Enable by setting an auth string:
Start a protected server:
PREFECT_SERVER_API_AUTH_STRING="admin:admin" prefect server start
Authenticate client operations:
PREFECT_API_AUTH_STRING="admin:admin" python flow_script.py
Enhancements ➕➕
- Add working implementation of basic auth to server and client by @cicdw in #16408
- Add basic auth UI by @aaazzam in #16411
- Enhance
Runner
to send heartbeat events for flow runs by @desertaxle in #16410
Integrations & Dependencies 🤝
- add async redis client utils to
prefect-redis
by @zzstoatzz in #16417
Documentation 📓
Full Changelog: 3.1.7...3.1.8
3.1.8.dev1: Nightly Development Release
What's Changed
Enhancements ➕➕
Documentation 📓
- Enhance
Runner
to send heartbeat events for flow runs by @desertaxle in #16410
Full Changelog: 3.1.7...3.1.8.dev1
3.1.7: Straight outta Half Moon Bay
What's Changed
Enhancements ➕➕
- Support http proxies for websockets by @jakekaplan in #16326
- update contributor dev instructions by @zzstoatzz in #16376
Bug Fixes 🐞
- Fix missing terminal state timings for TimedOut tasks by @GalLadislav in #16328
- Early error on bad retry delay types by @cicdw in #16369
- [typing] add overload for empty
@task
decorator by @zzstoatzz in #16386 - Use
websocket_connect
utility inSubscriptions
by @jakekaplan in #16388 - dont ask to confirm deletion of non-existent gcl by @zzstoatzz in #16379
Development & Tidiness 🧹
- Add
Block.aload
method and remove@sync_compatible
fromBlock.load
by @desertaxle in #16341 - Exclude UI v2 PRs from the release notes auto-generation by @desertaxle in #16344
- remove
sync_compatible
fromgit_clone
by @zzstoatzz in #16340 - [typing]
prefect.serializers
by @desertaxle in #16331 - remove
sync_compatible
fromprefect.variables
by @zzstoatzz in #16349 - Consolidate use of
DateTime
toprefect.types
by @zzstoatzz in #16356 - Fix type analysis check for PRs from forks by @desertaxle in #16359
- improve
Dockerfile
build time and add CI to catch future slow downs by @zzstoatzz in #16348 - Add buffer to type completeness check by @desertaxle in #16361
- only run docker build bench on push to main by @zzstoatzz in #16365
- [typing]
prefect.tasks
andprefect.task_worker
by @zzstoatzz in #16332 - update
entrypoint.sh
to useuv
forEXTRA_PIP_PACKAGES
by @zzstoatzz in #16291 - update example output for
prefect work-pool inspect
by @zzstoatzz in #16378 - [typing] prefect.server.utilities.database by @mjpieters in #16368
- Pick up trace context from run labels by @bunchesofdonald in #16346
- Refactor db_injector decorator by @mjpieters in #16390
- Correctly maintain span hierarchy when instrumenting nested tasks/flows by @bunchesofdonald in #16384
Documentation 📓
- Remove missing page from the nav by @daniel-prefect in #16351
- Update flow run instrumentation to use
RunTelemetry
class by @jeanluciano in #16233 - Add experimental support for emitting lineage events by @abrookins in #16242
- update tutorial for clarity by @zzstoatzz in #16354
Full Changelog: 3.1.6...3.1.7