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

[Advanced Settings] Fix defaultIndex setting's default value #170865

Conversation

ElenaStoeva
Copy link
Contributor

@ElenaStoeva ElenaStoeva commented Nov 8, 2023

Fixes #168732

Summary

This PR changes the default value of the defaultIndex setting to an empty string. Previously, the default value was set to null and this was causing a wrong behaviour in the Advanced Settings UI as it expects a string value for the settings of type string.

Before - the "Reset to default" link did not clear the user value:

Screen.Recording.2023-12-08.at.16.08.51.mov

With these changes:

Screen.Recording.2023-12-08.at.16.07.07.mov

@ElenaStoeva ElenaStoeva added Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes labels Nov 8, 2023
@ElenaStoeva ElenaStoeva self-assigned this Nov 8, 2023
@ElenaStoeva
Copy link
Contributor Author

/ci

@ElenaStoeva
Copy link
Contributor Author

/ci

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #24 / serverless search UI Rule details Header should disable the rule

Metrics [docs]

✅ unchanged

History

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

cc @ElenaStoeva

@ElenaStoeva ElenaStoeva marked this pull request as ready for review December 8, 2023 16:31
@ElenaStoeva ElenaStoeva requested review from a team as code owners December 8, 2023 16:31
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

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

Changes look good and work well! Please make sure this gets backported to 8.12

@ElenaStoeva ElenaStoeva added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.12.0 labels Dec 11, 2023
@ElenaStoeva ElenaStoeva merged commit 946b38e into elastic:main Dec 11, 2023
42 checks passed
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.12

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 11, 2023
…#170865)

Fixes elastic#168732

## Summary

This PR changes the default value of the `defaultIndex` setting to an
empty string. Previously, the default value was set to `null` and this
was causing a wrong behaviour in the Advanced Settings UI as it expects
a string value for the settings of type `string`.

**Before - the "Reset to default" link did not clear the user value:**

https://github.com/elastic/kibana/assets/59341489/2c47306b-feac-4e08-bbae-3db7b0a3e5fd

**With these changes:**

https://github.com/elastic/kibana/assets/59341489/dc46caa8-9860-4b66-87ca-9c184c5a8391
(cherry picked from commit 946b38e)
@ElenaStoeva ElenaStoeva deleted the advanced-settings/fix-default-data-view-setting-value branch December 11, 2023 10:17
kibanamachine added a commit that referenced this pull request Dec 11, 2023
…170865) (#173027)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Advanced Settings] Fix defaultIndex setting's default value
(#170865)](#170865)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Elena
Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-11T10:01:01Z","message":"[Advanced
Settings] Fix defaultIndex setting's default value (#170865)\n\nFixes
https://github.com/elastic/kibana/issues/168732\r\n\r\n##
Summary\r\n\r\nThis PR changes the default value of the `defaultIndex`
setting to an\r\nempty string. Previously, the default value was set to
`null` and this\r\nwas causing a wrong behaviour in the Advanced
Settings UI as it expects\r\na string value for the settings of type
`string`.\r\n\r\n**Before - the \"Reset to default\" link did not clear
the user
value:**\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/59341489/2c47306b-feac-4e08-bbae-3db7b0a3e5fd\r\n\r\n\r\n**With
these
changes:**\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/59341489/dc46caa8-9860-4b66-87ca-9c184c5a8391","sha":"946b38ed577ddfccf1fb022d7fa1ff6e9cdd1606","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Kibana
Management","Team:Deployment
Management","release_note:skip","backport:prev-minor","v8.12.0","v8.13.0"],"number":170865,"url":"https://github.com/elastic/kibana/pull/170865","mergeCommit":{"message":"[Advanced
Settings] Fix defaultIndex setting's default value (#170865)\n\nFixes
https://github.com/elastic/kibana/issues/168732\r\n\r\n##
Summary\r\n\r\nThis PR changes the default value of the `defaultIndex`
setting to an\r\nempty string. Previously, the default value was set to
`null` and this\r\nwas causing a wrong behaviour in the Advanced
Settings UI as it expects\r\na string value for the settings of type
`string`.\r\n\r\n**Before - the \"Reset to default\" link did not clear
the user
value:**\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/59341489/2c47306b-feac-4e08-bbae-3db7b0a3e5fd\r\n\r\n\r\n**With
these
changes:**\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/59341489/dc46caa8-9860-4b66-87ca-9c184c5a8391","sha":"946b38ed577ddfccf1fb022d7fa1ff6e9cdd1606"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/170865","number":170865,"mergeCommit":{"message":"[Advanced
Settings] Fix defaultIndex setting's default value (#170865)\n\nFixes
https://github.com/elastic/kibana/issues/168732\r\n\r\n##
Summary\r\n\r\nThis PR changes the default value of the `defaultIndex`
setting to an\r\nempty string. Previously, the default value was set to
`null` and this\r\nwas causing a wrong behaviour in the Advanced
Settings UI as it expects\r\na string value for the settings of type
`string`.\r\n\r\n**Before - the \"Reset to default\" link did not clear
the user
value:**\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/59341489/2c47306b-feac-4e08-bbae-3db7b0a3e5fd\r\n\r\n\r\n**With
these
changes:**\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/59341489/dc46caa8-9860-4b66-87ca-9c184c5a8391","sha":"946b38ed577ddfccf1fb022d7fa1ff6e9cdd1606"}}]}]
BACKPORT-->

Co-authored-by: Elena Stoeva <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages 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 v8.12.0 v8.13.0
Projects
None yet
5 participants