Skip to content

Check dot-index rules after template application#52087

Merged
AthenaEryma merged 5 commits intoelastic:masterfrom
AthenaEryma:hidden/fix-dot-index-validation
Feb 10, 2020
Merged

Check dot-index rules after template application#52087
AthenaEryma merged 5 commits intoelastic:masterfrom
AthenaEryma:hidden/fix-dot-index-validation

Conversation

@AthenaEryma
Copy link
Copy Markdown
Contributor

Previously, the dot-index rules (namely, that indices with dot-prefixed
names should be either hidden indices or system indices) was done
before* template application, and so only checked for the index.hidden
setting in the request, ignoring if that setting was set via a template.

This commit moves that check to a different method, which is applied
after templates have been resolved and applied to the index settings.

I discovered this while working on #51456 - I noticed that I hadn't removed the .slm-history* entry from the exclusions list without triggering the assert intended to ensure that the exclusions list was updated as necessary.

Previously, the dot-index rules (namely, that indices with dot-prefixed
names should be either hidden indices or system indices) was done
before* template application, and so only checked for the `index.hidden`
setting in the request, ignoring if that setting was set via a template.

This commit moves that check to a different method, which is applied
after templates have been resolved and applied to the index settings.
@AthenaEryma AthenaEryma added >non-issue :Core/Infra/Core Core issues without another label v8.0.0 v7.7.0 labels Feb 7, 2020
@AthenaEryma AthenaEryma requested a review from jaymode February 7, 2020 23:27
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Core)

Copy link
Copy Markdown
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM

@AthenaEryma AthenaEryma merged commit 4dd50f5 into elastic:master Feb 10, 2020
AthenaEryma added a commit to AthenaEryma/elasticsearch that referenced this pull request Feb 10, 2020
Previously, the dot-index rules (namely, that indices with dot-prefixed
names should be either hidden indices or system indices) was done
before* template application, and so only checked for the `index.hidden`
setting in the request, ignoring if that setting was set via a template.

This commit moves that check to a different method, which is applied
after templates have been resolved and applied to the index settings.
AthenaEryma added a commit that referenced this pull request Feb 11, 2020
Previously, the dot-index rules (namely, that indices with dot-prefixed
names should be either hidden indices or system indices) was done
before* template application, and so only checked for the `index.hidden`
setting in the request, ignoring if that setting was set via a template.

This commit moves that check to a different method, which is applied
after templates have been resolved and applied to the index settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants