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

Move csv_v2 and csv_searchsource to export type class #160041

Merged

Conversation

rshen91
Copy link
Contributor

@rshen91 rshen91 commented Jun 20, 2023

Summary

This is a part of #158092

This PR encompasses both csv_v2 and csv_searchsource as the CsvExportType and CsvSearchsourceExportType. Based on the reporting plugin readme, CsvSearchsourceExportType is currently used but CsvV2ExportType is refactored for when it can reach feature parity to csv searchsource.

Checklist

@rshen91 rshen91 changed the base branch from main to reporting/new-export-type-registry June 20, 2023 15:15
@rshen91 rshen91 self-assigned this Jun 20, 2023
@rshen91 rshen91 changed the title Refactor csv_v2 to export type class Move csv_v2 and csv_searchsource to export type class Jun 20, 2023
@rshen91 rshen91 added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead labels Jun 20, 2023
rshen91 and others added 13 commits June 21, 2023 08:54
## Summary

This partially addresses elastic#158092

This PR refactors the generic function getExportType(). This PR is
concerned only with the PDF export type and refactors it into a class
instance. This class is then used in the request handler and the execute
report functionality in Reporting.

The execute_report.test.ts is removed in this PR and will be part of the
clean up needed in a subsequent PR once CSV and PNG are also refactored
to class instances instead of the getExportType() function.
## Summary

This partially addresses elastic#158092

This PR refactors the generic function getExportType(). This PR is
concerned only with the PDF export type and refactors it into a class
instance. This class is then used in the request handler and the execute
report functionality in Reporting.

The execute_report.test.ts is removed in this PR and will be part of the
clean up needed in a subsequent PR once CSV and PNG are also refactored
to class instances instead of the getExportType() function.
@rshen91 rshen91 force-pushed the reporting/new-export-type-registry branch from 497f73c to c43b014 Compare June 28, 2023 15:15
@rshen91 rshen91 marked this pull request as ready for review June 28, 2023 18:57
## Summary

This partially addresses elastic#158092

This PR refactors the generic function getExportType(). This PR is
concerned only with the PDF export type and refactors it into a class
instance. This class is then used in the request handler and the execute
report functionality in Reporting.

The execute_report.test.ts is removed in this PR and will be part of the
clean up needed in a subsequent PR once CSV and PNG are also refactored
to class instances instead of the getExportType() function.
@rshen91 rshen91 force-pushed the reporting/new-export-type-registry branch from c43b014 to 7c87383 Compare June 30, 2023 18:09
@rshen91 rshen91 requested review from a team as code owners June 30, 2023 18:09
@stratoula stratoula removed the request for review from a team July 3, 2023 06:06
@rshen91 rshen91 force-pushed the reporting/new-export-type-registry branch from 7c87383 to c7c7caf Compare July 5, 2023 13:51
@rshen91 rshen91 requested a review from tsullivan July 5, 2023 15:32
Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

LGTM! Great work on this!

@rshen91 rshen91 merged this pull request into elastic:reporting/new-export-type-registry Jul 5, 2023
@kibana-ci
Copy link
Collaborator

kibana-ci commented Jul 5, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #39 / Reporting APIs Usage initial state all counts are 0
  • [job] [logs] FTR Configs #39 / Reporting APIs Usage initial state all counts are 0
  • [job] [logs] FTR Configs #65 / Telemetry /api/telemetry/v2/clusters/_stats monitoring/multicluster should pass the schema validations
  • [job] [logs] FTR Configs #65 / Telemetry /api/telemetry/v2/clusters/_stats monitoring/multicluster should pass the schema validations

Metrics [docs]

‼️ ERROR: no builds found for mergeBase sha [c7c7caf]

History

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

cc @rshen91

@rshen91 rshen91 deleted the csv-export-type branch July 6, 2023 13:44
rshen91 added a commit that referenced this pull request Jul 6, 2023
## Summary

This is a part of #158092

This PR encompasses both csv_v2 and csv_searchsource as the
CsvExportType and CsvSearchsourceExportType. Based on the reporting
plugin readme, CsvSearchsourceExportType is currently used but
CsvV2ExportType is refactored for when it can reach feature parity to
csv searchsource.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Timothy Sullivan <[email protected]>
rshen91 added a commit that referenced this pull request Jul 10, 2023
## Summary

This is a part of #158092

This PR encompasses both csv_v2 and csv_searchsource as the
CsvExportType and CsvSearchsourceExportType. Based on the reporting
plugin readme, CsvSearchsourceExportType is currently used but
CsvV2ExportType is refactored for when it can reach feature parity to
csv searchsource.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Timothy Sullivan <[email protected]>
rshen91 added a commit that referenced this pull request Jul 11, 2023
## Summary

This is a part of #158092

This PR encompasses both csv_v2 and csv_searchsource as the
CsvExportType and CsvSearchsourceExportType. Based on the reporting
plugin readme, CsvSearchsourceExportType is currently used but
CsvV2ExportType is refactored for when it can reach feature parity to
csv searchsource.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Timothy Sullivan <[email protected]>
rshen91 added a commit that referenced this pull request Jul 12, 2023
## Summary

This is a part of #158092

This PR encompasses both csv_v2 and csv_searchsource as the
CsvExportType and CsvSearchsourceExportType. Based on the reporting
plugin readme, CsvSearchsourceExportType is currently used but
CsvV2ExportType is refactored for when it can reach feature parity to
csv searchsource.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Timothy Sullivan <[email protected]>
rshen91 added a commit that referenced this pull request Jul 12, 2023
## Summary

This is a part of #158092

This PR encompasses both csv_v2 and csv_searchsource as the
CsvExportType and CsvSearchsourceExportType. Based on the reporting
plugin readme, CsvSearchsourceExportType is currently used but
CsvV2ExportType is refactored for when it can reach feature parity to
csv searchsource.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Timothy Sullivan <[email protected]>
rshen91 added a commit that referenced this pull request Jul 13, 2023
## Summary

This is a part of #158092

This PR encompasses both csv_v2 and csv_searchsource as the
CsvExportType and CsvSearchsourceExportType. Based on the reporting
plugin readme, CsvSearchsourceExportType is currently used but
CsvV2ExportType is refactored for when it can reach feature parity to
csv searchsource.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Timothy Sullivan <[email protected]>
rshen91 added a commit to rshen91/kibana that referenced this pull request Jul 20, 2023
## Summary

This is a part of elastic#158092

This PR encompasses both csv_v2 and csv_searchsource as the
CsvExportType and CsvSearchsourceExportType. Based on the reporting
plugin readme, CsvSearchsourceExportType is currently used but
CsvV2ExportType is refactored for when it can reach feature parity to
csv searchsource.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Timothy Sullivan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead release_note:skip Skip the PR/issue when compiling release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants