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

[Index Management] Template cannot be created when Create data stream button is switched off #203553

Closed
fake-haris opened this issue Dec 10, 2024 · 1 comment · Fixed by #203552
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@fake-haris
Copy link
Contributor

Kibana version: 8.17.0_BC5

Elasticsearch version: 8.17.0_BC5

Server OS version: Cloud

Browser version: Chrome-latest

Browser OS version: OSX

Original install method (e.g. download page, yum, from source, etc.): BC5 on Cloud

Describe the bug: Found while testing #195174.
Could not create a template when Create data stream is switched off.

Steps to reproduce:

  1. Navigate to index management.
  2. Click Create template button
  3. Fill name and index pattern
  4. Switch Create data stream off
  5. Go to review and click Create template

Expected behavior: Have template successfully created, but got an error.

Image

@fake-haris fake-haris added bug Fixes for quality problems that affect the customer experience Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Dec 10, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@ElenaStoeva ElenaStoeva self-assigned this Dec 10, 2024
ElenaStoeva added a commit that referenced this issue Dec 11, 2024
Fixes #203553

## Summary

This PR fixes the template schema so that the server allows creating a
template with undefined index mode. The issue is that when we exposed
the index mode info in #197874, we
assumed that, by default, the index mode is `standard` so `indexMode`
was added as a required field. However, in
#199521, we added the index mode
field only if data streams toggle is enabled, so the `indexMode` is
`undefined`.

The PR also fixes a smaller issuer where Index mode is displayed even
when it is undefined (when data streams are disabled):
**Before:**
<img width="905" alt="Screenshot 2024-12-10 at 19 01 09"
src="https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43">

**Now:**
<img width="905" alt="Screenshot 2024-12-10 at 18 19 29"
src="https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5">


**How to test:**
1. Go to Index Management -> Index templates and start creating an index
template.
2. Specify the name and the index pattern and disable the "Data streams"
toggle.
3. Go to Review step and verify that index mode is not displayed in the
summary and that creating the index template is successful.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 11, 2024
Fixes elastic#203553

## Summary

This PR fixes the template schema so that the server allows creating a
template with undefined index mode. The issue is that when we exposed
the index mode info in elastic#197874, we
assumed that, by default, the index mode is `standard` so `indexMode`
was added as a required field. However, in
elastic#199521, we added the index mode
field only if data streams toggle is enabled, so the `indexMode` is
`undefined`.

The PR also fixes a smaller issuer where Index mode is displayed even
when it is undefined (when data streams are disabled):
**Before:**
<img width="905" alt="Screenshot 2024-12-10 at 19 01 09"
src="https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43">

**Now:**
<img width="905" alt="Screenshot 2024-12-10 at 18 19 29"
src="https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5">

**How to test:**
1. Go to Index Management -> Index templates and start creating an index
template.
2. Specify the name and the index pattern and disable the "Data streams"
toggle.
3. Go to Review step and verify that index mode is not displayed in the
summary and that creating the index template is successful.

(cherry picked from commit bdc8032)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 11, 2024
Fixes elastic#203553

## Summary

This PR fixes the template schema so that the server allows creating a
template with undefined index mode. The issue is that when we exposed
the index mode info in elastic#197874, we
assumed that, by default, the index mode is `standard` so `indexMode`
was added as a required field. However, in
elastic#199521, we added the index mode
field only if data streams toggle is enabled, so the `indexMode` is
`undefined`.

The PR also fixes a smaller issuer where Index mode is displayed even
when it is undefined (when data streams are disabled):
**Before:**
<img width="905" alt="Screenshot 2024-12-10 at 19 01 09"
src="https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43">

**Now:**
<img width="905" alt="Screenshot 2024-12-10 at 18 19 29"
src="https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5">

**How to test:**
1. Go to Index Management -> Index templates and start creating an index
template.
2. Specify the name and the index pattern and disable the "Data streams"
toggle.
3. Go to Review step and verify that index mode is not displayed in the
summary and that creating the index template is successful.

(cherry picked from commit bdc8032)
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this issue Dec 12, 2024
Fixes elastic#203553

## Summary

This PR fixes the template schema so that the server allows creating a
template with undefined index mode. The issue is that when we exposed
the index mode info in elastic#197874, we
assumed that, by default, the index mode is `standard` so `indexMode`
was added as a required field. However, in
elastic#199521, we added the index mode
field only if data streams toggle is enabled, so the `indexMode` is
`undefined`.

The PR also fixes a smaller issuer where Index mode is displayed even
when it is undefined (when data streams are disabled):
**Before:**
<img width="905" alt="Screenshot 2024-12-10 at 19 01 09"
src="https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43">

**Now:**
<img width="905" alt="Screenshot 2024-12-10 at 18 19 29"
src="https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5">


**How to test:**
1. Go to Index Management -> Index templates and start creating an index
template.
2. Specify the name and the index pattern and disable the "Data streams"
toggle.
3. Go to Review step and verify that index mode is not displayed in the
summary and that creating the index template is successful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants