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

Correctly report indices and aliases #757

Merged
merged 4 commits into from
Feb 15, 2021

Conversation

dalthon
Copy link
Contributor

@dalthon dalthon commented Feb 11, 2021

Just a rebased version of #689

@dalthon dalthon force-pushed the bugfix-indexes-and-aliases-inaccurate branch 2 times, most recently from 6c2879e to 79dce04 Compare February 11, 2021 17:32
Copy link
Contributor

@rabotyaga rabotyaga left a comment

Choose a reason for hiding this comment

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

What will happen, if we have UsersIndex & UsersActivitiesIndex?

@dalthon
Copy link
Contributor Author

dalthon commented Feb 11, 2021

@rabotyaga as you guessed correctly it breaks... let me check if I can quickly solve this, otherwise I think it might be good to close this PR

@dalthon dalthon closed this Feb 11, 2021
@dalthon dalthon reopened this Feb 11, 2021
@dalthon dalthon closed this Feb 11, 2021
@dalthon dalthon reopened this Feb 11, 2021
@dalthon dalthon force-pushed the bugfix-indexes-and-aliases-inaccurate branch from 79dce04 to 7edd7ae Compare February 11, 2021 19:54
@dalthon
Copy link
Contributor Author

dalthon commented Feb 11, 2021

@rabotyaga unfortunately we have to rely on something other than name prefix to associate Index class and indexes. This may be done by aliases or perfect name match.

Not every cases are covered, at

# Unfortunatelly, without alias we can't figure out that this dummies_2013 index is related to DummiesIndex
and
# Unfortunatelly, without alias we can't figure out that this dummies_2013 index is related to DummiesIndex
I highlighted cases where, due to the lack of alias, we can't map all indexes.

But I believe that is better to have false positives than false negatives in that unlikely case.

WDYT?

@dalthon dalthon requested a review from rabotyaga February 11, 2021 19:59
@dalthon dalthon force-pushed the bugfix-indexes-and-aliases-inaccurate branch from 9b1ca67 to bca1101 Compare February 12, 2021 08:58
mpeychich and others added 2 commits February 12, 2021 20:35
Improve the reporting on indices and aliases that match index naming.
@rabotyaga rabotyaga force-pushed the bugfix-indexes-and-aliases-inaccurate branch from bca1101 to a815a2d Compare February 12, 2021 17:39
@rabotyaga rabotyaga force-pushed the bugfix-indexes-and-aliases-inaccurate branch from 7b539fe to 2fd5489 Compare February 13, 2021 06:22
cyucelen pushed a commit to cyucelen/chewy that referenced this pull request Jan 28, 2023
* Correctly report indices and aliases
* Fix rubocop offense
* Fix specs & Changelog
* Add `include_type_name` parameter for ES 6.7-6.8 for `client.indices.get` request

Co-authored-by: mpeychich <mpeychich@mac.com>
Co-authored-by: Ivan Rabotyaga <ivan.rabotyaga@toptal.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants