PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.48k stars 1.52k forks source link

Add deployment status events on deployment edit and creation #12773

Open zhen0 opened 3 months ago

zhen0 commented 3 months ago

First check

Prefect Version

2.x

Describe the current behavior

If I update a deployment (e.g. to change the related work pool) its status may change from ready to unready (and vice versa) but no deployment status event is created.

Describe the proposed behavior

Any time a deployment goes from ready to unready (and vice versa) we emit a deployment status event.

Example Use

I want to be sure my deployment is healthy so create an automation that notifies when it's unhealthy. I edit my deployment to a work pool that has a problem and do not notice it. I would expect a notification but would not get one.

Additional context

This affects proactive automations too. If I create a deployment and it stays in unready, it would not trigger an automation that was looking for a deployment in an unready state.

zhen0 commented 3 months ago

I added this as an enhancement but I think there's an argument that it's a bug?