[7.16] Drop non-setting deprecations down to warning level (#80374)

Complementary to #79665 this change
will reduce the deprecation logging level to WARN for (most) all non-settings that
continue to exist in 8.0+.
This commit is contained in:
Jake Landis 2021-11-10 13:07:56 -06:00 committed by GitHub
parent f736645266
commit 6358afb0cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
99 changed files with 191 additions and 127 deletions

View file

@ -151,7 +151,7 @@ final class Ec2ClientSettings {
return null;
} else {
if (key.length() == 0) {
deprecationLogger.critical(
deprecationLogger.warn(
DeprecationCategory.SETTINGS,
"ec2_invalid_settings",
"Setting [{}] is set but [{}] is not, which will be unsupported in future",
@ -160,7 +160,7 @@ final class Ec2ClientSettings {
);
}
if (secret.length() == 0) {
deprecationLogger.critical(
deprecationLogger.warn(
DeprecationCategory.SETTINGS,
"ec2_invalid_settings",
"Setting [{}] is set but [{}] is not, which will be unsupported in future",

View file

@ -15,7 +15,7 @@ import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.BasicSessionCredentials;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.apache.logging.log4j.Level;
import org.elasticsearch.common.settings.MockSecureSettings;
import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Settings;
@ -73,7 +73,7 @@ public class AwsEc2ServiceImplTests extends ESTestCase {
assertSettingDeprecationsAndWarnings(
new Setting<?>[] {},
new DeprecationWarning(
DeprecationLogger.CRITICAL,
Level.WARN,
"Setting [discovery.ec2.access_key] is set but " + "[discovery.ec2.secret_key] is not, which will be unsupported in future"
)
);
@ -91,7 +91,7 @@ public class AwsEc2ServiceImplTests extends ESTestCase {
assertSettingDeprecationsAndWarnings(
new Setting<?>[] {},
new DeprecationWarning(
DeprecationLogger.CRITICAL,
Level.WARN,
"Setting [discovery.ec2.secret_key] is set but " + "[discovery.ec2.access_key] is not, which will be unsupported in future"
)
);