- 12 Apr, 2017 8 commits
-
-
Sylvain Thénault authored
for parts which are not located in some source's check_config / check_urls method. --HG-- branch : 3.25
-
Sylvain Thénault authored
Similarly as for config. Now, ldap source validation is properly done there instead of at initialization time. --HG-- branch : 3.25
-
Sylvain Thénault authored
Reintroduce usage of 'source.check_config' which had almost disappeared, as well as tests for the currently detected errors. Part of the system source specific checking done in syncsources reimplemented in a specific check_config implementation. Tests are dispatched among ldap / datafeed and syncsources tests but are not strictly correctly located (notably syncsources tests behaviour of the native source's check_config). The system source url checking part which disappears from syncsources will be reintroduced in a follow-up. --HG-- branch : 3.25
-
Sylvain Thénault authored
which wasn't actually testing what it expected (and nothing guarantee it does now, but that's another story). Fixing this will avoid failure once we properly check the configuration. --HG-- branch : 3.25
-
Sylvain Thénault authored
* mark it private * explicit name * update docstring Private function is still called from syncsources but this will be updated in a follow-up. --HG-- branch : 3.25
-
Sylvain Thénault authored
this should be done later in the web ui, where lang is properly set. --HG-- branch : 3.25
-
Sylvain Thénault authored
Only call it when enabled instead of giving a boolean flag indicating whether it is or not (which were not correctly considered). --HG-- branch : 3.25
-
Denis Laxalde authored
It's not used anymore within cubicweb itself. --HG-- branch : 3.25
-
- 05 Apr, 2017 1 commit
-
-
Denis Laxalde authored
Most of the times we only need to retrieve one source (either by uri or eid) and querying sources_by_eid and sources_by_uri properties on repository just for one item is costly. So these methods query what's needed. We issue a ValueError (instead of KeyError for sources_by_{eid,uri} dict) in case the key is not found. --HG-- branch : 3.25
-
- 04 Apr, 2017 1 commit
-
-
Denis Laxalde authored
There's no need to convert it as a list anymore since sources_by_uri is a property and will not be modified. --HG-- branch : 3.25
-
- 05 Apr, 2017 2 commits
-
-
Denis Laxalde authored
This _entity_update method does not make sense now that we do not update source from database information but always build them afresh. --HG-- branch : 3.25
-
Denis Laxalde authored
It does not make sense anymore to update the config of a source instance (subclass of cubicweb.server.sources.AbstractSource) now that they are always built from database information (CWSource). In datafeed and ldapfeed, we move all code from "update_config" method in "init" method. This changeset fixes LDAPFeedUserDeletionTC.test_a_filter_inactivate() failure (unittest_ldapsource.py) introduces in previous changeset. --HG-- branch : 3.25
-
- 04 Apr, 2017 1 commit
-
-
Denis Laxalde authored
I.e. do not populate these dict as repo initialization (bootstrap step) but always use information from database. This is needed because when multiple instances of the same application run, if one instance adds a CWSource the other ones will not see it. In particular, when using a scheduler instance, new CWSource will be added by the web instance and not seen by the scheduler which is supposed to update them. We thus define properties for sources_by_eid and sources_by_uri instead attributes on repository instance. CWSource entities are thus retrieved from database every time these properties are accessed. We factor out initialization of the "source" instance (subclass of cubicweb.server.source.AbstractSource) in a _sources() method. Note that this method takes care of calling "init" method on the source as well as "set_schema" (previously done in repo.set_schema(), which now only touches system_source). Accordingly the "init_sources_from_database" method is dropped along with "add_source"/"remove_source" methods. In syncsources hook, we thus drop: * SourceAddedOp operation which called repo.add_source() so that the SourceAddedHook only cares about checking source configuration now; * SourceRemovedOp and SourceRenamedOp operations for the same reason; * SourceConfigUpdatedOp as updating the live config of source is meaningless once we rely on them being retrieved from the database; * SourceHostConfigUpdatedHook hook which is now useless without call to SourceConfigUpdatedOp; In 3.10 migration script, remove usage of sources_by_uri repo attribute which, unless I'm missing something, appears useless (at least now). In tests: * unittest_datafeed: remove test_update_url method since we dropped respective hook; * unittest_ldapsource: LDAPFeedUserDeletionTC.test_a_filter_inactivate() currently fails because it still relies on live config being updated, this will be fixed in the next changeset once all "live source" logic will be removed. --HG-- branch : 3.25
-
- 21 Feb, 2017 1 commit
-
-
Denis Laxalde authored
For the CubicWeb project and its dependencies, we now prefer patches submission and review by email on a public mailing list. We are thus moving away from the previous vcreview-based workflow taking place on the forge. This change is motivated by the following points: - the current reviewer assignment mechanism (pick a random reviewer, rely on reviewer availability rather than on willingness to review, send related patches to distinct people, etc.) is inefficient if not counter-productive; - most of the times, discussion only happens between the patch submitter and a reviewer with no easy way to increase the audience; - cubicweb-vcreview has no concept of patch series; - cubicweb-vcreview is not actively maintained anymore and its usability keeps deteriorating. We expect that email-based submission and review of patches will circumvent these limitations. Anybody interested in the project is welcome to subscribed to the mailing list and participate to the review process. This patch documents the basic workflow of patches submissions by email. --HG-- branch : 3.25
-
- 04 Apr, 2017 1 commit
-
-
David Douard authored
deleting the directory itself is useless and may be a problem in automated deployment environments (user may not have permissions to delete or create that directory). --HG-- branch : 3.25
-
- 03 Apr, 2017 1 commit
-
-
David Douard authored
--HG-- branch : 3.25
-
- 07 Apr, 2017 2 commits
-
-
Denis Laxalde authored
I don't know what this is for exactly, but the accept_mode method below queries this dict with the configuration type name. And if the latter is "pyramid", it crashes since there's no key in MCOMPAT dict. So add one with the same value as "all-in-one". This code is called during "upgrade" migration in particular. --HG-- branch : 3.25
-
Denis Laxalde authored
For install `cubicweb-ctl pyramid` command will explicitly call `repo.shutdown()` so the atexit hook is redundant. Prevent the latter to be executed when the repository is already shutting down (otherwise one gets an assertion error). --HG-- branch : 3.25
-
- 05 Apr, 2017 1 commit
-
-
Denis Laxalde authored
We will add more use of this pattern in forthcoming changesets, so avoid repetition. --HG-- branch : 3.25
-
- 04 Apr, 2017 1 commit
-
-
Denis Laxalde authored
--HG-- branch : 3.25
-
- 05 Apr, 2017 3 commits
-
-
Denis Laxalde authored
--HG-- branch : 3.25
-
Denis Laxalde authored
This script is the only caller of this method. In the code of the function, drop "skip_unknown" argument and continue accordingly upon OptionError. --HG-- branch : 3.25
-
Denis Laxalde authored
Because it does not use reference to "self" (which should be "cls" for classmethod). --HG-- branch : 3.25
-
- 04 Apr, 2017 2 commits
-
-
Denis Laxalde authored
--HG-- branch : 3.25
-
Denis Laxalde authored
We'll duplicate the code of this method in forthcoming changeset so clean it up a bit of old stuff. --HG-- branch : 3.25
-
- 30 Mar, 2017 7 commits
-
-
Denis Laxalde authored
--HG-- branch : 3.25
-
Sylvain Thénault authored
mentionning deprecation of _cw.data and removal of get/set_shared_data. --HG-- branch : 3.25
-
Sylvain Thénault authored
they are deprecated since 3.19 and access to the .data attribute itself deprecated in 3.25, so it's time to drop them. --HG-- branch : 3.25
-
Sylvain Thénault authored
which should not be necessary anymore since groups and properties are fetched for each request (cache lives in transaction_data). --HG-- branch : 3.25
-
Sylvain Thénault authored
this attribute has been deprecated during the session related rework, remove warning by explicitly storing data in .transaction_data since session data is not anymore reachable through Connection object. This will allows simplification of session synchronization hooks in a later cset. Also since we do not rely anymore on session data here, we may at some point rewrite those properties to rely on the ORM instead of such custom caching. --HG-- branch : 3.25
-
Sylvain Thénault authored
--HG-- branch : 3.25
-
Sylvain Thénault authored
--HG-- branch : 3.25
-
- 29 Mar, 2017 8 commits
-
-
Sylvain Thénault authored
--HG-- branch : 3.25
-
Denis Laxalde authored
It is now useless as its looping task would not run on a web instance because respective repository has no scheduler. --HG-- branch : 3.25
-
Denis Laxalde authored
--HG-- branch : 3.25
-
Denis Laxalde authored
This is to be used by client application to determine if looping tasks may be registered in the current process. By checking this, one will avoid the warning in looping_task method when the repository has no scheduler. --HG-- branch : 3.25
-
Denis Laxalde authored
We should provide a way for client code to detect if they should register the looping task or not. See next patch for that. --HG-- branch : 3.25
-
Denis Laxalde authored
In such cases the repository will not have a scheduler on purpose because the repository will not be kept running and will quickly shutdown after migration so that it's undesirable to have looping tasks being executed. --HG-- branch : 3.25
-
Sylvain Thénault authored
--HG-- branch : 3.25
-
Sylvain Thénault authored
consistently with newcube / create commands. This is an alternate implementation to backed out changeset fe995d56c949. Closes #17054738 --HG-- branch : 3.25
-