Hi! I have 2 questions about flows versioning - 1....
# ask-community
g
Hi! I have 2 questions about flows versioning - 1. Is it possible to run archived version of a flow? 2. The documentation states:
You could override the automatic version promotion to unarchive and enable old versions (for example, for A/B testing)
How can I do that?
a
@Gabi Pi 1. It’s not possible atm 2. You could build a custom function that you pass as idempotency key to prevent from incrementing a Version upon each registration, but this would also not unarchive, but only prevent bumping up the version number
Copy code
flow.register(project_name="community", idempotency_key=your_custom_hash_function())
So overall, I think it’s not currently supported.
g
So I think that docs are a bit misleading in this case. It seems that there is no option to run A/B testing leveraging the flow versioning feature...
a
Thanks, yeah this comes not from a documentation but from a blog post (from over 2 years) so maybe it was possible or considered at that time, but it’s not possible atm. However, it will be possible in Orion 🙂 For now, you can probably have two flows: flow A and flow B and do AB testing this way. Or build some conditional logic based on Parameter values? I’m sure there is a nice way to do it in Prefect without using versioning for it.
g
This was quoted from here: https://docs.prefect.io/core/about_prefect/why-not-airflow.html#versioned-workflows But yeah, I can think of several ways to implement it without versioning. Thanks again @Anna Geller ! 🙂
a
this is a 1:1 copy of this blog post 😂 https://www.prefect.io/blog/why-not-airflow/ Thanks for letting me know. We certainly need to remove this misleading sentence from the docs. LMK if you have any issues with that AB testing.
🙏 1
k
Hey @Gabi Pi, the issue is we don’t have guarantees that the previous will be around. For example, you can modify Module Storage/Git Storage/S3 Storage and the old one won’t be available because we just pull it during runtime rather than storing the code. Yes you are right versioning doesn’t do much in current Prefect.
g
@Kevin Kho thanks for the explanation. I totally understand it although I would prefer that my flow will fail on something like "version not found" rather than disable this feature at all. Flows versioning is such a promising feature that other orchestration systems don't have (as far as I know) so it's a pity it cannot be used.
k
We agree, which is why in Prefect 2.0, simultaneous versions of a flow will be allowed and you can choose which one to run.
🙏 1
🚀 1
g
Sounds good! Is there any resource where can I find all the new features and bug fixes that will be part of Prefect 2.0?
k
The roadmap is not public but maybe

this

will be helpful
g
I will check it, thank you @Kevin Kho!