Skip to content

Adjust get alias api with aliases pointing to data streams#73140

Merged
martijnvg merged 1 commit intoelastic:masterfrom
martijnvg:fix_get_alias_api_data_stream_404
May 18, 2021
Merged

Adjust get alias api with aliases pointing to data streams#73140
martijnvg merged 1 commit intoelastic:masterfrom
martijnvg:fix_get_alias_api_data_stream_404

Conversation

@martijnvg
Copy link
Copy Markdown
Member

Change the get alias api to not return a 404 when filtering
by alias name that refers to data streams.

Originated from #72953
Relates to #66163

Change the get alias api to not return a 404 when filtering
by alias name that refers to data streams.

Originated from elastic#72953
Relates to elastic#66163
@martijnvg martijnvg requested a review from danhermann May 17, 2021 09:30
@elasticmachine elasticmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label May 17, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Contributor

@danhermann danhermann left a comment

Choose a reason for hiding this comment

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

LGTM. This does eliminate the 404 when requesting an existing data stream alias. I do see some unexpected behavior in the get alias API when testing this although I do not know if it was introduced in this PR. If I request a specific index alias, it will be returned along with a data stream with "aliases": { }. If I request a specific data stream alias, it is returned along with a regular index with "aliases": { }. I would expect that only indices and/or data streams with matching aliases would be returned if an alias was specified.

@martijnvg
Copy link
Copy Markdown
Member Author

I would expect that only indices and/or data streams with matching aliases would be returned if an alias was specified.

Yes, I expect this as well. This is what #72953 should fix. Only data streams will be returned if these are referred by aliases that match with the requested aliases.

@martijnvg martijnvg merged commit 963c226 into elastic:master May 18, 2021
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request May 18, 2021
Backport elastic#73140 to 7.x branch.

Change the get alias api to not return a 404 when filtering
by alias name that refers to data streams.

Originated from elastic#72953
Relates to elastic#66163
martijnvg added a commit that referenced this pull request May 18, 2021
Backport #73140 to 7.x branch.

Change the get alias api to not return a 404 when filtering
by alias name that refers to data streams.

Originated from #72953
Relates to #66163
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :StorageEngine/Data streams Data streams and their lifecycles Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v7.14.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants