Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 10:25:04 +0100] rev 12071
[test] Add user-site to PYTHONPATH before installation of new cube in test_newcube_install
Otherwise, setuptools complains that the target installation directory (i.e.
"user site" is not in PYTHONPATH). This is probably because we use a fake HOME
with --user install option. Failure shows up when running tests through tox
without system site packages (see next patch).
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 17 Mar 2017 17:32:04 +0100] rev 12070
[pkg] Depends on yams >= 0.45.0
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 17 Mar 2017 17:31:10 +0100] rev 12069
[pkg] Depends on logilab-common >= 1.4.0
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 10:28:01 +0100] rev 12068
Merge with 3.24 branch
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 09:40:24 +0100] rev 12067
Added tag 3.24.6, debian/3.24.6-1, centos/3.24.6-1 for changeset 4029fb83a67d
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 08:58:25 +0100] rev 12066
[pkg] Version 3.24.6
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 20 Mar 2017 08:57:17 +0100] rev 12065
Merge public heads
Philippe Pepiot <philippe.pepiot@logilab.fr> [Wed, 15 Mar 2017 12:01:14 +0100] rev 12064
[web/views] deleteconf: ignore workflow when displaying composite entities
This hide TrInfo composite entities when deleting an workflowable entity.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 03 Mar 2017 14:06:27 +0100] rev 12063
[rset] Use RQL cache in syntax_tree method
This avoid several unnecessary parsings per HTTP request, since in most case
rset's rql is in the rql cache (since it has just been executed), while yapps
based parsing is known to be slow.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 17 Mar 2017 07:32:48 +0100] rev 12062
[repo] Introduce a clear_caches method on the Querier class
that is called from repository's clear_caches.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 15 Mar 2017 08:30:27 +0100] rev 12061
[repo] Consistent API for cache clearing
clear_caches, reset_caches, clear_eid_caches are now all named 'clear_caches'
with optional eids/etypes arguments to clear eid specific cache entry,
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 03 Mar 2017 13:09:11 +0100] rev 12060
[repo] Extract rql cache handling to a dedicated class
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 16 Mar 2017 17:25:07 +0100] rev 12059
[sobjects] Fix a trivial flake8 error
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 15 Mar 2017 08:27:45 +0100] rev 12058
[repo] Drop cache clearing methods from the source interface
Those are actually system source specific.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 15 Mar 2017 08:04:58 +0100] rev 12057
[repo] Move and rename repo._clear_planning_cache
to make it clearer it's clearing the @cache of source_defs method.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 10:10:44 +0100] rev 12056
[sobjects] Fix flake8 errors in services.py
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 15 Mar 2017 08:39:51 +0100] rev 12055
[test] Rename BaseQuerierTC._access to BaseQuerierTC.admin_access
so it's consistent with CubicWebTC and avoid access to a protected attribute
which has been exposed by the removal of the 'session' property a few csets
earlier.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 15 Mar 2017 09:15:32 +0100] rev 12054
[repo] Fix flake8 error
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 09 Mar 2017 16:36:33 +0100] rev 12053
[pyramid] Add a "pyramid" instance configuration type
In a new module 'cubicweb.pyramid.config' we define a "pyramid" instance
configuration type. The noticeable feature of this configuration is that it
manages a 'development.ini' file that gets installed in application home
(along with `.conf` file). This file is templated and includes generated
values for secrets of session and authtk tokens.
This means that we can just call:
pserve etc/cubicweb.d/<appname>/development.ini
or
gunicorn --paste etc/cubicweb.d/<appname>/development.ini -b :8080
just after instance creation to get a pyramid instance running without having
to hack around a 'pyramid.ini' file.
This patch drops 'development.ini' from skeleton and moves it in
cubicweb/pyramid so that it gets installed at instance creation which is more
appropriate than in cube creation.
The new configuration class sets "cubicweb.bwcompat" setting to false so it is
not intended to replace the "all-in-one" configuration type (which would
require a bit more work). This configuration is close to the the 'repository'
configuration type with just a couple of options from WebConfiguration that
are needed for Pyramid (anonymous user/password plus some miscellaneous
options that I'm not so sure are really needed). Note, in particular, that we
do not pull CORS settings to be injected as a WSGI middleware like in
wsgi_application_from_cwconfig() since I believe this should be left as an
end-user responsibility and since this can be defined in a standard way in
paste configuration. This configuration inherits from ServerConfiguration but
registers the same appobjects as WebConfiguration.
In cubicweb.web.request._CubicWebRequestBase, we guard against access to
"uiprops" and "datadir_url" of the config because this new "pyramid" config
does not have these (this does not make sense without bwcompat mode). At some
point, we should either avoid using `cw_request`'s pyramid request attribute
or make cubicweb's web request really independant of existing implementation
and drop these assumptions.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 10 Mar 2017 12:02:41 +0100] rev 12052
[pyramid] Call repository's shutdown method atexit
This way when run through a WSGI server (pserve, gunicorn, etc.) we make sure
that the repository is properly shut down. In particular, this would wait for
threads to terminate (otherwise, they'll be killed).
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 03 Mar 2017 11:13:03 +0100] rev 12051
[querier] Turn repo.querier_cache_key into a private function
of the querier module, only place where it's used.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 14 Mar 2017 10:34:03 +0100] rev 12050
[cleanup] Fix flake8 errors in web/application.py and associated test
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 14 Mar 2017 10:33:24 +0100] rev 12049
[test] Simplify CWTC's init_authentication and assertAuthSuccess
which shouldn't rely on removed .session attribute while it's not necessary and
could be written in a simpler way.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:26:05 +0100] rev 12048
[cleanup] Drop non sense sentence in docstring
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:23:29 +0100] rev 12047
[repo] Drop Session at last
This is not used at all anymore.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:21:22 +0100] rev 12046
Fix flake8 some errors
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:18:51 +0100] rev 12045
[test] Use existing reference to repo_source
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:04:25 +0100] rev 12044
[repo] Drop repo.new_session method
we should not go through Session to create Connection anymore.
This is unofficial API, no backward compat for now.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 14 Mar 2017 11:07:58 +0100] rev 12043
Stop using Session on the repository side
Only expect session on web request, and let the web session/authentication
managers provide them.
Access to cnx.data, which used to return session data, is deprecated: there is
no more access to session data from the repository side, and they should be
access from req.session.data from the web side.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:00:13 +0100] rev 12042
[test] Drop unnecessary call to new_session
This is not unittest, the above call is enough.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:58:25 +0100] rev 12041
[user] Drop ugly hack on CWUser entity class
which should be not necessary anymore, beside two remaining usage in our own
test suite.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:57:13 +0100] rev 12040
[test] Use user_session_cache_key function
to generate cache key.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:52:44 +0100] rev 12039
[session+test] Stop storing / accessing session when it's not necessary
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:46:06 +0100] rev 12038
[devtools] Stop relying on Session to create connection in RepoAccess
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:44:03 +0100] rev 12037
[devtools] Stop using repo.new_session
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:25:35 +0100] rev 12036
[session] Kill support for a 'session_open' hook event
To be consistent with dropping of the 'session_close' event, and also because
this is already not called when using pyramid.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 17:03:28 +0100] rev 12035
[devtools] Rename FakeSession into FakeConnection
because it is what it is.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 16:55:57 +0100] rev 12034
[cleanup] Drop references to the old internal_session method
dropped a while ago, no need to talk about it in a docstring nor to fake it.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 16:31:08 +0100] rev 12033
[session] Drop unused class
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 16:14:05 +0100] rev 12032
[cleanup] Drop no more used parse_repo_uri function
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 14:07:15 +0100] rev 12031
[server] Fix flake8 error of test/data/hooks.py
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 14:02:31 +0100] rev 12030
[repo] Drop repo.connect backward compat
use new_session instead (introduced in 3.19 iirc)
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 14:01:45 +0100] rev 12029
[session] Drop no more necessary Session.sessionid and Connection.connectionid
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 14:04:26 +0100] rev 12028
[repo] Kill repo._sessions
and with it the need to have a looping task to clean it up, and with that all
the session's timestamping machinery.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 18:24:40 +0100] rev 12027
[repo] Stop closing session
The only point in "closing" session is to call the `session_close` event. Since
I'm not aware of any application relying on it, I think this is too costly (in
term of code) to maintain and propose to drop it.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 12:07:29 +0100] rev 12026
[views] Stop giving stats / debug information relying on _sessions
This is already broken when using pyramid anyway.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 16:41:10 +0100] rev 12025
[session] Stop relying on _sessions to synchronize living session
by doing what we currently do in pyramid. Also, attempt to synchronize CWUser's
class sounds like a dark corner case handling that should be removed in favor of
short lived user objects (beside it shouldn't occur except during migration).
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 12:01:31 +0100] rev 12024
[test] Drop useless access to repo._sessions
test still succeed afterwards.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 11:27:01 +0100] rev 12023
[repo] Fix flake8 errors in server/__init__.py
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 11:25:24 +0100] rev 12022
[repo] Drop no more used ShuttingDown exception
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 10 Mar 2017 11:55:16 +0100] rev 12021
[repo] Drop _get_session method
it's not actually necessary but holds underlying _sessions dict handling.
Drop backward compat relying on it (which IMO should not be a problem).
Drop import of unused QueryError along the way.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 09 Mar 2017 18:02:16 +0100] rev 12020
[test] Drop call to CubicWebConfiguration.load_cwctl_plugins in unittest_cwctl.py
This is no longer need now that we call load_available_configurations() in the
"list" command (see 5e7282bdf140).
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 09 Mar 2017 16:35:58 +0100] rev 12019
[web] Extract a base class out WebConfiguration
This will be used to build a CubicWebPyramidConfiguration in following
changeset.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 09 Mar 2017 16:41:18 +0100] rev 12018
[tox] Drop reference to removed init_instance.py file in flake8-ok-files.txt
The file got removed in 1b9fd8bda1cd.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 10 Mar 2017 09:39:18 +0100] rev 12017
[web] Put 'use-uicache' option in level 2
So that users do not get prompted with this. Follow-up on c34590161082.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 21 Feb 2017 08:56:38 +0100] rev 12016
[server] Add a "scheduler" command to run repository scheduler
This commands starts the repository scheduler as a standalone process that
should complement a CubicWeb web instance running as a WSGI application.
Added a log message in repository's shutdown method to help testing the
command (i.e. make sure the method is called after the scheduler stopped).
Related to #17057223.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 15:13:44 +0100] rev 12015
[cwconfig] Do not instantiate a repo with a scheduler in repository method
None of the caller of this method need the repository to have a scheduler and
having a scheduler should be something that's explicitly requested.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 14:50:00 +0100] rev 12014
[server] Make cubicweb/server/utils.py flake8-clean
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 14:38:52 +0100] rev 12013
[server] Drop utils's LoopTask and TasksManager classes not used anymore
Related to 17057223.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 13:23:33 +0100] rev 12012
[server] replace repository's tasks manager by a scheduler
Repository() does not accept anymore a 'tasks_manager' argument but rather a
'scheduler' argument which is expected to be an instance of sched.scheduler
class. The drop the _tasks_manager attribute of the repository and adjust all
internal usages of it. In particular, in the 'repo_stats' service we do not
export 'looping_tasks' statistics anymore as there's no way to retrieve this
anymore from a web instance.
Closes #17057223.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 13:21:50 +0100] rev 12011
[server] introduce a scheduler class to run repository "looping tasks"
We just use the sched module from the standard library and introduce a tiny
Python2/3 compatibility layer (more for convenience actually). The "looping"
aspect of tasks (previously in LoopTask class) is re-implemeted as a
`schedule_periodic_task` function. This is a reasonably thin layer as compared
to LoopTask/TasksManager classes. Only the "restart" aspect of LoopTask is no
longer present as I'm not sure it's worth keeping.
The advantage of using this (in addition to eventually dropping our custom
code) is that this scheduler class provides a `run` method that blocks the
process while running tasks in its queue. So we can rely on this to have a
'scheduler' ctl command (see forthcoming patch) that would only run "looping
tasks" without having to implement the "blocking" aspect ourself.
Related to #17057223.
Samuel Trégouët <samuel.tregouet@logilab.fr> [Thu, 16 Feb 2017 11:15:23 +0100] rev 12010
web: add options to ignore css compilation and uicache
Samuel Trégouët <samuel.tregouet@logilab.fr> [Thu, 16 Feb 2017 10:56:45 +0100] rev 12009
[skeleton] call includeme from new cube
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 14:19:20 +0100] rev 12008
[etwist] Do not call repository's start_looping_tasks anymore and warn about this
We are about to drop this method from Repository class and replace it by a
blocking alternative. This is not compatible with how things currently work in
a Twisted server implementation. So do not start repository "looping tasks" in
Twisted server anymore and issue a warning about this.
If someone is interested in restoring the "all-in-one" behavior where the
repository runs within a Twisted server, they may start by implementing
repository looping tasks using a Twisted mechanism such as, e.g.,
http://twistedmatrix.com/documents/current/core/howto/time.html and eventually
provide the repository with a compatible scheduler instance so that is can
register its periodic tasks. At the moment, we lack resources to do this (and
maintain the Twisted server of CubicWeb in general).
Related to #17057223.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 09 Mar 2017 09:16:00 +0100] rev 12007
[test] Flake8-clean and use stdlib unittest in cubicweb/server/test/unittest_utils.py
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 07 Mar 2017 12:08:39 +0100] rev 12006
[web] Don't raise ProcessFormError if there is no value specified
a03376213747 introduced a slight modification in None / empty string values and
with it a regression where an exception is raised on empty values, while we
should simply consider no value is specified and return None.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 07 Mar 2017 11:59:07 +0100] rev 12005
[test] Cleanup imports in unittest_form
Remove unused and reorder, + use bare unittest along the way.
Florent Cayré <florent.cayre@logilab.fr> [Tue, 07 Mar 2017 14:27:09 +0100] rev 12004
Fix log level parameter not taken into account in cwsource log table
An error in the jquery selector of the html widget controlling the log
level was the cause of this bug.
Closes #15772634
(grafted from c9129aae884b476455c8ed1ad802efc3a26503a5)
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 13:49:51 +0100] rev 12003
[pyramid] Drop call to repository's start_looping_tasks method and warn about this
We are about to drop the start_looping_tasks method and running "looping
tasks" along the WSGI application is not a very good idea. So issue a warning
pointing to the forthcoming "scheduler" command.
Related to #17057223.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 15:22:16 +0100] rev 12002
[test] Make unittest_serverctl.py flake8-clean
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 13:15:51 +0100] rev 12001
[wsgi] Drop calls to repo.start_looping_tasks
It's unlikely that these implementations were ever used so we do not bother
with deprecation or a warning. We just drop the call to this method which
should not be called from within a WSGI application.
Related to #17057223.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 15:16:53 +0100] rev 12000
[pyramid] Drop useless "init_instance" module
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 15:01:41 +0100] rev 11999
[server] Drop inexistent "bootstrap" argument in Repository initialization
This is a missing bit from 5de78b6fff2e. Unfortunately this code appears to be
uncovered by our test suite.
David Douard <david.douard@logilab.fr> [Wed, 08 Feb 2017 16:05:00 +0100] rev 11998
[server] fix a typo in a docstring
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 24 Feb 2017 09:18:08 +0100] rev 11997
[ctl] Load available configurations in "cubicweb-ctl list"
Otherwise we rely on associated ctl plugins to be loaded which is arguably orthogonal to
configurations.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 23 Feb 2017 10:59:56 +0100] rev 11996
[web/views] Fix a docstring
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 23 Feb 2017 08:37:39 +0100] rev 11995
[server] Use looping_task method in Repository._prepare_startup()
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 27 Feb 2017 17:13:45 +0100] rev 11994
[skeleton] Drop logging configuration from development.ini
This is actually not useful as logging is already initialized and configure
"somewhere else" where the repository is started.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 27 Feb 2017 14:49:32 +0100] rev 11993
[pyramid] Drop retrieval of auth/session secret in all-in-one.conf
We actually never supported this in cubicweb, but only in pyramid-cubicweb.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 27 Feb 2017 09:06:23 +0100] rev 11992
[cwctl] Recommend 'pyramid' before 'wsgi' when twisted is not available
Not sure anyone ever really used the latter and the former is certainly more
reliable/tested.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 27 Feb 2017 09:05:33 +0100] rev 11991
[cwctl] Drop message about 'the pyramid cube' in "start" command
This is shown when twisted is not importable and we suggest to use 'cubicweb
pyramid <appid>' instead. Since 3.24, cubicweb-pyramid got merge in cubicweb
so drop this reference in the message.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 27 Feb 2017 16:57:59 +0100] rev 11990
[cwconfig] Fix two NameError in load_available_configs()
This comes from a copy-paste in d92d75b17a85.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 27 Feb 2017 08:53:52 +0100] rev 11989
[etwist] Drop try/except around definitions of 'all-in-one' configuration and command handlers
cubicweb.server is no longer conditionally shipped, neither in python package
nor in debian package since 3.24.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 28 Feb 2017 16:55:32 +0100] rev 11988
[server] Call 'server_startup' hooks at the end of repository "bootstrap"
Now that we have guarded all calls to Repository.looping_task() in
'server_startup' hooks we can execute this hooks category at bootstrap step.
This way, repositories running without a tasks manager (i.e. those embedded
into a WSGI application) will have these hooks triggered.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 28 Feb 2017 16:46:16 +0100] rev 11987
[pyramid] Drop module-level cache and cleanup looping tasks in tools
And use a LRU cache over cached_build_user function.
This looping task is problematic because it would not be run from within a
WSGI application which does not have a repository with a tasks manager.
This pulls an explicit dependency on 'repoze.lru' but it's not a big deal
since pyramid already depends on this. RPM spec file not update since it does
not even mention pyramid...
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 28 Feb 2017 16:11:17 +0100] rev 11986
[hooks] Return early in server_startup hooks if the repository has not tasks manager
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 28 Feb 2017 16:05:00 +0100] rev 11985
[server] Only register "clean_sessions" looping tasks if repository has a tasks manager
This prepares for calling Repository's _prepare_startup() in bootstrap() so
that repository instances without a tasks manager running can still have their
'server_startup' hooks triggered (this is particularly useful for BFSS
storages).
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 24 Feb 2017 10:16:17 +0100] rev 11984
[utils] Do not pass a tasks manager to Repository in admincnx()
We do not call repo.start_looping_tasks() for the instantiated repository, so
a tasks manager is useless.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 23 Feb 2017 18:02:33 +0100] rev 11983
[server] Separate repository bootstrap from initialization
Thus we now call 'bootstrap' here and there explicitly and remove call of this
method in Repository.__init__(). This way instantiation of a Repository does
not *implicitly* triggers the "bootstrap" step, which is arguably not a
trivial thing and thus deserves to be independent.
In __init__, set 'shutting_down' attribute to None and then to False in
bootstrap as a mean to indicate that, when initialized, a repository is
neither shutting down nor started (not sure where this is used though).
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 23 Feb 2017 17:51:11 +0100] rev 11982
[server] Also remove tmpdir in case of error during restore database command
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 23 Feb 2017 17:47:18 +0100] rev 11981
[server] Rename Repository's init_cnxset_pool method bootstrap
See the (removed) docstring for a rationale...
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 23 Feb 2017 17:45:50 +0100] rev 11980
[server] Replace server config's init_cnxset_pool attribute by a "bootstrap" parameter in Repository
This 'init_cnxset_pool' class attribute is actually used to control whether a
Repository instance should be "bootstraped" (see Repository.init_cnxset_pool()
for a definition of "bootstrap") or not. I seems clearer to me to have this
controlled by a boolean "bootstrap" initialization parameter in Repository.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 23 Feb 2017 17:38:47 +0100] rev 11979
[server] Drop close/open steps in NativeSQLSource.restore()
The only place where this is called is in
ServerMigrationHelper.restore_database() where config.init_cnxset_pool is set
to False. So these steps appear to be useless.
Sylvain Thénault <sylvain.thenault@logilab.fr> [Tue, 07 Feb 2017 10:37:37 +0100] rev 11978
[skel] Fix rpm's .spec file skeleton
It's broken for new-style packages since it doesn't consider (even remove) python packages.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 23 Feb 2017 17:36:11 +0100] rev 11977
[server] Move "starting repository..." message where this actually happens
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 23 Feb 2017 17:34:37 +0100] rev 11976
[server] Initialize Repository without a tasks manager in ServerMigrationHelper.restore_database()
We don't need a tasks manager here I think. Thus instantiate the Repository
from its class directly instead of using config.repository() which set a tasks
manager.