- 30 Mar, 2018 1 commit
-
-
Jérome Perrin authored
This should address two issues: 1. Allow using a custom python interpreter where all eggs dependencies would already be installed. 2. The test names did not have stable name, because they were the full path of the folder, which varies from one test node to another. This depends on changes in the profile done in nexedi/slapos!309 . This changes the internals of `EggTestSuite` so other tests reusing it ( I think we only have [`deploy-test`](https://lab.nexedi.com/nexedi/slapos/blob/41191a29cd16af13b2667d1979f35628c6065fde/software/erp5testnode/testsuite/deploy-test/runTestSuite.py#L151-154) ) will have to be updated once a new `erp5.util` is released. @luke I guess this won't be a problem and this would allow to fix that second issue for deploy test as well, so I did not consider being backward compatible here. /cc @rafael @alain.takoudjou /reviewed-on nexedi/erp5!619
-
- 29 Mar, 2018 5 commits
-
-
Tristan Cavelier authored
Move Base_checkCloneDocumentPermission beside Base_createCloneDocument
-
Nicolas Wavrant authored
As blobs aren't serializable
-
Nicolas Wavrant authored
-
Nicolas Wavrant authored
-
Tristan Cavelier authored
-
- 27 Mar, 2018 21 commits
-
-
Tristan Cavelier authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
Drop usage of cellpadding, cellspacing, border.
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
2nd try
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Tomáš Peterka authored
-
Vincent Pelletier authored
Calling these can break catalog by not caring about concurrent indexation activities. Even non-restricted code should not call these, but: - they cannot be reliably renamed, as there exist activity dependencies looking for these exact names (which is a bad practice on its own) - there is no simple access control mechanism for non-restricted code So rely on developer discipline instead.
-
Vincent Pelletier authored
These methods must not be called synchronously: - they can break catalog by not being careful enough about other reindexations which may happen in parallel. See the serialization_tag mechanism for more. - indexation gets executed in the security context of the user causing the call, which may lead to an indexation result different from what happens when indexation happens with an all-accesses user. Also, simplify a few scripts while doing so.
-
Vincent Pelletier authored
The rationale behind this change is to cover the case of sub-documents modified as part of acquired setters (ex: subordination on Person which actually sets it on a Career subdocument, or address on Person, etc). As these value can be passed to newContent (and passed on to constructInstance) along with immediate reindexation request, caller may expect these to be also indexed.
-
Vincent Pelletier authored
"immediate", in this context, means "during the same transaction". Normally, indexation always happens in a transaction different from the one which did the indexation-inducing action (modifying a property, creating a document, explicitely requesting indexation). This is because SQL and object databases do not have the same approach to conflict resolution: in SQL, the last one wins, and ordering happens based on locks. In ZODB, conflict resolution is stricter in that to modify an object a transaction must have started with the same revision of that object as the one which is current at the time it is trying to commit. As both databases must be kept consistent, one interpretation must be enforced onto the other: the ZODB interpretation. So delayed indexation, plus careful activity sequencing (serialization_tag) is required. But in very specific cases, it is actually safe to index a document immediately: when creating that document. This is because the only conflict which may then happen is if two transaction produce the same path, and ZODB will prevent the transaction from committing altogether, preventing any conflict resolution from happening. Pasting a document falls into this category as well, for the same reason. In turn, this feature removes the need to call "immediate" reindexation methods, allowing to restrict their availability later and preventing API misuse and catalog consistency compromission. Two variants of "immediate" indexation are available: - internal to the method which creates considered document - delayed to a caller-controller, but mandatory, point later in current transaction, by using a context (in python sense) manager object.
-
Vincent Pelletier authored
Consistently with other methods which may trigger reindexations.
-
Vincent Pelletier authored
Consistently with newContent/constructInstance, caller may request one of three choices: - do not override class choice - override class choice, making instance non-indexable - override class choice, making instance indexable So is_indexable now defaults to None instead of True.
-
Vincent Pelletier authored
Directly bind superclass callable instead when applicable. Trivial python simplifications. Assorted coding style improvements. Drop unhelpful comments and docstrings.
-
- 26 Mar, 2018 11 commits
-
-
Romain Courteaud authored
erp5_l10n_fa is needed to test the RTL direction.
-
Romain Courteaud authored
-
Romain Courteaud authored
This is activated only for erp5_l10n_fa by adding the language direction on the body element. Thanks to Ali Hallaji for the original work.
-
Vincent Pelletier authored
Otherwise, aq_chain looks like (note the Temporary Discussion Thread): [ <Discussion Post at /erp5/discussion_thread_module/1/2>, <Discussion Thread at /erp5/discussion_thread_module/1>, <Discussion Thread Module at /erp5/discussion_thread_module used for /erp5/web_site_module/km_test_web_site/forum/Thread-1-GAJgJcpBPJ>, <Temporary Discussion Thread at /erp5/web_site_module/km_test_web_site/forum/Thread-1-GAJgJcpBPJ>, <Web Section at /erp5/web_site_module/km_test_web_site/forum>, <Web Site at /erp5/web_site_module/km_test_web_site>, <Web Site Module at /erp5/web_site_module>, <ERP5Site at /erp5>, <Application at >, <ZPublisher.BaseRequest.RequestContainer object at 0x7f478aa18450> ] which can confuse a "parent" walk. Also, reuse existing code, related to asContext which is just what is needed here.
-
Arnaud Fontaine authored
erp5_real_time_inventory_accounting: Move Root Delivery Simulation Rule to test bt5 as it is only used in Unit Tests.
-
Arnaud Fontaine authored
erp5_real_time_inventory_accounting: Matching on source_section is not enough (Automatic Delivery Accept Solver).
-
Tristan Cavelier authored
The getModuleItemList function should not cache absolute_url_path as it may vary according to where the script is called from. Here we generate the cache key to also vary according to the same condition as the module absolute_url_path results. _portal_url_ _________called_from_url_________ -> __portal_url_VirtualRootPhysicalPath___ ________module.absolute_url_path_______ _result_ /erp5 /erp5/... /erp5 /erp5/my_module OK /erp5 /erp5/web_site_module/my_site/... /erp5 /erp5/web_site_module/my_site/my_module BAD /erp5/ /erp5/web_site_module/my_site/... /erp5/web_site_module/my_site /erp5/web_site_module/my_site/my_module OK
-
Boxiang Sun authored
Sequential number generators stored in a fixed-size format eventually run out of values. But activity queues only care about what activities are currently present: any uid can be reused as soon as it is available. So stop using a sequential id generator for activity uids, and instead use random values. Vincent Pelletier: - Commit message. - Minor formatting changes. - Do probability computations, and increase activity uid storage size to 64bits integers, up from 32. Table schema migration happens on first activity node which starts on upgraded code. - Apply to SQLJobLib too.
-
Vincent Pelletier authored
Duplicate message detection is not good enough: different messages with the same unicity value may bear different serialization_tags. This code does not takes this into account, which can lead to deleting such tagged message and validate an untagged one, which breaks serialization_tag contract of preventing any further activity validation until execution of all such-tagged validated activities is successful. Also, it is not validation's node job to deduplicate: it can happen during message execution without slowing down this crucial (performance-wise) activity node. As a result, distribute methods of SQLDict and SQLQueue can be factorised.
-
Vincent Pelletier authored
-
Vincent Pelletier authored
-
- 23 Mar, 2018 1 commit
-
-
Sebastien Robin authored
-
- 22 Mar, 2018 1 commit
-
-
Arnaud Fontaine authored
0. Download codemirror tarball ('lib/codemirror.js' is not available in git repository anymore): wget http://codemirror.net/codemirror.zip && unzip codemirror.zip 1. Prepare files to upload: cd UNZIPPED_CODEMIRROR_DIRECTORY/ rm -r bin/ doc/ index.html demo/ src/ test/ rollup.config.js package.json mode/*/index.html mode/index.html .[a-z]* # 54087b03 mv addon/edit/ addon/cm_edit/ && find -type f | xargs sed -i 's#addon/edit/#addon/cm_edit/#g' # https://github.com/codemirror/CodeMirror/issues/5321 sed -i '/"Ctrl-V"/d' keymap/emacs.js 2. Edit zope.conf to enable FTP access: <ftp-server> address localhost:2202 </ftp-server> 3. Upload files to Zope: yafc ftp://zope:zope@localhost:2202/erp5/portal_skins/erp5_code_mirror/codemirror/ yafc> rm -r * yafc> put -r * 4. Run portal_alarms/Alarm_checkSkinCacheActive?fixit:int=1
-