Skip to content

Conversation

@mshustov
Copy link
Contributor

@mshustov mshustov commented Oct 27, 2020

Summary

Global typings create an implicit dependency on environment. This PR refactors the global types:

  • PublicMethodsOf, MethodKeysOf, Writable aren't global anymore and should be imported from @kbn/utility-types.
  • DeeplyMockedKeys , MockedKeys aren't global anymore (it overlaps with mocha types) and should be imported from @kbn/utility-types/jest.

Note that I didn't remove global type augmentation in typings/ folder.

Plugin API changes

We reduced number of global types:

  • PublicMethodsOf, MethodKeysOf, Writable should be imported from @kbn/utility-types.
  • DeeplyMockedKeys , MockedKeys should be imported from @kbn/utility-types/jest.

@mshustov mshustov added chore Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v8.0.0 v7.11.0 labels Oct 27, 2020
@mshustov mshustov marked this pull request as ready for review October 27, 2020 13:24
@mshustov mshustov requested review from a team as code owners October 27, 2020 13:24
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@mshustov mshustov added the release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. label Oct 27, 2020
Copy link
Member

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

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

Security/Spaces/ESO plugins changes LGTM.

* you may not use this file except in compliance with the Elastic License.
*/
import * as Rx from 'rxjs';
import type { Writable } from '@kbn/utility-types';
Copy link
Member

Choose a reason for hiding this comment

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

note: TIL import type, nice!

Copy link
Contributor

@mikecote mikecote left a comment

Choose a reason for hiding this comment

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

Alerting team related code LGTM

@mshustov mshustov requested a review from a team October 27, 2020 13:43
Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Change to Index Management test mock LGTM.

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

Thank you!

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.

App arch code change LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

distributable file count

id before after diff
default 48110 48109 -1
oss 28593 28592 -1

History

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

@mshustov mshustov merged commit 2782204 into elastic:master Oct 28, 2020
@mshustov mshustov deleted the no-global-types branch October 28, 2020 10:03
mshustov added a commit to mshustov/kibana that referenced this pull request Oct 28, 2020
* move global typings to packages/kbn-utility-types

* update all imports

* add tests

* mute error

* update docs

* ok

* rename kbn-utility-types/test --> kbn-utility-types/jest
mshustov added a commit that referenced this pull request Oct 28, 2020
* move global typings to packages/kbn-utility-types

* update all imports

* add tests

* mute error

* update docs

* ok

* rename kbn-utility-types/test --> kbn-utility-types/jest
gmmorris added a commit to gmmorris/kibana that referenced this pull request Oct 29, 2020
…kibana into alerts/convert-to-tm-intervals

* 'alerts/convert-to-tm-intervals' of github.com:gmmorris/kibana: (88 commits)
  fixed jest
  APM Experiments settings (elastic#81554)
  [Resolver] Enable resolver test plugin tests (elastic#81339)
  Add TS project references for inspector  (elastic#81792)
  Add uri decode to es_ui_shared and fix navigation issues with special characters (elastic#80835)
  [Fleet] Rename ingestManager translations fleet (elastic#81837)
  [Logs UI] Transmit and render array field values in log entries (elastic#81385)
  Audit Logging: use the original url (elastic#81282)
  [User experience] Fix JS error rate (elastic#81512)
  [UX] Add median/percentile info in titles (elastic#79824)
  Support export for SO with circular refs (elastic#81582)
  Get rid of  global types (elastic#81739)
  [APM] Fix precommit script (elastic#81594)
  skips overview tests (elastic#81877)
  [Security Solution][Case] Fix connector's labeling (elastic#81824)
  Added simple test, which only covers successful case when edit happened right after task was complete previous execution
  [Maps] Fix EMS test (elastic#81856)
  [Security Solutions][Detections] - Fix bug, last response not showing for disabled rules (elastic#81783)
  skip flaky suite (elastic#81853)
  Fixed type checks and unit tests
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v7.11.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants