Skip to content

[Build] deprecate renamed configurations#493

Merged
kavilla merged 1 commit intoopensearch-project:mainfrom
kavilla:avillk/cfg-deprecations
Jun 22, 2021
Merged

[Build] deprecate renamed configurations#493
kavilla merged 1 commit intoopensearch-project:mainfrom
kavilla:avillk/cfg-deprecations

Conversation

@kavilla
Copy link
Copy Markdown
Member

@kavilla kavilla commented Jun 18, 2021

Description

While renaming after the fork, configurations were renamed
and replaced with keywords related to OpenSearch.

This meant that anyone who migrated to OpenSearch Dashboards
who had configured their YAML file no longer were able to
carry over those changes and run the application. This
prevented the application from starting due to unknown config
keys. Although, this still does not allow the application to
work out of the box because people will need to make sure
then rename their kibana.yml to opensearch_dashboards.yml,
but once they do they do not need to modify the content
of the config.

Signed-off-by: Kawika Avilla kavilla414@gmail.com

Issues Resolved

#440
Partial: #334

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

@kavilla
Copy link
Copy Markdown
Member Author

kavilla commented Jun 18, 2021

👍🏼 or 👎🏼 if this should go into 1.0

this should definitely be backported into 1.x

@opensearch-ci-bot
Copy link
Copy Markdown
Collaborator

✅   DCO Check Passed 45057bd

Comment thread src/plugins/vis_type_timeline/server/index.ts
Copy link
Copy Markdown
Contributor

@tmarkley tmarkley left a comment

Choose a reason for hiding this comment

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

Can we add tests for the config changes?

@kavilla kavilla force-pushed the avillk/cfg-deprecations branch from 45057bd to 647d98c Compare June 18, 2021 22:49
@opensearch-ci-bot
Copy link
Copy Markdown
Collaborator

✅   DCO Check Passed 647d98c

@kavilla kavilla force-pushed the avillk/cfg-deprecations branch from 647d98c to 134686c Compare June 18, 2021 23:38
@opensearch-ci-bot
Copy link
Copy Markdown
Collaborator

✅   DCO Check Passed 134686c

While renaming after the fork, configurations were renamed
and replaced with keywords related to OpenSearch.

This meant that anyone who migrated to OpenSearch Dashboards
who had configured their YAML file no longer were able to
carry over those changes and run the application. This
prevented the application from starting due to unknown config
keys. Although, this still does not allow the application to
work out of the box because people will need to make sure
then rename their kibana.yml to opensearch_dashboards.yml,
but once they do they do not need to modify the content
of the config.

Added unit tests to test on the server configs.

Issues resolved:
opensearch-project#440

Partially resolves:
opensearch-project#334

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
@kavilla kavilla force-pushed the avillk/cfg-deprecations branch from 134686c to 25eb06f Compare June 18, 2021 23:57
@opensearch-ci-bot
Copy link
Copy Markdown
Collaborator

✅   DCO Check Passed 25eb06f

@kavilla kavilla requested review from ananzh and tmarkley June 19, 2021 00:00
@kavilla
Copy link
Copy Markdown
Member Author

kavilla commented Jun 19, 2021

Can we add tests for the config changes?

Added the best I can, specifically related to the core server configs.

@kavilla
Copy link
Copy Markdown
Member Author

kavilla commented Jun 19, 2021

Re-running tests, full suite should be done in an hour.

@kavilla
Copy link
Copy Markdown
Member Author

kavilla commented Jun 19, 2021

Tests all passing on the CI.

Comment on lines +138 to +155
const deprecations: ConfigDeprecationProvider = ({ renameFromRoot }) => [
renameFromRoot('elasticsearch.sniffOnStart', 'opensearch.sniffOnStart'),
renameFromRoot('elasticsearch.sniffInterval', 'opensearch.sniffInterval'),
renameFromRoot('elasticsearch.sniffOnConnectionFault', 'opensearch.sniffOnConnectionFault'),
renameFromRoot('elasticsearch.hosts', 'opensearch.hosts'),
renameFromRoot('elasticsearch.username', 'opensearch.username'),
renameFromRoot('elasticsearch.password', 'opensearch.password'),
renameFromRoot('elasticsearch.requestHeadersWhitelist', 'opensearch.requestHeadersWhitelist'),
renameFromRoot('elasticsearch.customHeaders', 'opensearch.customHeaders'),
renameFromRoot('elasticsearch.shardTimeout', 'opensearch.shardTimeout'),
renameFromRoot('elasticsearch.requestTimeout', 'opensearch.requestTimeout'),
renameFromRoot('elasticsearch.pingTimeout', 'opensearch.pingTimeout'),
renameFromRoot('elasticsearch.logQueries', 'opensearch.logQueries'),
renameFromRoot('elasticsearch.optimizedHealthcheckId', 'opensearch.optimizedHealthcheckId'),
renameFromRoot('elasticsearch.ssl', 'opensearch.ssl'),
renameFromRoot('elasticsearch.apiVersion', 'opensearch.apiVersion'),
renameFromRoot('elasticsearch.healthCheck', 'opensearch.healthCheck'),
renameFromRoot('elasticsearch.ignoreVersionMismatch', 'opensearch.ignoreVersionMismatch'),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will these need to be updated any time we introduce a new setting?

Copy link
Copy Markdown
Member Author

@kavilla kavilla Jun 21, 2021

Choose a reason for hiding this comment

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

When a new setting is added you dont need to add it here, I added your optimizedHealthcheckId just thinking there are so many configs for the engine that somebody might accidentally add the setting here. I can remove it though since it is completely new. Let me know what you think.

@kavilla kavilla merged commit e4bd7b3 into opensearch-project:main Jun 22, 2021
kavilla added a commit that referenced this pull request Jun 22, 2021
While renaming after the fork, configurations were renamed
and replaced with keywords related to OpenSearch.

This meant that anyone who migrated to OpenSearch Dashboards
who had configured their YAML file no longer were able to
carry over those changes and run the application. This
prevented the application from starting due to unknown config
keys. Although, this still does not allow the application to
work out of the box because people will need to make sure
then rename their kibana.yml to opensearch_dashboards.yml,
but once they do they do not need to modify the content
of the config.

Added unit tests to test on the server configs.

Issues resolved:
#440

Partially resolves:
#334

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
kavilla added a commit that referenced this pull request Jun 22, 2021
While renaming after the fork, configurations were renamed
and replaced with keywords related to OpenSearch.

This meant that anyone who migrated to OpenSearch Dashboards
who had configured their YAML file no longer were able to
carry over those changes and run the application. This
prevented the application from starting due to unknown config
keys. Although, this still does not allow the application to
work out of the box because people will need to make sure
then rename their kibana.yml to opensearch_dashboards.yml,
but once they do they do not need to modify the content
of the config.

Added unit tests to test on the server configs.

Issues resolved:
#440

Partially resolves:
#334

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
@kavilla kavilla deleted the avillk/cfg-deprecations branch June 30, 2021 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards-compatibility build Build related additions or modifications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Migration][discuss] deprecate setting names in opensearch_dashboards.yml Support restart upgrades to OpenSearch Dashboards 1.0 from Kibana v7.10.x

5 participants