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

[NP] Use local helper shortenDottedString for discover #60271

Merged
merged 5 commits into from
Mar 18, 2020

Conversation

sulemanof
Copy link
Contributor

@sulemanof sulemanof commented Mar 16, 2020

Summary

This removes the shortenDottedString legacy utility, creates a local helper for discover plugin.
Based on this comment, the same utility is used in data plugin as an internal one, but decided not to move it to a common kibana_utils plugin for now, because of limited usage to date.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@sulemanof sulemanof added Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:NP Migration v7.7.0 labels Mar 16, 2020
@sulemanof sulemanof requested review from kertal, lukeelmers and a team March 16, 2020 14:52
@sulemanof sulemanof requested a review from a team as a code owner March 16, 2020 14:52
@elasticmachine
Copy link
Contributor

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

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

Code LGTM, nice cleanup and removal code duplication. tested locally in Chrome, works

Copy link
Member

@lukeelmers lukeelmers left a comment

Choose a reason for hiding this comment

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

I'd like to discuss this further before we merge -- shortenDottedString is a one-line function which (AFAICT) is only used in data and discover.

Recently in #59605 I intentionally made it internal to data so that the app team could migrate it for Discover however you see fit. (@flash1293 and I had a discussion on that in this thread).

Since it has such limited usage to date, I am hesitant to put this in kibana_utils at the moment. I would much prefer to wait and see if it is something that actually gains widespread use before increasing the size (and maintenance burden) of the kibana_utils contract.

@sulemanof sulemanof changed the title [NP] Move shortenDottedString into kibana_utils [NP] Use local helper shortenDottedString for discover Mar 17, 2020
@sulemanof
Copy link
Contributor Author

I'd like to discuss this further before we merge -- shortenDottedString is a one-line function which (AFAICT) is only used in data and discover.

Recently in #59605 I intentionally made it internal to data so that the app team could migrate it for Discover however you see fit. (@flash1293 and I had a discussion on that in this thread).

Since it has such limited usage to date, I am hesitant to put this in kibana_utils at the moment. I would much prefer to wait and see if it is something that actually gains widespread use before increasing the size (and maintenance burden) of the kibana_utils contract.

Thanks for highlighting this!
I've updated the PR to use a local helper for discover for now.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

Copy link
Member

@lukeelmers lukeelmers left a comment

Choose a reason for hiding this comment

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

Thanks @sulemanof!

@sulemanof sulemanof merged commit 2fbf38b into elastic:master Mar 18, 2020
@sulemanof sulemanof deleted the shim/move_shortenDottedString branch March 18, 2020 07:25
sulemanof added a commit to sulemanof/kibana that referenced this pull request Mar 18, 2020
* Move shortenDottedString into kibana_utils

* Move  helper back to data utils

* Use local helper for discover

* Clean up
sulemanof added a commit that referenced this pull request Mar 18, 2020
* Move shortenDottedString into kibana_utils

* Move  helper back to data utils

* Use local helper for discover

* Clean up
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 18, 2020
* master:
  [ML] Re-enabling file upload telemetry (elastic#60418)
  [NP] Use local helper shortenDottedString for discover (elastic#60271)
  [Console] Fix for `_settings` and x-pack autocomplete (elastic#60246)
  Task/host enhancements (elastic#59671)
  [Search service] Asynchronous ES search strategy (elastic#53538)
  Index Action - Moved index params fields to connector config (elastic#60349)
  Edits UI text for ML nodes and job button (elastic#60184)
  Publish getIsNavDrawerLocked$ method on core chrome service. (elastic#60191)
  Disabled edit alert button on management ui for non registered UI alert types (elastic#60439)
  Revert "[Console] Fix bool filter autocompletions and refactor (elastic#60361)"
  [Console] Fix bool filter autocompletions and refactor (elastic#60361)
  Update ingest management team handle (elastic#60457)
  [IM] Use EuiCodeBlock to render index mapping (elastic#60420)
  Add additional safeguards for data source wizard step 2 (elastic#60426)
  [kbn/pm] don't fail when plugins are outside repo (elastic#60164)
  upgrade react-use (elastic#60427)
  Remove link to old settings (elastic#60326)
  Update app arch CODEOWNERS items. (elastic#60396)
  [ML] Fixing custom urls to dashboards (elastic#60355)
  Update the ems-client dependency to 7.7.0 (elastic#59936)
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 19, 2020
…alerting/tls-warning

* 'alerting/tls-warning' of github.com:gmmorris/kibana: (33 commits)
  [ML] Disable functional transform tests
  Fixes to service map single node banner (elastic#60072)
  [Uptime] replace fetch with kibana http (elastic#59881)
  Upgrade @types/node to match Node.js runtime (elastic#60368)
  [License Management] NP migration (elastic#60250)
  Fix create alert button from not showing in alerts list (elastic#60444)
  [SIEM][Case] Update connector through flyout (elastic#60307)
  add data-test-subj where possible on SO management table (elastic#60226)
  Enforce `required` presence for value/key validation of `recordOf` and `mapOf`. (elastic#60406)
  [ML] Re-enabling file upload telemetry (elastic#60418)
  [NP] Use local helper shortenDottedString for discover (elastic#60271)
  [Console] Fix for `_settings` and x-pack autocomplete (elastic#60246)
  Task/host enhancements (elastic#59671)
  [Search service] Asynchronous ES search strategy (elastic#53538)
  Index Action - Moved index params fields to connector config (elastic#60349)
  Edits UI text for ML nodes and job button (elastic#60184)
  Publish getIsNavDrawerLocked$ method on core chrome service. (elastic#60191)
  Disabled edit alert button on management ui for non registered UI alert types (elastic#60439)
  Revert "[Console] Fix bool filter autocompletions and refactor (elastic#60361)"
  [Console] Fix bool filter autocompletions and refactor (elastic#60361)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Feature:NP Migration release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants