Replies: 1 comment 1 reply
-
Thanks for opening the discussion @d80tb7! Let me touch on a couple things you said and others could weigh in as well:
In the initial supported flow "packaging" method using pickles it was also intended that you would version the code your flow used by pinning dependencies on their environments (containers, local envs, etc.). However we have started to see that this could be a friction so (like you say below this) we are aiming to also adopt the file-like syncing mechanism. Not as a wholesale replacement to the pickle-based storage (because it definitely has its strengths) but as another option to users because Prefect is set up to handle a wide range of options here!
Yeah this is definitely a route we are exploring when dealing with flow dependencies, open to suggestions because it isn't fully fleshed out yet. The gist of what we think would be helpful here is if you could "sync" your repo with something like your agent so it could automatically deploy flow code without registration. We're really looking for some community buy-in and shared decisions to the sync design (as people were with the recent release of file-based storage) 🙂 |
Beta Was this translation helpful? Give feedback.
-
Once you have more than a single prefect flow, it's likely that you'll end up with some common flow management code that you would want to share between flows. Examples here would include:
At present, one must make sure that this code is present on the docker container running the prefect job, most likely by either copying the code into the image directly, or by extracting the common code into a pip package and pip installing it into the image. Essentially this means that the common code must be treated as a separate library and therefore separate from the flows themselves.
Unfortunately we have found that the above distinction gives the following issues:
The solution here is not straightforward as Prefect allows all flows to be registered independently. Because of this, I raise this ticket more to foster discussion of how this could be made easier, rather than presenting a fully formed solution. One thing I would note, however, is that Prefect appears to be moving more towards a airflow-style deployment model whereby flows live in git and are synced across automatically to the prefect backend. In this case, flows are not deployed independently and so one could imagine that any modules that are defined in the same git repo and that are referenced from the flows could be serialised alongside them and synced to the flow storage location.
Beta Was this translation helpful? Give feedback.
All reactions