Skip to content

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Feb 13, 2025

This commit adds the index_mode for both the data stream and each backing index to the output of GET /_data_stream. An example looks like:

{
  "data_streams" : [
    {
      "name" : "foo-things",
      "indices" : [
        {
          "index_name" : ".ds-foo-things-2025.02.13-000001",
          ...
          "index_mode" : "standard"
        }
      ],
      ...
      "index_mode" : "standard"
    },
    {
      "name" : "logs-foo-bar",
      "indices" : [
        {
          "index_name" : ".ds-logs-foo-bar-2025.02.13-000001",
          ...
          "index_mode" : "logsdb"
        },
        {
          "index_name" : ".ds-logs-foo-bar-2025.02.13-000002",
          ...
          "index_mode" : "logsdb"
        }
      ],
      ...
      "index_mode" : "logsdb",
    }
  ]
}

This commit adds the `index_mode` for both the data stream and each backing index to the output of
`GET /_data_stream`. An example looks like:

```
{
  "data_streams" : [
    {
      "name" : "foo-things",
      "indices" : [
        {
          "index_name" : ".ds-foo-things-2025.02.13-000001",
          ...
          "index_mode" : "standard"
        }
      ],
      ...
      "index_mode" : "standard"
    },
    {
      "name" : "logs-foo-bar",
      "indices" : [
        {
          "index_name" : ".ds-logs-foo-bar-2025.02.13-000001",
          ...
          "index_mode" : "logsdb"
        },
        {
          "index_name" : ".ds-logs-foo-bar-2025.02.13-000002",
          ...
          "index_mode" : "logsdb"
        }
      ],
      ...
      "index_mode" : "logsdb",
    }
  ]
}
```
Copy link
Contributor

Warning

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

Copy link
Contributor

Documentation preview:

@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine added Team:Data Management Meta label for data/management team v9.1.0 labels Feb 13, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @dakrone, I've created a changelog YAML for you.

Copy link
Contributor

Warning

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

@dakrone dakrone removed the v9.0.1 label Feb 13, 2025
Copy link
Contributor

Warning

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

Copy link
Contributor

Warning

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

Copy link
Contributor

Warning

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

Copy link
Contributor

@samxbr samxbr left a comment

Choose a reason for hiding this comment

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

LGTM, just some questions and minor comments.

Comment on lines +345 to +346
// Default to standard mode if not specified; should we set this to "unset" or "unspecified" instead?
indexMode == null ? IndexMode.STANDARD.getName() : indexMode.getName()
Copy link
Contributor

Choose a reason for hiding this comment

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

If the indexMode can't be resolved here, does it imply that it must have fell back to the default STANDARD mode or is it possible that it could be something else but just can't be found? If it's the prior then STANDARD seems fine. Though it would be better if the "fall back to STANDARD mode" logic is already reusable from somewhere else than here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is the paranoid case for when we can't resolve it from the data stream template. I can only think of when a data stream gets restored from a snapshot without a template (so we wouldn't be able to resolve anything).

);
var rawMode = addlSettinsg.get(IndexSettings.MODE.getKey());
if (rawMode != null) {
indexMode = Enum.valueOf(IndexMode.class, rawMode.toUpperCase(Locale.ROOT));
Copy link
Contributor

Choose a reason for hiding this comment

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

For my curiosity, why do we favor the value in settings provider over the index template?

Copy link
Member Author

@dakrone dakrone Feb 20, 2025

Choose a reason for hiding this comment

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

The settings provider can override settings at index creation time (it essentially has higher precedence over the template(s))

Copy link
Contributor

Warning

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

Copy link
Contributor

Warning

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

Copy link
Contributor

Warning

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

georgewallace pushed a commit to georgewallace/elasticsearch that referenced this pull request Mar 11, 2025
This commit adds the `index_mode` for both the data stream and each
backing index to the output of `GET /_data_stream`. An example looks
like:

```
{
  "data_streams" : [
    {
      "name" : "foo-things",
      "indices" : [
        {
          "index_name" : ".ds-foo-things-2025.02.13-000001",
          ...
          "index_mode" : "standard"
        }
      ],
      ...
      "index_mode" : "standard"
    },
    {
      "name" : "logs-foo-bar",
      "indices" : [
        {
          "index_name" : ".ds-logs-foo-bar-2025.02.13-000001",
          ...
          "index_mode" : "logsdb"
        },
        {
          "index_name" : ".ds-logs-foo-bar-2025.02.13-000002",
          ...
          "index_mode" : "logsdb"
        }
      ],
      ...
      "index_mode" : "logsdb",
    }
  ]
}
```
pquentin added a commit to elastic/elasticsearch-specification that referenced this pull request Mar 14, 2025
* Add the index mode to the output of get-data-stream API.

Relates to elastic/elasticsearch#122486

* Run make contrib

---------

Co-authored-by: Quentin Pradet <[email protected]>
ElenaStoeva added a commit to elastic/kibana that referenced this pull request Apr 16, 2025
Fixes #208671

## Summary

Before this PR, the displayed index mode of the data streams was
determined based on the index mode of the associated index template.
However, the index mode can also be set through the component template,
so that logic is not reliable and can cause incorrectly displayed index
mode like described in #208671.

In this PR, we replace this logic with the recently added `index_mode`
field to the Es Get Data Streams API (see
elastic/elasticsearch#122486).

**How to test:**
1. Create a component template with a LogsDB index mode (you can also
test with other index modes):
```
PUT _component_template/my-component-template
{
  "template": {
    "settings": {
      "index": {
        "mode": "logsdb"
      }
    }
  }
}
```
2. Create an index template that is composed of the component template
above:
```
PUT _index_template/my-index-template
{
  "index_patterns": [
    "my-ds-*"
  ],
  "data_stream": {},
  "composed_of": [
    "my-component-template"
  ]
}
```
3. Create a data stream that matched the index pattern from the index
template above:
```
PUT _data_stream/my-ds-1
```
4. Go to the data streams table and verify that the index mode is
displayed correctly in the table.

<img width="1165" alt="Screenshot 2025-03-24 at 18 12 04"
src="https://github.com/user-attachments/assets/ea211c14-3d03-49c7-ace7-88b15e294d1f"
/>


5. Click on the created data stream and verify that the displayed index
mode in the details panel is correct:

<img width="1165" alt="Screenshot 2025-03-06 at 14 36 12"
src="https://github.com/user-attachments/assets/954864e2-ae2a-4cb8-9eef-2c5f8b417f52"
/>

---------

Co-authored-by: Elastic Machine <[email protected]>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request Apr 17, 2025
Fixes elastic#208671

## Summary

Before this PR, the displayed index mode of the data streams was
determined based on the index mode of the associated index template.
However, the index mode can also be set through the component template,
so that logic is not reliable and can cause incorrectly displayed index
mode like described in elastic#208671.

In this PR, we replace this logic with the recently added `index_mode`
field to the Es Get Data Streams API (see
elastic/elasticsearch#122486).

**How to test:**
1. Create a component template with a LogsDB index mode (you can also
test with other index modes):
```
PUT _component_template/my-component-template
{
  "template": {
    "settings": {
      "index": {
        "mode": "logsdb"
      }
    }
  }
}
```
2. Create an index template that is composed of the component template
above:
```
PUT _index_template/my-index-template
{
  "index_patterns": [
    "my-ds-*"
  ],
  "data_stream": {},
  "composed_of": [
    "my-component-template"
  ]
}
```
3. Create a data stream that matched the index pattern from the index
template above:
```
PUT _data_stream/my-ds-1
```
4. Go to the data streams table and verify that the index mode is
displayed correctly in the table.

<img width="1165" alt="Screenshot 2025-03-24 at 18 12 04"
src="https://github.com/user-attachments/assets/ea211c14-3d03-49c7-ace7-88b15e294d1f"
/>


5. Click on the created data stream and verify that the displayed index
mode in the details panel is correct:

<img width="1165" alt="Screenshot 2025-03-06 at 14 36 12"
src="https://github.com/user-attachments/assets/954864e2-ae2a-4cb8-9eef-2c5f8b417f52"
/>

---------

Co-authored-by: Elastic Machine <[email protected]>
@dakrone dakrone added v8.19.0 and removed v8.19.0 labels May 15, 2025
@dakrone
Copy link
Member Author

dakrone commented May 19, 2025

💚 All backports created successfully

Status Branch Result
8.19

Questions ?

Please refer to the Backport tool documentation

dakrone added a commit to dakrone/elasticsearch that referenced this pull request May 19, 2025
This commit adds the `index_mode` for both the data stream and each
backing index to the output of `GET /_data_stream`. An example looks
like:

```
{
  "data_streams" : [
    {
      "name" : "foo-things",
      "indices" : [
        {
          "index_name" : ".ds-foo-things-2025.02.13-000001",
          ...
          "index_mode" : "standard"
        }
      ],
      ...
      "index_mode" : "standard"
    },
    {
      "name" : "logs-foo-bar",
      "indices" : [
        {
          "index_name" : ".ds-logs-foo-bar-2025.02.13-000001",
          ...
          "index_mode" : "logsdb"
        },
        {
          "index_name" : ".ds-logs-foo-bar-2025.02.13-000002",
          ...
          "index_mode" : "logsdb"
        }
      ],
      ...
      "index_mode" : "logsdb",
    }
  ]
}
```

(cherry picked from commit 47706b5)

# Conflicts:
#	docs/reference/indices/get-data-stream.asciidoc
#	server/src/main/java/org/elasticsearch/TransportVersions.java
#	server/src/main/java/org/elasticsearch/action/datastreams/GetDataStreamAction.java
#	server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateService.java
#	x-pack/plugin/logsdb/src/main/java/org/elasticsearch/xpack/logsdb/LogsdbIndexModeSettingsProvider.java
#	x-pack/plugin/logsdb/src/test/java/org/elasticsearch/xpack/logsdb/LogsdbIndexModeSettingsProviderTests.java
elasticsearchmachine pushed a commit that referenced this pull request May 20, 2025
* Add index mode to get data stream API (#122486)

This commit adds the `index_mode` for both the data stream and each
backing index to the output of `GET /_data_stream`. An example looks
like:

```
{
  "data_streams" : [
    {
      "name" : "foo-things",
      "indices" : [
        {
          "index_name" : ".ds-foo-things-2025.02.13-000001",
          ...
          "index_mode" : "standard"
        }
      ],
      ...
      "index_mode" : "standard"
    },
    {
      "name" : "logs-foo-bar",
      "indices" : [
        {
          "index_name" : ".ds-logs-foo-bar-2025.02.13-000001",
          ...
          "index_mode" : "logsdb"
        },
        {
          "index_name" : ".ds-logs-foo-bar-2025.02.13-000002",
          ...
          "index_mode" : "logsdb"
        }
      ],
      ...
      "index_mode" : "logsdb",
    }
  ]
}
```

(cherry picked from commit 47706b5)

# Conflicts:
#	docs/reference/indices/get-data-stream.asciidoc
#	server/src/main/java/org/elasticsearch/TransportVersions.java
#	server/src/main/java/org/elasticsearch/action/datastreams/GetDataStreamAction.java
#	server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateService.java
#	x-pack/plugin/logsdb/src/main/java/org/elasticsearch/xpack/logsdb/LogsdbIndexModeSettingsProvider.java
#	x-pack/plugin/logsdb/src/test/java/org/elasticsearch/xpack/logsdb/LogsdbIndexModeSettingsProviderTests.java

* Fix compilation for backport

* Fix docs
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 21, 2025
Fixes elastic#208671

## Summary

Before this PR, the displayed index mode of the data streams was
determined based on the index mode of the associated index template.
However, the index mode can also be set through the component template,
so that logic is not reliable and can cause incorrectly displayed index
mode like described in elastic#208671.

In this PR, we replace this logic with the recently added `index_mode`
field to the Es Get Data Streams API (see
elastic/elasticsearch#122486).

**How to test:**
1. Create a component template with a LogsDB index mode (you can also
test with other index modes):
```
PUT _component_template/my-component-template
{
  "template": {
    "settings": {
      "index": {
        "mode": "logsdb"
      }
    }
  }
}
```
2. Create an index template that is composed of the component template
above:
```
PUT _index_template/my-index-template
{
  "index_patterns": [
    "my-ds-*"
  ],
  "data_stream": {},
  "composed_of": [
    "my-component-template"
  ]
}
```
3. Create a data stream that matched the index pattern from the index
template above:
```
PUT _data_stream/my-ds-1
```
4. Go to the data streams table and verify that the index mode is
displayed correctly in the table.

<img width="1165" alt="Screenshot 2025-03-24 at 18 12 04"
src="https://github.com/user-attachments/assets/ea211c14-3d03-49c7-ace7-88b15e294d1f"
/>

5. Click on the created data stream and verify that the displayed index
mode in the details panel is correct:

<img width="1165" alt="Screenshot 2025-03-06 at 14 36 12"
src="https://github.com/user-attachments/assets/954864e2-ae2a-4cb8-9eef-2c5f8b417f52"
/>

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit dec6a17)
kibanamachine added a commit to elastic/kibana that referenced this pull request May 21, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [[Data Streams] Fix displayed index mode
(#215683)](#215683)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Elena
Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-04-16T13:09:33Z","message":"[Data
Streams] Fix displayed index mode (#215683)\n\nFixes
https://github.com/elastic/kibana/issues/208671\n\n## Summary\n\nBefore
this PR, the displayed index mode of the data streams was\ndetermined
based on the index mode of the associated index template.\nHowever, the
index mode can also be set through the component template,\nso that
logic is not reliable and can cause incorrectly displayed index\nmode
like described in https://github.com/elastic/kibana/issues/208671.\n\nIn
this PR, we replace this logic with the recently added
`index_mode`\nfield to the Es Get Data Streams API
(see\nhttps://github.com/elastic/elasticsearch/pull/122486).\n\n**How to
test:**\n1. Create a component template with a LogsDB index mode (you
can also\ntest with other index modes):\n```\nPUT
_component_template/my-component-template\n{\n \"template\": {\n
\"settings\": {\n \"index\": {\n \"mode\": \"logsdb\"\n }\n }\n
}\n}\n```\n2. Create an index template that is composed of the component
template\nabove:\n```\nPUT _index_template/my-index-template\n{\n
\"index_patterns\": [\n \"my-ds-*\"\n ],\n \"data_stream\": {},\n
\"composed_of\": [\n \"my-component-template\"\n ]\n}\n```\n3. Create a
data stream that matched the index pattern from the index\ntemplate
above:\n```\nPUT _data_stream/my-ds-1\n```\n4. Go to the data streams
table and verify that the index mode is\ndisplayed correctly in the
table.\n\n<img width=\"1165\" alt=\"Screenshot 2025-03-24 at 18 12
04\"\nsrc=\"https://github.com/user-attachments/assets/ea211c14-3d03-49c7-ace7-88b15e294d1f\"\n/>\n\n\n5.
Click on the created data stream and verify that the displayed
index\nmode in the details panel is correct:\n\n<img width=\"1165\"
alt=\"Screenshot 2025-03-06 at 14 36
12\"\nsrc=\"https://github.com/user-attachments/assets/954864e2-ae2a-4cb8-9eef-2c5f8b417f52\"\n/>\n\n---------\n\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"dec6a17ec02ffea5669ffcf8431009aef1e99cfa","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana
Management","release_note:skip","backport:version","v9.1.0","v8.19.0"],"title":"[Data
Streams] Fix displayed index
mode","number":215683,"url":"https://github.com/elastic/kibana/pull/215683","mergeCommit":{"message":"[Data
Streams] Fix displayed index mode (#215683)\n\nFixes
https://github.com/elastic/kibana/issues/208671\n\n## Summary\n\nBefore
this PR, the displayed index mode of the data streams was\ndetermined
based on the index mode of the associated index template.\nHowever, the
index mode can also be set through the component template,\nso that
logic is not reliable and can cause incorrectly displayed index\nmode
like described in https://github.com/elastic/kibana/issues/208671.\n\nIn
this PR, we replace this logic with the recently added
`index_mode`\nfield to the Es Get Data Streams API
(see\nhttps://github.com/elastic/elasticsearch/pull/122486).\n\n**How to
test:**\n1. Create a component template with a LogsDB index mode (you
can also\ntest with other index modes):\n```\nPUT
_component_template/my-component-template\n{\n \"template\": {\n
\"settings\": {\n \"index\": {\n \"mode\": \"logsdb\"\n }\n }\n
}\n}\n```\n2. Create an index template that is composed of the component
template\nabove:\n```\nPUT _index_template/my-index-template\n{\n
\"index_patterns\": [\n \"my-ds-*\"\n ],\n \"data_stream\": {},\n
\"composed_of\": [\n \"my-component-template\"\n ]\n}\n```\n3. Create a
data stream that matched the index pattern from the index\ntemplate
above:\n```\nPUT _data_stream/my-ds-1\n```\n4. Go to the data streams
table and verify that the index mode is\ndisplayed correctly in the
table.\n\n<img width=\"1165\" alt=\"Screenshot 2025-03-24 at 18 12
04\"\nsrc=\"https://github.com/user-attachments/assets/ea211c14-3d03-49c7-ace7-88b15e294d1f\"\n/>\n\n\n5.
Click on the created data stream and verify that the displayed
index\nmode in the details panel is correct:\n\n<img width=\"1165\"
alt=\"Screenshot 2025-03-06 at 14 36
12\"\nsrc=\"https://github.com/user-attachments/assets/954864e2-ae2a-4cb8-9eef-2c5f8b417f52\"\n/>\n\n---------\n\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"dec6a17ec02ffea5669ffcf8431009aef1e99cfa"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/215683","number":215683,"mergeCommit":{"message":"[Data
Streams] Fix displayed index mode (#215683)\n\nFixes
https://github.com/elastic/kibana/issues/208671\n\n## Summary\n\nBefore
this PR, the displayed index mode of the data streams was\ndetermined
based on the index mode of the associated index template.\nHowever, the
index mode can also be set through the component template,\nso that
logic is not reliable and can cause incorrectly displayed index\nmode
like described in https://github.com/elastic/kibana/issues/208671.\n\nIn
this PR, we replace this logic with the recently added
`index_mode`\nfield to the Es Get Data Streams API
(see\nhttps://github.com/elastic/elasticsearch/pull/122486).\n\n**How to
test:**\n1. Create a component template with a LogsDB index mode (you
can also\ntest with other index modes):\n```\nPUT
_component_template/my-component-template\n{\n \"template\": {\n
\"settings\": {\n \"index\": {\n \"mode\": \"logsdb\"\n }\n }\n
}\n}\n```\n2. Create an index template that is composed of the component
template\nabove:\n```\nPUT _index_template/my-index-template\n{\n
\"index_patterns\": [\n \"my-ds-*\"\n ],\n \"data_stream\": {},\n
\"composed_of\": [\n \"my-component-template\"\n ]\n}\n```\n3. Create a
data stream that matched the index pattern from the index\ntemplate
above:\n```\nPUT _data_stream/my-ds-1\n```\n4. Go to the data streams
table and verify that the index mode is\ndisplayed correctly in the
table.\n\n<img width=\"1165\" alt=\"Screenshot 2025-03-24 at 18 12
04\"\nsrc=\"https://github.com/user-attachments/assets/ea211c14-3d03-49c7-ace7-88b15e294d1f\"\n/>\n\n\n5.
Click on the created data stream and verify that the displayed
index\nmode in the details panel is correct:\n\n<img width=\"1165\"
alt=\"Screenshot 2025-03-06 at 14 36
12\"\nsrc=\"https://github.com/user-attachments/assets/954864e2-ae2a-4cb8-9eef-2c5f8b417f52\"\n/>\n\n---------\n\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"dec6a17ec02ffea5669ffcf8431009aef1e99cfa"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elena Stoeva <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
Fixes elastic#208671

## Summary

Before this PR, the displayed index mode of the data streams was
determined based on the index mode of the associated index template.
However, the index mode can also be set through the component template,
so that logic is not reliable and can cause incorrectly displayed index
mode like described in elastic#208671.

In this PR, we replace this logic with the recently added `index_mode`
field to the Es Get Data Streams API (see
elastic/elasticsearch#122486).

**How to test:**
1. Create a component template with a LogsDB index mode (you can also
test with other index modes):
```
PUT _component_template/my-component-template
{
  "template": {
    "settings": {
      "index": {
        "mode": "logsdb"
      }
    }
  }
}
```
2. Create an index template that is composed of the component template
above:
```
PUT _index_template/my-index-template
{
  "index_patterns": [
    "my-ds-*"
  ],
  "data_stream": {},
  "composed_of": [
    "my-component-template"
  ]
}
```
3. Create a data stream that matched the index pattern from the index
template above:
```
PUT _data_stream/my-ds-1
```
4. Go to the data streams table and verify that the index mode is
displayed correctly in the table.

<img width="1165" alt="Screenshot 2025-03-24 at 18 12 04"
src="https://github.com/user-attachments/assets/ea211c14-3d03-49c7-ace7-88b15e294d1f"
/>


5. Click on the created data stream and verify that the displayed index
mode in the details panel is correct:

<img width="1165" alt="Screenshot 2025-03-06 at 14 36 12"
src="https://github.com/user-attachments/assets/954864e2-ae2a-4cb8-9eef-2c5f8b417f52"
/>

---------

Co-authored-by: Elastic Machine <[email protected]>
ElenaStoeva added a commit to elastic/kibana that referenced this pull request Jun 10, 2025
Fixes #221224

## Summary

This PR fixes the forward-compatibility test for index mode, which
failed because the index mode was added to Get Data Streams API in 8.19
and 9.1 (see elastic/elasticsearch#122486), so
if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as
"Standard" because Es doesn't return an index mode field.

In this PR, we separate all index mode-related tests into a separate
file, and only run it for Es versions 8.19 or 9.1+.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 10, 2025
Fixes elastic#221224

## Summary

This PR fixes the forward-compatibility test for index mode, which
failed because the index mode was added to Get Data Streams API in 8.19
and 9.1 (see elastic/elasticsearch#122486), so
if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as
"Standard" because Es doesn't return an index mode field.

In this PR, we separate all index mode-related tests into a separate
file, and only run it for Es versions 8.19 or 9.1+.

(cherry picked from commit d12b196)
kibanamachine added a commit to elastic/kibana that referenced this pull request Jun 10, 2025
… (#223226)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Data Streams] Fix forward-compatibility test failures
(#223129)](#223129)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Elena
Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-06-10T12:38:54Z","message":"[Data
Streams] Fix forward-compatibility test failures (#223129)\n\nFixes
https://github.com/elastic/kibana/issues/221224\n\n## Summary\n\nThis PR
fixes the forward-compatibility test for index mode, which\nfailed
because the index mode was added to Get Data Streams API in 8.19\nand
9.1 (see elastic/elasticsearch#122486), so\nif
Kibana 8.19 is run with Es 9.0, the index mode is always displayed
as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn
this PR, we separate all index mode-related tests into a separate\nfile,
and only run it for Es versions 8.19 or
9.1+.","sha":"d12b19608af35df7ad1c3b38371819b90c926676","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana
Management","release_note:skip","backport:version","v9.1.0","v8.19.0"],"title":"[Data
Streams] Fix forward-compatibility test
failures","number":223129,"url":"https://github.com/elastic/kibana/pull/223129","mergeCommit":{"message":"[Data
Streams] Fix forward-compatibility test failures (#223129)\n\nFixes
https://github.com/elastic/kibana/issues/221224\n\n## Summary\n\nThis PR
fixes the forward-compatibility test for index mode, which\nfailed
because the index mode was added to Get Data Streams API in 8.19\nand
9.1 (see elastic/elasticsearch#122486), so\nif
Kibana 8.19 is run with Es 9.0, the index mode is always displayed
as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn
this PR, we separate all index mode-related tests into a separate\nfile,
and only run it for Es versions 8.19 or
9.1+.","sha":"d12b19608af35df7ad1c3b38371819b90c926676"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223129","number":223129,"mergeCommit":{"message":"[Data
Streams] Fix forward-compatibility test failures (#223129)\n\nFixes
https://github.com/elastic/kibana/issues/221224\n\n## Summary\n\nThis PR
fixes the forward-compatibility test for index mode, which\nfailed
because the index mode was added to Get Data Streams API in 8.19\nand
9.1 (see elastic/elasticsearch#122486), so\nif
Kibana 8.19 is run with Es 9.0, the index mode is always displayed
as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn
this PR, we separate all index mode-related tests into a separate\nfile,
and only run it for Es versions 8.19 or
9.1+.","sha":"d12b19608af35df7ad1c3b38371819b90c926676"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elena Stoeva <[email protected]>
pmuellr pushed a commit to pmuellr/kibana that referenced this pull request Jun 11, 2025
Fixes elastic#221224

## Summary

This PR fixes the forward-compatibility test for index mode, which
failed because the index mode was added to Get Data Streams API in 8.19
and 9.1 (see elastic/elasticsearch#122486), so
if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as
"Standard" because Es doesn't return an index mode field.

In this PR, we separate all index mode-related tests into a separate
file, and only run it for Es versions 8.19 or 9.1+.
nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Jun 12, 2025
Fixes elastic#221224

## Summary

This PR fixes the forward-compatibility test for index mode, which
failed because the index mode was added to Get Data Streams API in 8.19
and 9.1 (see elastic/elasticsearch#122486), so
if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as
"Standard" because Es doesn't return an index mode field.

In this PR, we separate all index mode-related tests into a separate
file, and only run it for Es versions 8.19 or 9.1+.
iblancof pushed a commit to iblancof/kibana that referenced this pull request Jun 16, 2025
Fixes elastic#221224

## Summary

This PR fixes the forward-compatibility test for index mode, which
failed because the index mode was added to Get Data Streams API in 8.19
and 9.1 (see elastic/elasticsearch#122486), so
if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as
"Standard" because Es doesn't return an index mode field.

In this PR, we separate all index mode-related tests into a separate
file, and only run it for Es versions 8.19 or 9.1+.
SoniaSanzV added a commit to elastic/kibana that referenced this pull request Jun 25, 2025
Fixes #223990

## Summary

This PR fixes the forward-compatibility test for index mode, which
failed because the index mode was added to Get Data Streams API in 8.19
and 9.1 (see elastic/elasticsearch#122486), so
if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as
"Standard" because Es doesn't return an index mode field.

In this PR, we separate all index mode-related tests into a separate
file, and only run it for Es versions 8.19 or 9.1+.

This was also fixed for functional tests in
#223129

---------

Co-authored-by: kibanamachine <[email protected]>
SoniaSanzV added a commit to SoniaSanzV/kibana that referenced this pull request Jun 27, 2025
…24795)

Fixes elastic#223990

## Summary

This PR fixes the forward-compatibility test for index mode, which
failed because the index mode was added to Get Data Streams API in 8.19
and 9.1 (see elastic/elasticsearch#122486), so
if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as
"Standard" because Es doesn't return an index mode field.

In this PR, we separate all index mode-related tests into a separate
file, and only run it for Es versions 8.19 or 9.1+.

This was also fixed for functional tests in
elastic#223129

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 493ca9f)

# Conflicts:
#	x-pack/platform/test/api_integration/apis/management/index_management/data_streams.ts
SoniaSanzV added a commit to elastic/kibana that referenced this pull request Jul 2, 2025
…24795) (#225641)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Data Streams] Fix forward-compatibility api test failures
(#224795)](#224795)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Sonia Sanz
Vivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-06-25T11:55:46Z","message":"[Data
Streams] Fix forward-compatibility api test failures (#224795)\n\nFixes
https://github.com/elastic/kibana/issues/223990\n\n## Summary\n\nThis PR
fixes the forward-compatibility test for index mode, which\nfailed
because the index mode was added to Get Data Streams API in 8.19\nand
9.1 (see elastic/elasticsearch#122486), so\nif
Kibana 8.19 is run with Es 9.0, the index mode is always displayed
as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn
this PR, we separate all index mode-related tests into a separate\nfile,
and only run it for Es versions 8.19 or 9.1+.\n\nThis was also fixed for
functional tests
in\nhttps://github.com//pull/223129\n\n---------\n\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"493ca9f1061ab1e451741c6875107d8d16953d23","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana Management","release_note:skip","backport
missing","backport:version","v9.1.0","v8.19.0"],"title":"[Data Streams]
Fix forward-compatibility api test
failures","number":224795,"url":"https://github.com/elastic/kibana/pull/224795","mergeCommit":{"message":"[Data
Streams] Fix forward-compatibility api test failures (#224795)\n\nFixes
https://github.com/elastic/kibana/issues/223990\n\n## Summary\n\nThis PR
fixes the forward-compatibility test for index mode, which\nfailed
because the index mode was added to Get Data Streams API in 8.19\nand
9.1 (see elastic/elasticsearch#122486), so\nif
Kibana 8.19 is run with Es 9.0, the index mode is always displayed
as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn
this PR, we separate all index mode-related tests into a separate\nfile,
and only run it for Es versions 8.19 or 9.1+.\n\nThis was also fixed for
functional tests
in\nhttps://github.com//pull/223129\n\n---------\n\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"493ca9f1061ab1e451741c6875107d8d16953d23"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224795","number":224795,"mergeCommit":{"message":"[Data
Streams] Fix forward-compatibility api test failures (#224795)\n\nFixes
https://github.com/elastic/kibana/issues/223990\n\n## Summary\n\nThis PR
fixes the forward-compatibility test for index mode, which\nfailed
because the index mode was added to Get Data Streams API in 8.19\nand
9.1 (see elastic/elasticsearch#122486), so\nif
Kibana 8.19 is run with Es 9.0, the index mode is always displayed
as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn
this PR, we separate all index mode-related tests into a separate\nfile,
and only run it for Es versions 8.19 or 9.1+.\n\nThis was also fixed for
functional tests
in\nhttps://github.com//pull/223129\n\n---------\n\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"493ca9f1061ab1e451741c6875107d8d16953d23"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: Damian Polewski <[email protected]>
Co-authored-by: Damian Polewski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport pending :Data Management/Data streams Data streams and their lifecycles >enhancement Team:Data Management Meta label for data/management team v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants