Skip to content
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

Remove config prompting for secrets and text #27216

Merged

Conversation

hub-cap
Copy link
Contributor

@hub-cap hub-cap commented Nov 1, 2017

This commit removes the ability to use ${prompt.secret} and
${prompt.text} as valid config settings. Secure settings has obsoleted
the need for this, and it cleans up some of the code in Bootstrap.

@hub-cap
Copy link
Contributor Author

hub-cap commented Nov 1, 2017

I chatted w/ @rjernst and i will be finding a way to add deprecation logging to this (where this is the 6.x version of this). I dont know how early this is in bootstrap but i suspect its before logging is set up, but ill find a way to hack it in.

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

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

I left one comment, please address before merging. Otherwise, I'm so happy to see this simplification. LGTM.

*/
private static void finalizeSettings(Settings.Builder output, Terminal terminal) {
private static void checkSettingsForTerminalDeprecation(final Settings.Builder output) throws SettingsException {
for (String setting : output.keys()) {
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dude, nice. Thats smart. Will do.

@jasontedor
Copy link
Member

I chatted w/ @rjernst and i will be finding a way to add deprecation logging to this (where this is the 6.x version of this). I dont know how early this is in bootstrap but i suspect its before logging is set up, but ill find a way to hack it in.

There's a way to hack it in: pass whether or not the terminal was used to set a setting up through the environment and then in bootstrap extract that from the environment and log a deprecation message if it was used. Although, I do wonder if this is overkill (is emitting a message on the terminal enough?)?

@hub-cap
Copy link
Contributor Author

hub-cap commented Nov 2, 2017

Although, I do wonder if this is overkill

I think it would be nice to have in the deprecation log. It can cause peoples clusters to break and they wont really know it until spinning them up if they pay less attn to the standard log / terminal. That said, is there any prior art to what we do in these infra-y breaking changes? If we do not normally do this, then its perfectly valid not to add it for this. Im still leaning toward seeing it in the deprecation logs tho.

@jasontedor
Copy link
Member

That said, is there any prior art to what we do in these infra-y breaking changes?

There are times where we simply can not have the fancy deprecation logging and rely on the migration docs. I think I want to see how ugly and invasive the hack is before rendering judgement here. My concern with a hack that lives in 6.x only is it making backporting other changes more difficult.

@hub-cap
Copy link
Contributor Author

hub-cap commented Nov 2, 2017

Ill give it a whirl and see how ugly it is.

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

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

I left a comment about the assertion.

*/
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")) {
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

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

LGTM.

@hub-cap hub-cap merged commit 2949c53 into elastic:master Nov 20, 2017
jasontedor added a commit that referenced this pull request Nov 20, 2017
* master: (31 commits)
  [TEST] Fix `GeoShapeQueryTests#testPointsOnly` failure
  Transition transport apis to use void listeners (#27440)
  AwaitsFix GeoShapeQueryTests#testPointsOnly #27454
  Bump test version after backport
  Ensure nested documents have consistent version and seq_ids (#27455)
  Tests: Add Fedora-27 to packaging tests
  Delete some seemingly unused exceptions (#27439)
  #26800: Fix docs rendering
  Remove config prompting for secrets and text (#27216)
  Move the CLI into its own subproject (#27114)
  Correct usage of "an" to "a" in getting started docs
  Avoid NPE when getting build information
  Removes BWC snapshot status handler used in 6.x (#27443)
  Remove manual tracking of registered channels (#27445)
  Remove parameters on HandshakeResponseHandler (#27444)
  [GEO] fix pointsOnly bug for MULTIPOINT
  Standardize underscore requirements in parameters (#27414)
  peanut butter hamburgers
  Log primary-replica resync failures
  Uses TransportMasterNodeAction to update shard snapshot status (#27165)
  ...
@clintongormley clintongormley added the :Core/Infra/Settings Settings infrastructure and APIs label Nov 27, 2017
hub-cap added a commit to hub-cap/elasticsearch that referenced this pull request Jan 23, 2018
hub-cap added a commit that referenced this pull request Feb 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants