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

Cherry-pick #16038 to 7.x: Template generation maintenance + remove number of routing shards from default template #16109

Merged
merged 2 commits into from
Feb 6, 2020

Conversation

urso
Copy link

@urso urso commented Feb 5, 2020

Cherry-pick of PR #16038 to 7.x branch. Original message:

  • Bug

What does this PR do?

  • Remove number_of_routing_shards from default template if the setting is not present and if we target Elasticsearch >= 7.0.
  • Update template generation unit tests adding some more test cases, and updating cases to use the the current Beat version as well.
  • introduce testTemplate and other helpers for writing more concise tests.

Why is it important?

  • The number_of_routing_shards setting has become optional with Elasticsearch 7.0 and should not be set by default anymore.
  • Some of our tests only did check for one particular ES version. The template output has been slightly changed for 7.0 to deal with types removal. The tests haven't been adapted in the past.
  • Helpers hopefully make it easier to see what is tested and encourage devs to add more tests in the future.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • [ ]

How to test this PR locally

Export template and check number_of_routing_shards setting is missing by default from the template.

Related issues

Use cases

Screenshots

Logs

…tic#16038)

* remove number of routing shards from default template
* Add more template version tests

(cherry picked from commit 9d99b89)
@urso urso requested review from a team as code owners February 5, 2020 16:57
@urso urso added the Team:Beats label Feb 5, 2020
@urso urso requested a review from a team February 5, 2020 16:59
@urso
Copy link
Author

urso commented Feb 6, 2020

Jenkins, test this.

@urso urso merged commit af01fb7 into elastic:7.x Feb 6, 2020
@urso urso deleted the backport_16038_7.x branch February 6, 2020 16:25
@andresrc andresrc added the Team:Integrations Label for the Integrations team label Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport review Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants