I’m curious if it is intended behavior that the prefect cli tool to build deployments runs the python code. I just ran into this now because of the way some new code behaves (needs access to secrets that are available in a certain context - and where deployments are built those secrets are not available). Is it necessary for
prefect deployment build to execute code in the files targeted?
Perhaps this is just a side effect of using Python? And not intended per se. That is, perhaps
prefect deployment build is loading the target Python files, and if there’s any code that’s not inside a function or class, then that code is executed. Perhaps there is a way to prevent this?