-
I'm looking into refactoring our durable functions. Would the following changes break the functionality of durable functions:
I see the orchestrator instance & history Input only contain the serialized properties of the class. So I assume changing the class' name or namespace won't break the functionality. But then I saw a sub-orchestrator instance record and the input contains $type property which refers to the namespace of the input class. So it seems that it will be a breaking change.. can you confirm? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Renaming the class of an input will be a breaking change if the serialized payload contains One trick I've seen used is creating custom Newtonsoft.Json deserialization logic that takes care of migrating types at runtime. This might be an option worth considering, if possible. |
Beta Was this translation helpful? Give feedback.
-
thanks chris. the classes that has $type in the Input field are not inheritances from abstract/ implementations of interface though. so i'm wondering why it's serialized with type. and indeed i tried to check the queue table but there's no message there. there's quite a lot that I want to refactor from our durable function - but i feel that DF is very limiting in supporting changes. initially i thought only orchestrator/ activity names & payload property names that cannot be changed. but so far it seems like i can't move the storage account, i can't change the payload class name, can't move it to another folder either. it's quite frustrating it feels like the only way to do this is to write a completely new function app but then there's the case of handling the existing runs. |
Beta Was this translation helpful? Give feedback.
thanks chris. the classes that has $type in the Input field are not inheritances from abstract/ implementations of interface though. so i'm wondering why it's serialized with type. and indeed i tried to check the queue table but there's no message there.
there's quite a lot that I want to refactor from our durable function - but i feel that DF is very limiting in supporting changes. initially i thought only orchestrator/ activity names & payload property names that cannot be changed. but so far it seems like i can't move the storage account, i can't change the payload class name, can't move it to another folder either. it's quite frustrating
it feels like the only way to do this is to wri…