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] Switch to the new Elasticsearch client #95375

Closed
tsullivan opened this issue Mar 25, 2021 · 2 comments · Fixed by #97184
Closed

[Reporting] Switch to the new Elasticsearch client #95375

tsullivan opened this issue Mar 25, 2021 · 2 comments · Fixed by #97184
Assignees
Labels
Feature:Reporting:Framework Reporting issues pertaining to the overall framework needs-team Issues missing a team label technical debt Improvement of the software architecture and operational architecture

Comments

@tsullivan
Copy link
Member

tsullivan commented Mar 25, 2021

Reporting uses the legacy interface of the Elasticsearch service in a few places:

x-pack/plugins/reporting/server/routes/diagnostic/config.ts:      const { callAsInternalUser } = elasticsearch.legacy.client;
x-pack/plugins/reporting/server/routes/lib/jobs_query.ts:  const { callAsInternalUser } = elasticsearch.legacy.client;
x-pack/plugins/reporting/server/export_types/csv/execute_job.ts:    const { callAsCurrentUser } = elasticsearch.legacy.client.asScoped(fakeRequest);
x-pack/plugins/reporting/server/lib/store/store.ts:  private client: ElasticsearchServiceSetup['legacy']['client'];

These areas need to be updated to use the new Elasticsearch JS client. There already is an async method of the ReportingCore class that provides it (getEsClient) but it might need to be converted to a synchronous method (use the service from the PluginSetup API instead of PluginStart?) to serve the new areas.

After that's done, we need to update Reporting status on the Meta issue: #83910

Documentation: https://www.elastic.co/guide/en/kibana/current/migrating-legacy-plugins-examples.html#_elasticsearch_client

@tsullivan tsullivan added bug Fixes for quality problems that affect the customer experience (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Team:AppServices technical debt Improvement of the software architecture and operational architecture labels Mar 25, 2021
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@tsullivan tsullivan removed the bug Fixes for quality problems that affect the customer experience label Mar 25, 2021
@sophiec20 sophiec20 added Feature:Reporting:Framework Reporting issues pertaining to the overall framework and removed (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead (Deprecated) Team:Reporting Services labels Aug 21, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Reporting:Framework Reporting issues pertaining to the overall framework needs-team Issues missing a team label technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants