- 19 Mar, 2024 4 commits
-
-
Klaus Wölfel authored
With some combinations of worklists using two additional security_uid columns coming from local role groups, some documents might be excluded from worklists, without the fix, when running with a random PYTHONHASHSEED, the test can fail with: FAIL: test_worklist_exclusionlist_collision (erp5.component.test.erp5_version.testERP5CatalogSecurityUidOptimization.TestSecurityUidOptimizationWorklist) ---------------------------------------------------------------------- Traceback (most recent call last): File "<portal_components/test.erp5.testERP5CatalogSecurityUidOptimization>", line 370, in test_worklist_exclusionlist_collision 'security_uid_or_alternate_security_uid_draft': 1, File "<portal_components/test.erp5.testERP5CatalogSecurityUidOptimization>", line 213, in assertWorklistCount expected_count_by_worklist_id, AssertionError: {'security_uid_or_alternate_security_uid_draft': 1} != {'collision_worklist': 1, 'security_uid_or_alternate_security_uid_draft': 1} - {'security_uid_or_alternate_security_uid_draft': 1} + {'collision_worklist': 1, 'security_uid_or_alternate_security_uid_draft': 1} ? +++++++++++++++++++++++++ What happens in sumCatalogResultByWorklist is something like this: (Pdb) pp criterion_dict {'alternate_security_uid': <ExclusionList [11, 14]>, 'other_security_uid': frozenset([13L]), 'portal_type': frozenset(['Person']), 'validation_state': frozenset(['draft'])} (Pdb) pp catalog_result.dictionaries() [{'alternate_security_uid': 12, 'count': Decimal('1'), 'other_security_uid': 13, 'portal_type': 'Person', 'validation_state': 'draft'}] Depending on the worklists grouped together in grouped_worklist_dict and the order this dict is iterated, we may reach a situation where criterion_id_list contains 'alternate_security_uid', because for another worklist it was not an ExclusionList but a list to be applied, in this case, this if condition is false: for criterion_id in criterion_id_list: criterion_value_set = criterion_dict[criterion_id] if result_line[criterion_id] not in criterion_value_set: is_candidate = False and the row is not counted in collision_worklist worklist. Co-authored-by: Jérome Perrin <jerome@nexedi.com>
-
Jérome Perrin authored
These are printed like a normal list, so it's a bit hard to figure out if they are supposed to be excluded when debugging
-
Jérome Perrin authored
This refactors security_uid_innodb_catalog test to have the config in a test business template and include a workflow with some worklists. This also depends on erp5_worklist_sql, to test worklists when a combination of erp5_security_uid_innodb_catalog and erp5_worklist_sql are enabled, which a common situation.
-
Jérome Perrin authored
Otherwise we get an error when just adding a worklist
-
- 11 Mar, 2024 5 commits
-
-
Georgios Dagkakis authored
-
Georgios Dagkakis authored
-
Georgios Dagkakis authored
-
Georgios Dagkakis authored
anyway, what happened is stored in the HTTP Exchange
-
Georgios Dagkakis authored
this BT is to hold code and configuration related to the Interface with DQE data quality services
-
- 08 Mar, 2024 3 commits
-
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Kazuhiko Shiozaki authored
-
- 07 Mar, 2024 2 commits
-
-
Rafael Monnerat authored
The administrator can enable it back clicking in a button, this can prevent massive email sending from unattended sites (development for example) related to test failures or average development
-
Kazuhiko Shiozaki authored
-
- 06 Mar, 2024 1 commit
-
-
Léo-Paul Géneau authored
See merge request !1897 * change property drone_dict into function getDroneDict * add timestamp to getCurrentPosition return value * add timestamp to drone_info
-
- 05 Mar, 2024 4 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
When we --load, the sql dump is supposed to be up to date, we don't need to update translation table every time. This is mainly to solve an issue that it might not be possible to run ERP5Site_updateTranslationTable at this point, with testUpgradeInstanceWithOldDataFs this script uses a print statement, which causes a SyntaxError.
-
Julien Muchembled authored
Unit test written by Rafael Monnerat. See commit 3d7d6d5e.
-
Léo-Paul Géneau authored
See merge request !1894 * set _game_duration as an unix epoch * provide timestamp to onStart function * add max_command_frequency, if direction commands (setTargetCoordinates and loiter) are send more often than max frenquency the drone crashes
-
- 04 Mar, 2024 2 commits
-
-
Rafael Monnerat authored
See merge request nexedi/erp5!1895
-
Jérome Perrin authored
91cc6c4e (ERP5Type/Utils: configure warnings in zopewsgi, 2024-02-16) was bad, on python2 zope did not start.
-
- 01 Mar, 2024 16 commits
-
-
Rafael Monnerat authored
Action on portal_types just invoke updateRoleMapping on all portal types that have at least one Role. This is useful whever you change way too many roles and you can to ensure that everything is updated.
-
Rafael Monnerat authored
See merge request nexedi/erp5!1893
-
Jérome Perrin authored
This uses `from __future__ import print_function` from "unrestricted" python code. For restricted python in python scripts, this expects SlapOS to have nexedi/slapos!1536 . Running ERP5 with this patch on an old SlapOS software release should probably be OK, especially because after all we don't have so much critical code using print. To ease migration of custom project code, PythonCodeUtils was modified so that when running CodingStyle python scripts are checked with print_function future enabled. See merge request nexedi/erp5!1883
-
Rafael Monnerat authored
Since the test() method was fixed the comment became irrelevant
-
Łukasz Nowak authored
Returning true allows to add movements to existing one, and this group shall always separate them.
-
Léo-Paul Géneau authored
See merge request !1891
-
Léo-Paul Géneau authored
Rename triggerParachute function into land in DroneManager for compliance with multicopters APIs.
-
Nicolas Wavrant authored
See merge request nexedi/erp5!1880
-
Nicolas Wavrant authored
I investigated a case where activities calling an external API were not retried after the initial failure, when it was caused by TimeoutReachedError: https://lab.nexedi.com/nexedi/erp5/-/blob/f41b33cd91348a800db3b95b30efd857f583bcde/bt5/erp5_web_service/MixinTemplateItem/portal_components/mixin.erp5.RESTAPIClientConnectorMixin.py#L142 The interesting thing is that these activities are written in a way that allow them to be retried (automatically, or manually) without causing un-intended side effects, like creating twice a document in the external API. So not having SQLBase retrying them automatically is a pity. The bug is that the use of TimeoutReachedError here was intended only for the activities that are aborted by CMFActivity itself, and not for the userland code that can also use TimeoutReachedError. This commit removes this special processing, as there is no need to especially not retry the activities that trigger the CMFActivity timeout. The max_retry decision should be taken by the calling code, and not by CMFActivity.
-
Jérome Perrin authored
This flags python2 style usage of print as a statement
-
Jérome Perrin authored
-
Kazuhiko Shiozaki authored
(not yet for scripts under portal_skins) adjusted (by Jérome) to just remove call to print in a few places where it made more sense.
-
Kazuhiko Shiozaki authored
-
Jérome Perrin authored
-
Rafael Monnerat authored
See merge request !1889
-
Rafael Monnerat authored
See merge request !1887
-
- 29 Feb, 2024 3 commits
-
-
Rafael Monnerat authored
-
Rafael Monnerat authored
Move Simulation to priority 3 helps to not block/delay immediateReindex on a scenario where everything is expanding. We use priority 3 to match what is used in SimulableMixin.updateSimulation and Delivery.localBuild
-
Romain Courteaud authored
-