Li
12/07/2023, 6:51 PMNate
12/07/2023, 8:24 PMLi
12/07/2023, 8:47 PMNate
12/07/2023, 9:11 PMartifacts, logs and task state cache items are not deletedartifacts being kept around by default makes sense to me, sort of by definition, but im not so sure on the latter two. if you wanted to delete more things on deletion of a deployment that aren't already covered by our cascades, I think one could implement a util / simple service that looks up resources (like artifacts, logs etc) related to the deployment being deleted and deletes them - im not so sure on an what an exact implementation would look like off the top, but a simple place to start could be just using the client to write some function like
delete_deployment_and_associated_resources
that you call when you want your custom deletion behaviorLi
12/08/2023, 6:13 AMLi
12/08/2023, 6:14 AMNate
12/08/2023, 5:23 PMsome of the objects don't have delete functions on the python SDK client. looking ... do you have an advice on how to deal with those ?yeah you can customize the client like
from prefect.client.orchestration import PrefectClient
class MyPrefectClient(PrefectClient):
async def delete_logs_for_deployment(self, deployment_id: uuid.UUID):
pass
...
or open a PR if you think the methods would be generally usefulLi
12/08/2023, 5:24 PMNate
12/08/2023, 5:24 PM