-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate feel-scala 1.17.5 compatibility with camunda-bpm-platform #4100
Comments
Notable point of this change: Changes in feel-scala: - 1.6.2 legacy behaviour: when disabling the var-args evaluation and a given function with arguments that do not exist throws an Exception - 1.7.5 new behaviour: The above returns successfully and the answer contains suppressed failures. - FeelEngine#evalExpression are deprecated and changed to the new FeelEngineApi#evaluateExpression. They also contain breaking changes in behaviour. Change Reason: - Adapt the behaviour of ScalaFeelEngine appropriately so that the legacy behaviour of `ScalaFeelEngine` is retained. Breaking change: - FeelExceptions with "no function found" messages now start with a capital letter. - This is accepted as a small change to make the proxy code as simple as possible Related-to: #4100
Update
There are further test failures that need to be investigated. Postponing the progress of this item to move forward with other |
Investigation of Other Failures
|
Description: - In feel-scala:1.6.2, the evaluation of an internal context function would throw a FeelMissingFunctionException - In feel-scala:1.7.4, the evaluation will return null instead since dateTime is a context function and should not be resolved. This call will return null. - The change adapts the test for feel-scala to make this consideration Related-to: #4100
Description: - In feel-scala:1.6.2, the evaluation of an internal context function would throw a FeelMissingFunctionException - In feel-scala:1.7.4, the evaluation will return null instead since dateTime is a context function and should not be resolved. This call will return null. - The change adapts the test for feel-scala to make this consideration Related-to: #4100
- Add documentation to the migration guide for the upgrade of feel-engine to 1.7.x version - List identified breaking changes and full release notes change log Related-to: camunda/camunda-bpm-platform#4100
Next Step👀 The CI passed with the adapted tests. Assigning the ticket to @tasso94 for review. |
UpdateIncorporated the Code review points and changed the description to reflect accurately the new behaviour of the After the final approval on the documentation, the PRs can be merged. |
Why: Breaking changes of feel-scala 1.7.5 Context: Feel-Scala Breaking Changes Fixed in this commit - After feel-scala:1.7.0, Not found functions return null instead of throwing a `FeelMissingFunctionException` (e.g `date` internal context function) - Comparing different types is handled gracefully instead of throwing an exception by returning `false` or `null` - Adjustments in the exception message Links: #4100 (comment) Related-to: #4100
Context: Add description in the migration guide of the the support and breaking changes of FEEL engine 1.7.0 Co-authored-by: tasso94 Co-authored-by: petros.savvidis Related-to: camunda/camunda-bpm-platform#4100
UpdatePRs have been merged to |
UpdateThe version in the docs was not correct (1.7 instead of 1.17). Opened a PR to correct it; kudos to @yanavasileva for noticing that 👍 |
Environment (Required on creation)
Camunda 7.21
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)
The test
CustomFunctionTest#shouldThrowExceptionDueToDisabledVarargs
fails when the repository tries to be upgraded to usefeel-scala:1.17.5
.Steps to reproduce (Required on creation)
master
on camunda 7.21.pom.xml
ofcamunda-root
and Upgrade theversion.feel-scala
from1.6.2
to1.17.5
CustomFunctionTest#shouldThrowExceptionDueToDisabledVarargs
Observed Behavior (Required on creation)
The test
CustomFunctionTest#shouldThrowExceptionDueToDisabledVarargs
passes withfeel-scala:1.6.2
and fails when the artifact is upgraded to1.17.5
Expected behavior (Required on creation)
feel-scala:1.17.5
should be fixed and the tests should pass.Root Cause (Required on prioritization)
feel-scala:1.7.x
returnsnull
.Function registry
The feel engine has a
FunctionProvider
that will register a function its to internal registry.During evaluation, that registry will be used to check if the function found in the expression the user passed exists.
Enable Varargs Evaluation
The
enableVarargs
directive or its absence indicate to the engine what parameters to expect during evaluation of the function namee.g if a function is allowed to be called with variable arguments or not and calls like function(a), function(a,b...) are permitted (or not).
The Test Case
The test implicitly disables varargs,
myFunction
can only accept a list.The arguments passed are variable arguments
As a result, the registered function is different from the one passed with varargs. From feel-engine's perspective, the function does not exist.
The test expects a
FeelException
to be thrown. The evaluation though returnsnull
feel-scala 1.7.0
; The invocation of a non-existing function will returnnull
.Solution Ideas
Adapt the test to expect
null
instead when upgrading tofeel-scala:1.7.15
Hints
Links
Breakdown
camunda-bpm-platform PR
camunda-docs-manual PR
Dev2QA handover
The text was updated successfully, but these errors were encountered: