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

Disallow merging existing mapping field definitions in templates #57701

Merged
merged 6 commits into from
Jun 8, 2020

Commits on Jun 4, 2020

  1. Disallow merging existing mapping field definitions in templates

    This commit changes the merge strategy introduced in elastic#55607 and elastic#55982. Instead of overwriting these
    fields, we now prevent them from being merged with an exception when a user attempts to
    overwrite a field.
    
    As part of this, a more robust validation has been added. The existing validation checked whether
    templates (composable and component) were valid on their own, this new validation now checks that
    the composite template (mappings/settings/aliases) is valid. This means that when a composable
    template is added or updated, we confirm that it is valid with its component pieces. When a
    component template is updated we ensure that all composable templates that make use of the component
    template continue to be valid before allowing the component template to be updated.
    
    This change also necessitated changes in the tests, however, I have left tests that exercise mapping
    merging with nested object fields as `@AwaitsFix`, as we intend to change the behavior soon to allow
    merging in a recursive-with-replacement fashion (see: elastic#57393). I have added tests that check the new
    disallowing behavior in the meantime.
    dakrone committed Jun 4, 2020
    Configuration menu
    Copy the full SHA
    b393e30 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2020

  1. Configuration menu
    Copy the full SHA
    2646d9c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    53b8b9c View commit details
    Browse the repository at this point in the history
  3. Rename tests

    dakrone committed Jun 8, 2020
    Configuration menu
    Copy the full SHA
    9b30332 View commit details
    Browse the repository at this point in the history
  4. Fix tests

    dakrone committed Jun 8, 2020
    Configuration menu
    Copy the full SHA
    95aa23f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    766b754 View commit details
    Browse the repository at this point in the history