Skip to content

Conversation

@jakelandis
Copy link
Contributor

This commit lowers the severity for all settings from critical to warning
for all settings that are still present in 8.0.0.

releated #79107

===

Note - I have requested review from @tvernum and @jbaiera since these settings are mostly from areas for which they are familiar. Please add others for review if needed.
cc: @masseyke @rjernst @pgomulka

===
Note this settings were identified by introducing the following debug code in 8.0.0 and 7.16 and comparing the two lists. If the same setting showed up as deprecated in both 7.16 and 8.0.0 it is included in this PR. If the setting was missing in 8.0.0, no changes since the default is critical.

diff --git a/server/src/main/java/org/elasticsearch/common/settings/Setting.java b/server/src/main/java/org/elasticsearch/common/settings/Setting.java
index a56baf6cf3b..8a23f9ce906 100644
--- a/server/src/main/java/org/elasticsearch/common/settings/Setting.java
+++ b/server/src/main/java/org/elasticsearch/common/settings/Setting.java
@@ -161,6 +161,12 @@ public class Setting<T> implements ToXContentObject {
         this.defaultValue = defaultValue;
         this.parser = parser;
         this.validator = validator;
+        if(Arrays.stream(properties).filter(p -> p.equals(Property.Deprecated) || p.equals(Property.DeprecatedWarning)).count() > 0){
+                       System.out.println("**deprecated setting: " + key +
+                           (Arrays.stream(properties).filter( p -> p.equals(Property.DeprecatedWarning)).count() > 0 ? "(warning)" : ""));
+
+
+                    }
         if (properties == null) {
             throw new IllegalArgumentException("properties cannot be null for setting [" + key + "]");
         }

@jakelandis jakelandis added >non-issue :Core/Infra/Settings Settings infrastructure and APIs v7.16.0 labels Oct 21, 2021
@jakelandis jakelandis requested review from jbaiera and tvernum October 21, 2021 22:44
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Oct 21, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@jakelandis jakelandis changed the title Reduce deprecration logging severity for settings that are not removed in 8.0 Reduce deprecation logging severity for settings that are not removed in 8.0 Oct 21, 2021
Copy link
Member

@jbaiera jbaiera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on the monitoring changes, though I think just one got missed

public static final Setting.AffixSetting<Boolean> USE_INGEST_PIPELINE_SETTING =
Setting.affixKeySetting("xpack.monitoring.exporters.","use_ingest",
key -> Setting.boolSetting(key, true, Property.Dynamic, Property.NodeScope, Property.Deprecated), TYPE_DEPENDENCY);
key -> Setting.boolSetting(key, true, Property.Dynamic, Property.NodeScope, Property.Deprecated),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one should be at warning level as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That setting was removed in 8.x, so it should remain critical level .

Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
In a few months we should have a conversation about what the deprecation lifecycle looks like and how setting attributes should work with that. But not now.

@danhermann danhermann added v8.1.0 and removed v7.16.0 labels Oct 27, 2021
@jakelandis
Copy link
Contributor Author

@elasticmachine update branch

@jakelandis jakelandis merged commit 6e3a108 into elastic:7.16 Oct 27, 2021
@jakelandis jakelandis deleted the lower_settings_deprecation_warnings branch October 27, 2021 15:08
jakelandis added a commit that referenced this pull request Nov 10, 2021
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+.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Settings Settings infrastructure and APIs >non-issue Team:Core/Infra Meta label for core/infra team v7.16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants