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

GET _alias/<alias> returns aliases for non-matching data streams #96589

Closed
sorenlouv opened this issue Jun 5, 2023 · 2 comments · Fixed by #104145
Closed

GET _alias/<alias> returns aliases for non-matching data streams #96589

sorenlouv opened this issue Jun 5, 2023 · 2 comments · Fixed by #104145
Assignees
Labels
>bug :Data Management/Data streams Data streams and their lifecycles Team:Data Management Meta label for data/management team

Comments

@sorenlouv
Copy link
Member

sorenlouv commented Jun 5, 2023

Elasticsearch Version

8.9.0-SNAPSHOT

Installed Plugins

No response

Java Version

bundled

OS Version

MacOS 13.2.1 (arm64)

Problem Description

In 8.9.0-SNAPSHOT if a data stream my-data-stream is created and has the alias my-alias it is returned when running GET _alias/foobarbaz*.

My expectation is that only data streams starting with “foobarbaz” should be returned.

Steps to Reproduce

--
# Create index template
PUT _index_template/my-index-template
{
  "index_patterns": ["my-data-stream*"],
  "data_stream": { },
  "priority": 500
}

--
# Create data stream
PUT _data_stream/my-data-stream

--
# Create alias for data stream
POST _aliases
{
  "actions": [
    {
      "add": {
        "index": "my-data-stream",
        "alias": "my-alias"
      }
    }
  ]
}

--
# List aliases
GET _alias/foobarbaz*

This returns:

{
  "my-data-stream": {
    "aliases": {
      "my-alias": {}
    }
  }
}

Logs (if relevant)

No response

@sorenlouv sorenlouv added >bug needs:triage Requires assignment of a team area label labels Jun 5, 2023
@pxsalehi pxsalehi added :Data Management/Data streams Data streams and their lifecycles and removed needs:triage Requires assignment of a team area label labels Jun 6, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Jun 6, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@mattc58
Copy link
Contributor

mattc58 commented Jan 2, 2024

Just tested this on 8.11.3 and can reproduce. I ran the steps in the issue and got this result:

{
  "my-data-stream": {
    "aliases": {
      "my-alias": {}
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Data streams Data streams and their lifecycles Team:Data Management Meta label for data/management team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants