- 13 Sep, 2018 2 commits
-
-
Sebastien Robin authored
-
Sebastien Robin authored
-
- 12 Sep, 2018 7 commits
-
-
Vincent Pelletier authored
Also, why make only 2 queries when I can make 2n+1 queries for the same result ?
-
Vincent Pelletier authored
getObject is generally a shortcut for "return self", and on brains for traversing to corresponding document. Except... Not everywhere. portal_catalog for example defines a completely unrelated method which takes a UID as argument and does a query retrieving one document. Which is basically totally redundant with its __call__ method. Still, of course, it is used in several places. Also, ERP5Form.Report defines yet another getObject method, taking an acquisition context as argument and traversing to some other path. So do not use getObject (at least until the code recovers some sanity and consistency), but getPath + custom activity API. Oh well.
-
Vincent Pelletier authored
Just like regular indexations, fulltext indexations are subject to last-commit-wins. Which means that it is possible to reach a state where the fulltext table is persistently desynchronised from ZODB: - start fulltext indexation activity on many documents (typically: 100) - modify one of the documents being indexed - start fulltext indexation activity caused by this edit, and assume indexation only happens for this object - commit the single-object indexation (because it is very fast to retrieve fulltext data from just one document) - commit the many-objects indexation later (because it is much slower to retrieve 100 fulltext representations) As a consequence, cod emust spawn one fulltext indexation activity per document, each with the appropriate serialisation tag. Serialisation tag which must not conflict with regular indexation, so use a fixed prefix. As a consequence of having to spawn one activity per document, use a grouping method to still index by batches to amortise transaction overhead. Keep the same method_id as before for backward-compatibility (maybe dependencies on this value exist, even though it is bad practice). Rewrite SQLCatalog_deferFullTextIndexActivity so ot works as a grouping method, simplifying it in the process: - build parameter_dict with all entries, as we already know all needed keys - None is not callable, so test "not None" in just one expression - remove whitespace at end of line - use GroupedMessage API
-
Jérome Perrin authored
''.split(',') is [''] which evaluates to false ... e80b37ff was still incorrect
-
Jérome Perrin authored
This was not really backward compatible with old slapos versions not passing zserver_address_list
-
Jérome Perrin authored
To answer question in the comment: > How to inspect inside another iframe? use selectFrame (after waiting for the frame to be added in the DOM of course). Reference of selenium commands: https://web.archive.org/web/20160807232621/http://release.seleniumhq.org/selenium-core/1.0.1/reference.html#selectFrame (I'm not sure it's still on the web)
-
Jérome Perrin authored
Tests asserts that size have all languages available, so let's be compatible and just set the default language to the current selected one at site creation.
-
- 11 Sep, 2018 6 commits
-
-
Nicolas Wavrant authored
-
Jérome Perrin authored
-
Jérome Perrin authored
This was not really backward compatible when running with old slapos, because default value was not string in this case.
-
Nicolas Wavrant authored
This step was in reality only removing the "Access Content Information" permission for Anonymous on web_site_module, which was not coherent with erp5_web, and had for consequence to make developers change it by hand when wanting to use web_site_module
-
Jérome Perrin authored
Extend test runners to use partition IP and run functional tests behind an https frontend. See nexedi/slapos!374 for the slapos part and more detailed explanations. /reviewed-on nexedi/erp5!729
-
Jérome Perrin authored
/reviewed-on nexedi/erp5!742
-
- 07 Sep, 2018 6 commits
-
-
Romain Courteaud authored
-
Sven Franck authored
/reviewed-on nexedi/erp5!737
-
Sebastien Robin authored
-
Jérome Perrin authored
I made a mistake rebasing & applying the patch to master, so the test added in nexedi/erp5!726 (comment 65067) did not reach master. This reapplies this part. Thanks Seb for noticing !
-
Jérome Perrin authored
On the traditional editor (from portal_component), selected text was not highlighted
-
Jérome Perrin authored
This is something the webmaster will define. Also, initialize available languages like this will select a random default language, which the webmaster might not understand.
-
- 05 Sep, 2018 4 commits
-
-
Nicolas Wavrant authored
-
Nicolas Wavrant authored
-
Nicolas Wavrant authored
-
Georgios Dagkakis authored
So that a declaration like: context.getUrlFor({command: 'display_action', options: {jio_key: "document", page: "action_reference"}}) can return the URL to redirect to the given action or the document
-
- 04 Sep, 2018 7 commits
-
-
Richard authored
/reviewed-on nexedi/erp5!735
-
Jérome Perrin authored
-
Jérome Perrin authored
As it is backward compatible, this option can be passed as environment variable. Also re-order all argument output to make it clear which comes from SlapOS generated wrapper and which are passed by test node.
-
Jérome Perrin authored
We now access zserver behind the backend apache on https:// and this apache's certificate is not trusted
-
Jérome Perrin authored
-
Jérome Perrin authored
Otherwise running in debug mode on headless machines just display cryptic error message.
-
Jérome Perrin authored
-
- 03 Sep, 2018 2 commits
-
-
Vincent Pelletier authored
-
Vincent Pelletier authored
-
- 01 Sep, 2018 5 commits
-
-
Vincent Pelletier authored
Auto-generate cache_id, removing the risk of duplicating one. Inline getInstanceID as it is its only caller left. Avoid wrapping if getTransactionalVariable cannot be imported. Avoid intermediate variables, at the cost of dupicating logic but accelerating run-time. Use functools.wraps . Access _cache_sequence_number directly - these pieces of code are friends anyway, we already set a volatile property on Catalog instance. Saves one getattr and one call.
-
Vincent Pelletier authored
No backslash at EOL. Avoid splitting messages, to ease code lookup. LOG's "error" argument accepts a boolean, which removes the need to touch sys.exc_info. Use modern exception raising syntax.
-
Vincent Pelletier authored
-
Vincent Pelletier authored
-
Vincent Pelletier authored
_getSelectDict was also calling itself on sub-sql_expressions, but this was useless: they would already have called it, and discarded one of its returned values. Instead, preserve both returned values in __init__ and access these attributes directly when iterating over sub-sql_expressions. Also, fold canMergeSelectDict back into its only 2 call places, saving one getattr and one call. Also, get rid of a few properties which were only used in _getSelectDict. Also, get rid of two iterable copies: sql_expression_list when it is already a list (no need to cast it again to a list, we just built one with the list comprehension), and select_dict being cast into a list when entering _getSelectDict, despite not being used (besides in extra _getSelectDict calls, which are now entirely avoided).
-
- 31 Aug, 2018 1 commit
-
-
Sebastien Robin authored
-