-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reset key in registry #330
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionally, this worked as expected. A few comments/suggestions on the APIs/implementations.
* @throws ConfigException If an error occurs while accessing the file | ||
* or the file contents are not valid. | ||
*/ | ||
public static void rebindFromFile(String file, Registry reg, List<String> keys) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, would using the same method name make the intent clearer?
src/main/java/org/openmicroscopy/shoola/env/data/DataServicesFactory.java
Outdated
Show resolved
Hide resolved
{ | ||
|
||
try { | ||
RegistryFactory.rebindFromFile(container.getConfigFileRelative(), registry, keys); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should a debug level logging statement be added to the log to indicate that some keys are being reset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
% tail -F ~/omero/log/omeroinsight.log | grep DataServices
2022-11-29 08:40:12,583 DEBUG [ o.o.shoola.env.data.DataServicesFactory] (entQueue-0) Using URL defined server-side for feedback: http://qa.openmicroscopy.org.uk
2022-11-29 08:40:12,583 INFO [ o.o.shoola.env.data.DataServicesFactory] (entQueue-0) Server version: 5.6.5
2022-11-29 08:40:32,584 DEBUG [ o.o.shoola.env.data.DataServicesFactory] (entQueue-0) Server error: ome.conditions.SecurityViolation - Cannot read configuration: omero.qa.feedback
2022-11-29 08:40:32,589 DEBUG [ o.o.shoola.env.data.DataServicesFactory] (entQueue-0) The following keys have been reset:/services/DEBUGGER/hostnameToken, /services/DEBUGGER/hostnameProcessing,
2022-11-29 08:40:32,589 INFO [ o.o.shoola.env.data.DataServicesFactory] (entQueue-0) Server version: 5.6.5
2022-11-29 08:41:23,759 DEBUG [ o.o.shoola.env.data.DataServicesFactory] (entQueue-0) The following keys have been reset:/services/DEBUGGER/hostnameToken, /services/DEBUGGER/hostnameProcessing,
2022-11-29 08:41:23,759 INFO [ o.o.shoola.env.data.DataServicesFactory] (entQueue-0) Server version: 5.6.5
2022-11-29 08:42:07,691 DEBUG [ o.o.shoola.env.data.DataServicesFactory] (entQueue-0) Server error: ome.conditions.SecurityViolation - Cannot read configuration: omero.qa.feedback
2022-11-29 08:42:07,694 DEBUG [ o.o.shoola.env.data.DataServicesFactory] (entQueue-0) The following keys have been reset:/services/DEBUGGER/hostnameToken, /services/DEBUGGER/hostnameProcessing,
2022-11-29 08:42:37,014 DEBUG [ o.o.shoola.env.data.DataServicesFactory] (entQueue-0) Using URL defined server-side for feedback: http://qa.openmicroscopy.org.uk
2022-11-29 08:42:37,015 INFO [ o.o.shoola.env.data.DataServicesFactory] (entQueue-0) Server version: 5.6.5
add ability to reset the value of specified keys in registry
To test the proposed changed.
omero.qa.feedback
configured.container.xml
cc @sbesson