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

[Mappings editor] Handle unsupported field types #1

Closed
wants to merge 1 commit into from

Conversation

ElenaStoeva
Copy link
Owner

@ElenaStoeva ElenaStoeva commented Oct 29, 2024

Fixes elastic#197592

Summary

This PR fixes the bug where the index Mappings details page crashes if the index has a mapping field with a type that is not recognized in Kibana.

How to test:

  1. Create the following index in Console:
PUT test
{
  "mappings": {
    "properties": {
      "@timestamp": {
        "type": "date"
      },
      "log": {
        "type": "text"
      },
      "ids": {
        "type": "counted_keyword"
      }
    }
  }
}
  1. Go to Index Management and click on the index that we just created
  2. Go to Mappings page
  3. Verify that the page loads correctly
  4. Check that the opening filter and selecting an option doesn't make the page crash.
Screen.Recording.2024-10-29.at.15.07.28.mov

@ElenaStoeva ElenaStoeva self-assigned this Oct 29, 2024
@ElenaStoeva ElenaStoeva force-pushed the mappings-editor/handle-unsupported-types branch from 4b677e5 to aed02e7 Compare October 29, 2024 15:09
@ElenaStoeva
Copy link
Owner Author

Closing this as it targets the wrong repository. Should target the kibana repo but it is now having issues, so will open a new PR once they are resolved.

ElenaStoeva pushed a commit that referenced this pull request Oct 29, 2024
…95375)

## Summary

Follow-up of elastic#195367
As part of the Sustainable Kibana Architecture initiative, this PR
leverages the mechanisms and concepts introduced in
elastic#194810, updating plugins that
were considered to be solution-specific in Luke's
[PoC](elastic#179710).

This might trigger linting rule violations in CI, and help uncover
conflicts related to forbidden dependencies.
As soon as they are resolved, we can proceed to classify solutions'
plugins.
ElenaStoeva pushed a commit that referenced this pull request Nov 8, 2024
…ted features (elastic#198656)

## Summary

This PR ensures that we don’t expose UI capabilities for deprecated
features since they’re unnecessary, and the code should rely on the UI
capabilities of the replacement features instead.

Additionally, this PR transforms the `disabledFeatures` property of
Space objects returned from our programmatic and HTTP APIs to replace
any deprecated feature IDs with the IDs of their replacement features,
ensuring that feature visibility toggles work for deprecated features as
well.

## How to test

1. Run Kibana FTR server with the following config (registers test
deprecated features):
```shell
node scripts/functional_tests_server.js --config x-pack/test/security_api_integration/features.config.ts
```
2. Once server is up and running create Space with the
`case_1_feature_a` **deprecated** feature disabled:
```shell
curl 'http://localhost:5620/api/spaces/space' -u elastic:changeme \
  -X POST -H 'Content-Type: application/json' -H 'kbn-version: 9.0.0' \
  --data-raw '{"name":"space-alpha","id":"space-alpha","initials":"s","color":"#D6BF57","disabledFeatures":["case_1_feature_a"],"imageUrl":""}'
```
3. Log in to Kibana and [navigate to a Space
`space-alpha`](http://localhost:5620/app/management/kibana/spaces/edit/space-alpha)
you've just created. Observe that deprecated `Case #1 feature A`
(`case_1_feature_a`) isn't displayed, and instead you should see that
replaces deprecated one - `Case #1 feature B` (`case_1_feature_b`):

![Screen Shot 2024-11-01 at 17 40
59](https://github.com/user-attachments/assets/5b91e71c-7d46-4ff1-bf73-d148622e8ec4)

Co-authored-by: Elastic Machine <[email protected]>
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.

[Index Management] Index mappings details page gets broken from an unsupported data type counted_keyword
1 participant