- 
                Notifications
    You must be signed in to change notification settings 
- Fork 25.6k
Remove config prompting for secrets and text #27216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
9a65728
              366d61d
              9dcde16
              4ff7d88
              d7ccdba
              8d6452a
              b0a35c9
              56ff056
              0baf6da
              b8e072b
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -28,6 +28,7 @@ | |
| import java.util.Map; | ||
| import java.util.function.Function; | ||
|  | ||
| import org.elasticsearch.Version; | ||
| import org.elasticsearch.cli.Terminal; | ||
| import org.elasticsearch.cluster.ClusterName; | ||
| import org.elasticsearch.common.Strings; | ||
|  | @@ -123,8 +124,13 @@ static void initializeSettings(final Settings.Builder output, final Settings inp | |
|  | ||
| /** | ||
| * Checks all settings values to make sure they do not have the old prompt settings. These were deprecated in 6.0.0. | ||
| * This check should be removed in 8.0.0. | ||
| */ | ||
| private static void checkSettingsForTerminalDeprecation(final Settings.Builder output) throws SettingsException { | ||
| // This method to be removed in 8.0.0, as it was deprecated in 6.0 and removed in 7.0 | ||
| if (Version.CURRENT.toString().startsWith("8")) { | ||
| throw new SettingsException("Logic pertaining to config driven prompting should be removed in 8.0.0."); | ||
| } | ||
| for (String setting : output.keys()) { | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add an assertion here the major property of the current version is not 8; then, when we bump the version to 8.0.0 on master we know that we can remove this code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dude, nice. Thats smart. Will do. | ||
| switch (output.get(setting)) { | ||
| case SECRET_PROMPT_VALUE: | ||
|  | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
Version.CURRENT.major == 8? And I think maybe we should only make this an assertion?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx, i wasnt aware exactly how to do it