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

Fix empty meta fields input in Advanced Settings #78576

Conversation

kertal
Copy link
Member

@kertal kertal commented Sep 28, 2020

Summary

The advanced settings input array input converted an empty field to an array with a single element ['']. This led to the following in Discover:

  1. Remove all metadata

image

2. Have a look at Discover, there's a unknown field now

image

This PR converts an empty input to an empty array, so this is fixed.

Note: if an advanced setting is already saved with the empty string array, this won't fix it - it has to be manually changed by editing the setting

Fixes #58446

Checklist

@kertal kertal self-assigned this Sep 28, 2020
@kertal kertal added the Feature:Discover Discover Application label Sep 28, 2020
@kertal kertal added release_note:fix :KibanaApp/fix-it-week Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.10.0 v8.0.0 labels Sep 29, 2020
@kertal kertal marked this pull request as ready for review September 29, 2020 15:52
@kertal kertal requested a review from a team September 29, 2020 15:52
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@flash1293
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Tested and this LGTM. Note that if an advanced setting is already saved with the empty string array, this won't fix it - it's just about newly edited settings.

I checked current settings of type array and I don't think it's a valid use case to have a single empty string value for them: context:tieBreakerFields, defaultColumns, metaFields, securitySolution:defaultIndex, xpackDashboardMode:roles

@kertal
Copy link
Member Author

kertal commented Sep 30, 2020

Tested and this LGTM. Note that if an advanced setting is already saved with the empty string array, this won't fix it - it's just about newly edited settings.

This is a good point, adding this to the description of the PR, thx!

I checked current settings of type array and I don't think it's a valid use case to have a single empty string value for them: context:tieBreakerFields, defaultColumns, metaFields, securitySolution:defaultIndex, xpackDashboardMode:role

thx for the investigation!

@kertal
Copy link
Member Author

kertal commented Sep 30, 2020

@elasticmachine merge upstream
seemed to be unrelated flaky

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

async chunks size

id value diff baseline
advancedSettings 891.5KB +51.0B 891.4KB

History

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

@kertal kertal merged commit 0f120aa into elastic:master Sep 30, 2020
kertal added a commit to kertal/kibana that referenced this pull request Sep 30, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Sep 30, 2020
* master: (97 commits)
  [Actions] Adds a "Test Connector" button on the Connectors List to make discovery of the Test tab easier (elastic#78746)
  [Discover] Fix functional time picker test permissions (elastic#78564)
  [ML] Fixing module datafeed overrides (elastic#78925)
  Adds some missing licenses to the CSV export (elastic#78719)
  [dev/cli] ensure plugins/ and all watch source dirs exist (elastic#78973)
  [Lens] Stop using scripted metric to collect telemetry (elastic#78687)
  [Lens] fix wrong message in fields accordion (elastic#78924)
  [Enterprise Search][App Search] Credentials Logic updates (elastic#78644)
  [Monitoring] Disk usage alerting (elastic#75419)
  [SECURITY_SOLUTION] Trusted apps list expand/collapse details (elastic#78601)
  Update content on interstitial page (elastic#78881)
  chore(NA): include hjson as a prod dependency (elastic#78941)
  Fix empty meta fields input in Advanced Settings  (elastic#78576)
  [Lens] Maintain order of operations in dimension panel (elastic#78864)
  Fix plugin doc title (elastic#78880)
  load apm-rum agent lazily (elastic#78760)
  [ML] Skip full ML access permission test
  Optimize charts plugin (elastic#78922)
  ui_actions service initial docs (elastic#78902)
  skip failing suite (elastic#78942)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing Metafields results in undefined field in Discover
4 participants