// Note: we explicitly do not call configurationManager.updatePluginConfiguration() because the
// agent is already updated to the new configuration. Instead we call the dedicated local method
// supporting this use case.
Configuration pluginConfig = upgradeRequest.getNewPluginConfiguration();
if (null != pluginConfig) {
pluginConfig = pluginConfig.deepCopy(false);
PluginConfigurationUpdate update = configurationManager.upgradePluginConfiguration(
subjectManager.getOverlord(), resource.getId(), pluginConfig);
ret.setUpgradedResourcePluginConfiguration(update.getResource().getPluginConfiguration());
}