Skip to content

Commit

Permalink
[8018] Deprecate plugins_home property in irods_environment.json.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Dec 6, 2024
1 parent 9a7a55e commit 7ef6949
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
8 changes: 7 additions & 1 deletion lib/core/include/irods/getRodsEnv.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,19 @@ typedef struct RodsEnvironment {

// =-=-=-=-=-=-=-
// override of plugin installation directory
char irodsPluginHome[MAX_NAME_LEN];
__attribute__((deprecated("Use irodsPluginDirectory"))) char irodsPluginHome[MAX_NAME_LEN];
// TODO Hmm, adding a new member will result in an ABI break. Users will have to
// recompile their C/C++ clients. If we don't add the new member, then users can't
// migrate their clients to the new variable.

// =-=-=-=-=-=-=-
// TCP keepalive configurations
int tcp_keepalive_intvl;
int tcp_keepalive_probes;
int tcp_keepalive_time;

// TODO This will result in an ABI break.
char irodsPluginDirectory[MAX_NAME_LEN];
} rodsEnv;

#ifdef __cplusplus
Expand Down
3 changes: 2 additions & 1 deletion lib/core/include/irods/irods_configuration_keywords.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ namespace irods
extern const char* const KW_CFG_SERVICE_ROLE_CONSUMER;
extern const char* const KW_CFG_SERVICE_ROLE_PROXY;

extern const char* const KW_CFG_IRODS_PLUGINS_HOME;
[[deprecated("Use KW_CFG_PLUGIN_CONFIGURATION")]] extern const char* const KW_CFG_IRODS_PLUGINS_HOME;
extern const char* const KW_CFG_IRODS_PLUGIN_DIRECTORY;

extern const char* const KW_CFG_PLUGIN_CONFIGURATION;

Expand Down
21 changes: 15 additions & 6 deletions lib/core/src/getRodsEnv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,13 @@ extern "C" {
irods::KW_CFG_IRODS_CONNECTION_POOL_REFRESH_TIME,
_env->irodsConnectionPoolRefreshTime );

// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay)
capture_string_property(irods::KW_CFG_IRODS_PLUGINS_HOME, _env->irodsPluginHome, MAX_NAME_LEN);
capture_string_property(irods::KW_CFG_IRODS_PLUGIN_DIRECTORY, _env->irodsPluginHome, MAX_NAME_LEN);

// If the "plugin_directory" is configured, ignore "plugins_home".
if (std::strlen(_env->irodsPluginHome) == 0) {
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay)
capture_string_property(irods::KW_CFG_IRODS_PLUGINS_HOME, _env->irodsPluginHome, MAX_NAME_LEN);
}

// If the configuration is not set for the TCP keepalive options, set the value to something invalid. This
// indicates that we should not set the option on the socket, which will allow the socket to use the kernel
Expand Down Expand Up @@ -642,10 +647,14 @@ extern "C" {
env_var,
_env->irodsTransBufferSizeForParaTrans );

env_var = irods::KW_CFG_IRODS_PLUGINS_HOME;
capture_string_env_var(
env_var,
_env->irodsPluginHome );
env_var = irods::KW_CFG_IRODS_PLUGIN_DIRECTORY;
capture_string_env_var(env_var, _env->irodsPluginHome);

// If the "plugin_directory" is configured, ignore "plugins_home".
if (std::strlen(_env->irodsPluginHome) == 0) {
env_var = irods::KW_CFG_IRODS_PLUGINS_HOME;
capture_string_env_var(env_var, _env->irodsPluginHome);
}

capture_integer_env_var(irods::KW_CFG_IRODS_TCP_KEEPALIVE_INTVL_IN_SECONDS, _env->tcp_keepalive_intvl);
capture_integer_env_var(irods::KW_CFG_IRODS_TCP_KEEPALIVE_PROBES, _env->tcp_keepalive_probes);
Expand Down
1 change: 1 addition & 0 deletions lib/core/src/irods_configuration_keywords.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ namespace irods
const char* const KW_CFG_SERVICE_ROLE_PROXY{"proxy"};

const char* const KW_CFG_IRODS_PLUGINS_HOME{"irods_plugins_home"};
const char* const KW_CFG_IRODS_PLUGIN_DIRECTORY{"irods_plugin_directory"};

const char* const KW_CFG_PLUGIN_CONFIGURATION{"plugin_configuration"};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"irods_match_hash_policy": {"type": "string"},
"irods_maximum_size_for_single_buffer_in_megabytes": {"type": "integer"},
"irods_plugins_home": {"type": "string"},
"irods_plugin_directory": {"type": "string"},
"irods_server_control_plane_encryption_algorithm": {"type": "string"},
"irods_server_control_plane_encryption_num_hash_rounds": {"type": "integer"},
"irods_server_control_plane_key": {"type": "string"},
Expand Down

0 comments on commit 7ef6949

Please sign in to comment.