Skip to content

[Index Management] Improve error messages when editing index settings#119144

Merged
sabarasaba merged 12 commits intoelastic:mainfrom
sabarasaba:IM/improve_error_message_edit_settings
Nov 30, 2021
Merged

[Index Management] Improve error messages when editing index settings#119144
sabarasaba merged 12 commits intoelastic:mainfrom
sabarasaba:IM/improve_error_message_edit_settings

Conversation

@sabarasaba
Copy link
Member

@sabarasaba sabarasaba commented Nov 19, 2021

Fixes #118026

Summary

Currently when there's an error while saving index settings a very non informative error is shown to the user below the JSON editor. Which makes it harder for users to find if the viewport of their screen is narrow. This PR improves this error message by wrapping it in an error callout above the JSON editor and showing the actual error message returned by Elasticsearch instead of just a Bad Request label.

How to test

  1. Start elasticsearch with yarn es snapshot --license=trial
  2. Start kibana with yarn start
  3. Navigate to Stack Management -> Index Management -> open the flyout of any index and go to the Edit settings tab
  4. Set index.routing.allocation.include._tier_preference to "[data_content]"
  5. Verify that clicking the save button will show an error

Screenshots

before/after

// Old version
Screenshot 2021-11-19 at 13 38 34

// Improved error handling
Screenshot 2021-11-19 at 13 06 27
Screenshot 2021-11-19 at 13 06 17

@sabarasaba sabarasaba self-assigned this Nov 19, 2021
@sabarasaba sabarasaba added Feature:Index Management Index and index templates UI release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v8.1.0 enhancement New value added to drive a business result backport:skip This PR does not require backporting labels Nov 19, 2021
@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba sabarasaba marked this pull request as ready for review November 19, 2021 17:21
@sabarasaba sabarasaba requested a review from a team as a code owner November 19, 2021 17:21
@elasticmachine
Copy link
Contributor

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

@sabarasaba sabarasaba requested a review from sebelga November 19, 2021 17:21
@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

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

Tested locally and works great. Great improvement @sabarasaba ! Thanks for enhancing this.
I left a few non blocker comments.

@sabarasaba
Copy link
Member Author

Thanks for having a look @sebelga! I've addressed your points with 848f740

@kibana-ci
Copy link

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexManagement 513.2KB 513.4KB +132.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @sabarasaba

@sabarasaba sabarasaba requested a review from sebelga November 30, 2021 09:35
Copy link
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for making the changes 👍

@sabarasaba sabarasaba merged commit 6d20bf3 into elastic:main Nov 30, 2021
@cuff-links
Copy link
Contributor

cuff-links commented Dec 21, 2021

@sabarasaba Howdy. I think we need this to be backported to to 7.17 and 8.0 since all of the other tests being backported include changes made in this PR.

sabarasaba added a commit to sabarasaba/kibana that referenced this pull request Dec 21, 2021
…elastic#119144)

* Improve error message and start writting tests

* Refactor tests

* Fix tests

* commit using @elastic.co

* Refactor test

* Add documentation

* Fix ts types

* Address CR changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
sabarasaba added a commit to sabarasaba/kibana that referenced this pull request Dec 21, 2021
…elastic#119144)

* Improve error message and start writting tests

* Refactor tests

* Fix tests

* commit using @elastic.co

* Refactor test

* Add documentation

* Fix ts types

* Address CR changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/index_management/__jest__/client_integration/helpers/test_subjects.ts
#	x-pack/plugins/index_management/public/application/sections/home/index_list/detail_panel/edit_settings_json/edit_settings_json.js
sabarasaba added a commit that referenced this pull request Dec 21, 2021
…#119144) (#121723)

* Improve error message and start writting tests

* Refactor tests

* Fix tests

* commit using @elastic.co

* Refactor test

* Add documentation

* Fix ts types

* Address CR changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
sabarasaba added a commit that referenced this pull request Dec 21, 2021
…ettings (#119144) (#121724)

* [Index Management] Improve error messages when editing index settings (#119144)

* Improve error message and start writting tests

* Refactor tests

* Fix tests

* commit using @elastic.co

* Refactor test

* Add documentation

* Fix ts types

* Address CR changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/index_management/__jest__/client_integration/helpers/test_subjects.ts
#	x-pack/plugins/index_management/public/application/sections/home/index_list/detail_panel/edit_settings_json/edit_settings_json.js

* Fix import path
TinLe pushed a commit to TinLe/kibana that referenced this pull request Dec 22, 2021
…elastic#119144)

* Improve error message and start writting tests

* Refactor tests

* Fix tests

* commit using @elastic.co

* Refactor test

* Add documentation

* Fix ts types

* Address CR changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting enhancement New value added to drive a business result Feature:Index Management Index and index templates UI release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit index settings UI fails silently on errors

6 participants