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] Clean up any usage, reorganize server route files #110740

Merged
merged 8 commits into from
Sep 2, 2021

Conversation

tsullivan
Copy link
Member

@tsullivan tsullivan commented Sep 1, 2021

Summary

  • Removes any usage from production (non-test) code in Reporting.
  • Adds RequestHandler class which can later be used to handle reports to create scheduled reports.
  • Renames and reorganizes server routes files to make "request handler" logic shareable with soon-to-come scheduled reporting API routes.
  • Removes unused layout parameter from getScreenshots

This remove 19 instances of any in production reporting code, resulting in 22 remaining instances. Here are the 22 remaining any instances as of this PR:

  • image

Checklist

Delete any items that are not applicable to this PR.

@tsullivan tsullivan force-pushed the reporting/cleanup-server-routes branch 6 times, most recently from c11a8e0 to 6477a60 Compare September 1, 2021 01:23
@tsullivan tsullivan force-pushed the reporting/cleanup-server-routes branch from 6477a60 to 1d5ddbb Compare September 1, 2021 01:40
@tsullivan tsullivan force-pushed the reporting/cleanup-server-routes branch from 966a425 to a3db310 Compare September 1, 2021 20:51
@tsullivan tsullivan changed the title refactor/reflatten server routes [Reporting] Clean up any instances, refactor server route files Sep 1, 2021
@tsullivan tsullivan changed the title [Reporting] Clean up any instances, refactor server route files [Reporting] Clean up any usage, refactor server route files Sep 1, 2021
@tsullivan tsullivan changed the title [Reporting] Clean up any usage, refactor server route files [Reporting] Clean up any usage, reorganize server route files Sep 1, 2021
@elastic elastic deleted a comment from kibanamachine Sep 1, 2021
@tsullivan tsullivan marked this pull request as ready for review September 1, 2021 23:16
@tsullivan tsullivan requested review from a team as code owners September 1, 2021 23:16
@tsullivan tsullivan added (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead release_note:skip Skip the PR/issue when compiling release notes Team:AppServices v7.16.0 v8.0.0 labels Sep 1, 2021
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@tsullivan tsullivan force-pushed the reporting/cleanup-server-routes branch from 55934cd to a3db310 Compare September 2, 2021 01:50
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

  • 💚 Build #150410 succeeded 55934cd38087d26b1b7896bbcb4bbd1dedd311be

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

* 2.0.
*/

import Boom from '@hapi/boom';
Copy link
Member Author

Choose a reason for hiding this comment

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

This code was pulled out of x-pack/plugins/reporting/server/routes/generation.ts to allow better reusability

Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

Thanks for doing this clean up! Looks great to me.

@tsullivan tsullivan merged commit e6faa58 into elastic:master Sep 2, 2021
@tsullivan tsullivan deleted the reporting/cleanup-server-routes branch September 2, 2021 18:35
tsullivan added a commit to tsullivan/kibana that referenced this pull request Sep 2, 2021
…tic#110740)

* refactor/reflatten server routes

* fix import

* fix any usage in server/lib

* clean up unused parameter

* remove any in server/browsers

* refactor handle request function into a class

* more cleanup
tsullivan added a commit that referenced this pull request Sep 2, 2021
) (#111027)

* refactor/reflatten server routes

* fix import

* fix any usage in server/lib

* clean up unused parameter

* remove any in server/browsers

* refactor handle request function into a class

* more cleanup
jloleysens added a commit to jloleysens/kibana that referenced this pull request Sep 3, 2021
…eporting-to-v2

* 'master' of github.com:elastic/kibana: (65 commits)
  Move to vis_types folder part 2 (elastic#110574)
  [SOR] use initialNamespaces when checking for conflict for `create` and `bulkCreate` (elastic#111023)
  [Discover] Remove export* syntax (elastic#110934)
  [Event log][7.x] Updated event log client to search across legacy IDs (elastic#109365)
  [Security Solution][Detection Rules] Changes 'activated' text on rule details page  (elastic#111044)
  [Metrics UI] Filter out APM nodes from the inventory view (elastic#110300)
  [package testing] Update logging and pid configuration (elastic#111059)
  [Dashboard] Read App State from URL on Soft Refresh (elastic#109354)
  Add correct roles to test user for functional tests in dashboard (elastic#110880)
  [DOCS] Adds Lens Inspector and minor edits (elastic#109736)
  [DOCS] Updates Spaces page (elastic#111005)
  normalize initialNamespaces (elastic#110936)
  [Reporting] Clean up `any` usage, reorganize server route files (elastic#110740)
  [Security Solution] [CTI] Fixes bug that caused Threshold and Indicator Match rules to ignore custom rule filters if a saved query was used in the rule definition. (elastic#109253)
  skip flaky suites: elastic#111001, elastic#111022
  [Security Solution][RAC] - Update reason field text (elastic#110308)
  [RAC][Security Solution] Make analyzer work with EuiDataGrid full screen (elastic#110913)
  [Metrics UI] Add integration tests for Metric Threshold Rule and refactor to fire correctly (elastic#109971)
  [DOCS] Updates Discover docs (elastic#110346)
  [RAC] Persistent timeline fields fix (elastic#110685)
  ...
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.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants