Summary: | Add info about which memcached config is used to about.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart+koha> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart+koha> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | frederic, katrin.fischer, kyle, mtj, tomascohen, veron |
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
The memcached config can be read from ENV or koha-conf.xml
In order to remove any ambiguity, now we inform the user which config is used in About Koha > Server information page.
|
Version(s) released in: | |
Bug Depends on: | 17261 | ||
Bug Blocks: | |||
Attachments: |
Bug 17274: Display the place where the memcached is picked
Bug 17274: Display the place where the memcached is picked [PASSED QA] Bug 17274: Display the place where the memcached is picked |
Description
Jonathan Druart
2016-09-08 09:26:28 UTC
Created attachment 55329 [details] [review] Bug 17274: Display the place where the memcached is picked The memcached config can be read from ENV or koha-conf.xml In order to remove any ambiguity, let's inform the user which config is used. Test plan: 1/ Define the memcached config in ENV and $KOHA_CONF => Go on about page, you should get a warning 2/ Define the memcached config in ENV and not in $KOHA_CONF => Go on about page, you should get a warning 3/ Do not defined the memcached config in ENV or $KOHA_CONF => Go on about page, you should get a warning 4/ Define the memcached config in $KOHA_CONF and not in ENV => Go on about page, you should not get a warning, this is the expected config Jonathan: Maybe it is better to keep warnings on 'System information'? (In reply to Tomás Cohen Arazi from comment #2) > Jonathan: Maybe it is better to keep warnings on 'System information'? The place where the warning is displayed (i.e. same place as info about memcached configuration / Bug 17261) makes sense to me. Created attachment 55479 [details] [review] Bug 17274: Display the place where the memcached is picked The memcached config can be read from ENV or koha-conf.xml In order to remove any ambiguity, let's inform the user which config is used. Test plan: 1/ Define the memcached config in ENV and $KOHA_CONF => Go on about page, you should get a warning 2/ Define the memcached config in ENV and not in $KOHA_CONF => Go on about page, you should get a warning 3/ Do not defined the memcached config in ENV or $KOHA_CONF => Go on about page, you should get a warning 4/ Define the memcached config in $KOHA_CONF and not in ENV => Go on about page, you should not get a warning, this is the expected config Followed test plan, works as expected. Signed-off-by: Marc <veron@veron.ch> Where is memcached server extracted from koha-conf.xml? I don't see it in Koha::Cache.pm. (In reply to Frédéric Demians from comment #5) > Where is memcached server extracted from koha-conf.xml? I don't see it in > Koha::Cache.pm. koha::Cache.pm (86~93): $self->{'namespace'} ||= $ENV{MEMCACHED_NAMESPACE}; my @servers = split /,/, $ENV{MEMCACHED_SERVERS} || ''; unless ( $self->{namespace} and @servers ) { my $koha_config = Koha::Config->read_from_file( Koha::Config->guess_koha_conf() ); $self->{namespace} ||= $koha_config->{config}{memcached_namespace} || 'koha'; @servers = split /,/, $koha_config->{config}{memcached_servers} // '' unless @servers; } (In reply to Frédéric Demians from comment #5) > Where is memcached server extracted from koha-conf.xml? I don't see it in > Koha::Cache.pm. In current master, it reads it from koha-conf.xml BUT it prefers ENV if available. That's why I mentioned it is safe for stable. Created attachment 57056 [details] [review] [PASSED QA] Bug 17274: Display the place where the memcached is picked The memcached config can be read from ENV or koha-conf.xml In order to remove any ambiguity, let's inform the user which config is used. Test plan: 1/ Define the memcached config in ENV and $KOHA_CONF => Go on about page, you should get a warning 2/ Define the memcached config in ENV and not in $KOHA_CONF => Go on about page, you should get a warning 3/ Do not defined the memcached config in ENV or $KOHA_CONF => Go on about page, you should get a warning 4/ Define the memcached config in $KOHA_CONF and not in ENV => Go on about page, you should not get a warning, this is the expected config Followed test plan, works as expected. Signed-off-by: Marc <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Pushed to master for 16.11, thanks Jonathan! enhancement, passing for 16.05 |