Hello @Marvin, If I delete a flow_run and a task_run from the database, will that delete its associated flow_run_state and task_run_state in the database?
m
Marvin
10/30/2024, 10:48 PM
To provide you with the most accurate answer, I need to know which version of Prefect you are using. If you could confirm whether it's 2.x or a later version, I can look up the right documentation for you!
a
Alan
10/30/2024, 10:48 PM
@Marvin 2.19.3
m
Marvin
10/30/2024, 10:48 PM
The current documentation doesn't provide specific information about whether deleting a
flow_run
or
task_run
will automatically delete its associated
flow_run_state
or
task_run_state
. Generally, in database management, cascading deletes aren't assumed unless explicitly stated. However, Prefect might handle this with special logic not covered in the available excerpts.
Since the documentation doesn't provide clarity, I recommend checking with Prefect's API or raising a question with their support or community for an authoritative answer. Alternatively, if the environment allows, testing this in a safe setting could help observe the behavior directly.
For more detailed exploration, you may refer to Prefect's state management or client handling guides here and here.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.