If "test_mode" is configured, then "log_path_prefix" must also be configured for the same reason.
Three things need to happen here:
Add exception handling for nlohmann::json and std::exception here to avoid this and other uncaught exceptions.
Gracefully continue when "test_mode" and "log_path_prefix" are not found in the configuration because these are not required for the plugin to work properly.
Add a test which does not use "test_mode". This only got past our release process because the test infrastructure always configures "test_mode" and "log_path_prefix".
Bug Report
Version, OS and Version
4.3.0.0 (server version 4.3.0), ubuntu:18.04
What did you try to do?
Configure the audit plugin according to the advanced training slide deck:
Expected behavior
Everything works
Observed behavior (including steps to reproduce, if applicable)
ils
is now failing because the agent disappears. This is because the configuration in 4.3.0 server is now fetched/set through thenlohmann::json
library, but no exception handling was added for this in this plugin. Here is the offending line: https://github.com/irods/irods_rule_engine_plugin_audit_amqp/blob/ffe953a56b330d8c635d2f28f6e7669ad43d1457/libirods_rule_engine_plugin-audit_amqp.cpp#L83If "test_mode" is configured, then "log_path_prefix" must also be configured for the same reason.
Three things need to happen here:
nlohmann::json
andstd::exception
here to avoid this and other uncaught exceptions.