plone / plone.recipe.zope2instance

zc.buildout recipe to setup and configure a Zope 2 instance.
https://pypi.org/project/plone.recipe.zope2instance
7 stars 23 forks source link

Fix handling of ZEO client persistent cache and storage settings #108

Closed dataflake closed 5 years ago

dataflake commented 5 years ago

Fixes #30

The handling of ZEO client settings client and especially var and its documentation here were broken on several levels.

There appeared to be a misunderstanding of var, otherwise the recipe would not have set it for all cases. var is only ever consulted in one specific case: If client is set to signal the wish for persistent ZEO cache files.

The change only ever sets var explicitly if the recipe gets both a zeo-client-client and a zeo-var value.

For cases where client is set but var is not the ZEO ClientStorage code would use the current working directory to store the persistent cache files. That's just a bad idea all around. Instead, it will be forced to the system's temporary folder instead.

For those who wonder why zeo-var is not set to a temporary path at buildout time and instead an indirection with an environment variable is used: Some operating systems do not use one fixed location for temporary files. They create them for each logged-in user, and with a different path each time they log in. That's why the only safe way to find it is the moment the runner is executed.

mister-roboto commented 5 years ago

@dataflake thanks for creating this Pull Request and help improve Plone!

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.

Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:

@jenkins-plone-org please run jobs

With this simple comment all the jobs will be started automatically.

Happy hacking!

dataflake commented 5 years ago

@jenkins-plone-org please run jobs

dataflake commented 5 years ago

This also fixes #29 - I have mixed up two branches.