Expression.V2.Compat (expression v2.41.4)
Compatibility module to make the transition from V1 to V2 a bit easier, hopefully.
It does a few things:
- It swaps out V2 callbacks for V1 callbacks when evaluating expressions with V1.
- It does some patching of the context to match V1's assumptions:
- case insensitive context keys
- casting of integers
- casting of datetimes
- It compares the output of V1 to V2, if those aren't equal it will log an error and return the V1 response.
- If there is no error it will return the value from V2.
NOTE: This module does twice the work because it runs V1 and V2 sequentially and then compares the result before returning a value.
NOTE: This was throwing more errors in prod than anticipated, hacking in a revert temporarily