Hi J! A few notes:
• flow functions are always executed as a Python function, meaning any code within them will be rerun
•
however,
tasks within the flow function will not always rerun! Whether a given task call is rerun or not depends on 1.) whether the task run ID has already completed successfully and 2.) whether it persisted its output somewhere (which can be determined via setting a result)
Check out
https://docs.prefect.io/latest/concepts/results/?h=persis#persisting-results for more info.
So in summary, things won't run if you encapsulate all logic within persisted tasks, but anything outside of a task will always rerun.