Skip to content

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

Merged
dakrone merged 1 commit intoelastic:masterfrom
dakrone:itv2-throw-on-meta-dupes
Jun 8, 2020
Merged

Throw exception on duplicate mappings metadata fields when merging templates#57835
dakrone merged 1 commit intoelastic:masterfrom
dakrone:itv2-throw-on-meta-dupes

Conversation

@dakrone
Copy link
Copy Markdown
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 DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. 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
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
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 DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. >enhancement Team:Data Management (obsolete) DO NOT USE. This team no longer exists. 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