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

[Reporting] Consolidate Server Type Defs, move some out of Legacy #66144

Merged
merged 3 commits into from
May 19, 2020

Conversation

tsullivan
Copy link
Member

@tsullivan tsullivan commented May 11, 2020

Depends on Reporting route migration.

This PR changes around imports, moving most out of files named types.d.ts and into index.ts. Many other definitions that do not reference legacy have been moved to the New Platform area of Reporting code.

Why this PR is useful

It starts to move code in the direction of New Platform. Consolidating the type definitions means placing the definitions closer to where they're important. That makes it simpler to identify entire modules that can be relocated.

These changes provide a way for there to be a smaller next PR to move server libs to NP. The ExportTypesRegistry and LevelLogger would be good options to move to NP next.

Summary

  1. Move as many type definitions as possible out of Reporting Legacy to the Kibana Platform code
    • does not include any types that reference legacy types (LevelLogger, etc)
    • includes cancellation_token, as moved types depend on it
  2. Reduce the number of types.d.ts files by moving type definitions where they fit best, or to index.ts files for module scope
  3. Stop using alias of LevelLogger as Logger because it conflicts with a core type name

@tsullivan tsullivan force-pushed the reporting/move-class-ts-typedefs branch 6 times, most recently from 2b340d4 to 84facc7 Compare May 12, 2020 22:59
@tsullivan tsullivan changed the title [Reporting] Move Server Type Defs out of Legacy [Reporting] Consolidate Server Type Defs, move some out of Legacy May 12, 2020
@tsullivan tsullivan force-pushed the reporting/move-class-ts-typedefs branch 6 times, most recently from 438479f to 8b0c99f Compare May 15, 2020 19:08
@elastic elastic deleted a comment from tylersmalley May 15, 2020
@tsullivan tsullivan force-pushed the reporting/move-class-ts-typedefs branch 6 times, most recently from f5b81e8 to 31e1407 Compare May 18, 2020 17:16
@tsullivan tsullivan marked this pull request as ready for review May 18, 2020 17:32
@tsullivan tsullivan force-pushed the reporting/move-class-ts-typedefs branch from 31e1407 to 6e7725e Compare May 18, 2020 17:32
@tsullivan tsullivan added release_note:skip Skip the PR/issue when compiling release notes Team:Reporting Services labels May 18, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@tsullivan tsullivan added v7.8.0 and removed v7.8.0 labels May 18, 2020
import { CancellationToken } from '../../../../../plugins/reporting/common';
import { JobDocPayload, JobParamPostPayload, ScrollConfig } from '../../server/types';

export type RawValue = string | object | null | undefined;
Copy link
Contributor

@joelgriffith joelgriffith May 18, 2020

Choose a reason for hiding this comment

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

Hrm, this type is pretty wide open, hopefully we can narrow it down at some point...

Copy link
Contributor

@joelgriffith joelgriffith left a comment

Choose a reason for hiding this comment

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

LGTM

@tsullivan
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@tsullivan tsullivan merged commit 114a0a1 into elastic:master May 19, 2020
@tsullivan tsullivan deleted the reporting/move-class-ts-typedefs branch May 19, 2020 00:13
tsullivan added a commit to tsullivan/kibana that referenced this pull request May 19, 2020
…astic#66144)

* [Reporting] consolidate server types, move some to NP

* Revert touching routes code

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request May 19, 2020
* master: (24 commits)
  [APM] agent config 'profiling_inferred_spans_min_duration' default value is '0ms' but the min value in the field is '1ms' (elastic#66886)
  [Canvas] Fix flaky custom element functional tests (elastic#65908)
  Fix IE specific flexbox min-height issue (elastic#66555)
  [Discover] Unskip doc link functional test (elastic#66884)
  Index pattern management to Kibana platform (elastic#65026)
  Warning and link to support matrix for IE11 (elastic#66512)
  [Reporting] Consolidate Server Type Defs, move some out of Legacy (elastic#66144)
  [SIEM] [Maps] Fixes Network Map empty tooltip (elastic#66828)
  [Endpoint] Encode the index of the alert in the id response (elastic#66919)
  [services/testSubjects] reduce retry usage, add waitForEnabled (elastic#66538)
  [DOCS] Identifies cloud settings for APM (elastic#66935)
  [SIEM][CASE] Fix configuration's page user experience (elastic#66029)
  Resolver: Display node 75% view submenus (elastic#64121)
  [SIEM] Cases] Capture timeline click and open timeline in case view (elastic#66327)
  [APM] Lowercase agent names so icons work (elastic#66824)
  [dev/cli] add support for --no-cache (elastic#66837)
  [Ingest Manager] Better handling of package installation problems (elastic#66541)
  [ML] Enhances api docs for modules endpoints (elastic#66738)
  dont hide errors (elastic#66764)
  [RFC] Global search API (elastic#64284)
  ...
tsullivan added a commit that referenced this pull request May 19, 2020
…cy (#66144) (#66947)

* [Reporting] Consolidate Server Type Defs, move some out of Legacy (#66144)

* [Reporting] consolidate server types, move some to NP

* Revert touching routes code

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* fix ts

* fix ts

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@sophiec20 sophiec20 added the (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead release_note:skip Skip the PR/issue when compiling release notes v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants