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

Throw exception on duplicate mappings metadata fields when merging templates #57835

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Jun 8, 2020

In #57701 we changed mappings merging so that duplicate fields specified in mappings caused an
exception during validation. This change makes the same exception thrown when metadata fields are
duplicated. This will allow us to be strict currently with plans to make the merging more
fine-grained in a later release.

The tests are marked as @AwaitsFix as we intend to change the behavior soon to be finer-grained, and they will be beneficial once we do have the fine-grained merging.

In elastic#57701 we changed mappings merging so that duplicate fields specified in mappings caused an
exception during validation. This change makes the same exception thrown when metadata fields are
duplicated. This will allow us to be strict currently with plans to make the merging more
fine-grained in a later release.
@dakrone dakrone added :Data Management/Indices APIs APIs to create and manage indices and templates v8.0.0 v7.8.0 v7.9.0 labels Jun 8, 2020
@dakrone dakrone requested a review from andreidan June 8, 2020 18:55
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Indices APIs)

Copy link
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this Lee

@dakrone dakrone merged commit 7425edd into elastic:master Jun 8, 2020
@dakrone dakrone deleted the itv2-throw-on-meta-dupes branch June 8, 2020 19:43
dakrone added a commit that referenced this pull request Jun 8, 2020
This is a backport of #57835

In #57701 we changed mappings merging so that duplicate fields specified in mappings caused an
exception during validation. This change makes the same exception thrown when metadata fields are
duplicated. This will allow us to be strict currently with plans to make the merging more
fine-grained in a later release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >enhancement Team:Data Management Meta label for data/management team v7.8.0 v7.9.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants