Ensure new logic evaluation is the only logic evaluation#6261
Conversation
37ee520 to
03a18e3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6261 +/- ##
=======================================
Coverage 97.12% 97.12%
=======================================
Files 870 870
Lines 33307 33263 -44
Branches 3076 3064 -12
=======================================
- Hits 32349 32308 -41
+ Misses 646 645 -1
+ Partials 312 310 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
03a18e3 to
b9edab2
Compare
b9edab2 to
cf163c0
Compare
cf163c0 to
f271b10
Compare
ca11010 to
b9b5e74
Compare
There was a problem hiding this comment.
Basically removing stuff related to the flag so not to much to say. Only a couple of questions (as I haven't dived into the new logic evaluation).
- Also saw some data migrations tests related to
trigger_from_step, I believe they can be removed in the next version - Regarding the UI tests I see some differences in the languages, can you take a look?
You mean the
Will do! |
Yes, I agree! |
b9b5e74 to
3020ec3
Compare
Discussed on Slack: seems like it compares to an outdated chromatic snapshot? I have triggered a rebuild, but that didn't solve it unfortunately. The messages as they are in the new snapshots are the correct ones, see https://github.com/open-formulieren/open-forms/blob/main/src/openforms/js/lang/nl.json#L3493 (they are not translated yet) |
3020ec3 to
d36af49
Compare
d36af49 to
598c4b9
Compare
16f103e to
835c6b5
Compare
835c6b5 to
849b82e
Compare
849b82e to
01b8b33
Compare
This will be the default in 4.0 :) Note that we want to execute `report_invalid_form_logic.py` as an upgrade check, which means it has to work in both 3.5 and 4.0, so we cannot remove the model field completely yet.
test_change_component_to_hidden_with_new_logic_evaluation: The new logic evaluation is now the only logic evaluation, so this test basically becomes a duplicate of `test_change_component_is_hidden` in this same class. test_modify_variable_related_to_another_step_than_the_one_being_edited: As the comment already indicated, this test does not make sense in this context. We would need to add a PUT call to the submission step detail endpoint to persist the user-defined variable. However, this would basically mean testing the fact that logic is executed before persisting the variables, which is already tested in `FormStepSubmissionTests.test_user_defined_variables_are_persisted`. Note that `test_evaluate_rules_when_trigger_step_reached` (will be renamed to `test_evaluate_rules_on_all_available_steps` in a next commit) already tests the behavior when a different step is being evaluated than the relevant step of the logic rule. Therefore, I have opted to remove it instead.
Kinda goes hand in hand with making the new logic evaluation the default one, as a trigger-from-step is not compatible with it. Note that we want to execute `report_invalid_form_logic.py` as an upgrade check, which means it has to work in both 3.5 and 4.0, so we cannot remove the model field completely yet. I have removed tests that tested trigger-from-step behavior, and modified them where applicable. Note on test_check_logic_on_whole_submission_with_variables: Tricky one, because it combined trigger-from-step behavior with `check_submission_logic`. We can force a certain step by using a component instead of a user-defined variable. Logic analysis will then assign it to the output step. I have made it pass for now, but I think this test also heavily depends on (the order of) the rules executed during `check_submission_logic` - see #6151.
This script must be run before upgrading to 3.5, and I think 3.5 will be a prerequisite before upgrading to 4.0, so it is no longer relevant
This includes displaying the advanced options as well, because it was the only one :)
01b8b33 to
0191892
Compare
We also want to include the invalid form logic script as an additional constraint. I have revised the script to block the upgrade if there are forms (with logic rules) that have not been converted to the new logic evaluation. Note that these will also include forms with cycles, as a conversion is illegal if cycles are present 4.0.0 has not been released officially, but we are tricking it to run the upgrade check already :)
0191892 to
22d2f45
Compare
Partly closes #6164
Changes
new_logic_evaluation_enabledfeature flagtrigger_from_stepsetting for logic rulesChecklist
Check off the items that are completed or not relevant.
Impact on features
Dockerfile/scripts
./binfolderCommit hygiene
Documentation