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] Convert plugin setup and start to synchronous #68326

Merged
merged 13 commits into from
Jun 11, 2020

Conversation

tsullivan
Copy link
Member

@tsullivan tsullivan commented Jun 4, 2020

Summary

Close #68292

  • Removes x-pack/plugins/reporting/server/browsers/create_browser_driver_factory.ts. The function had to be broken up. Afterwards, it's not useful as a wrapper helper function.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@tsullivan tsullivan changed the title make downstream not depend on installBrowser [Reporting] prevent installBrowser from blocking setup Jun 4, 2020

export interface BrowserDownload {
createDriverFactory: CreateDriverFactory;
Copy link
Member Author

@tsullivan tsullivan Jun 4, 2020

Choose a reason for hiding this comment

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

Previously, the BrowserDownload interface wasn't being instantiated anywhere. Once I instantiated a variable as this interface, adding this createDriverFactory field was necessary.

@tsullivan tsullivan force-pushed the reporting/setup-nsyncified branch 2 times, most recently from 8657ab2 to 5f6c6a6 Compare June 4, 2020 23:31
@tsullivan tsullivan changed the title [Reporting] prevent installBrowser from blocking setup [Reporting] Convert plugin setup and start to synchronous Jun 4, 2020
@tsullivan tsullivan force-pushed the reporting/setup-nsyncified branch 4 times, most recently from 294bc3a to af636ab Compare June 5, 2020 00:09
@tsullivan
Copy link
Member Author

There is still a TODO for testing on this, but it is ready for review

@tsullivan tsullivan marked this pull request as ready for review June 6, 2020 01:06
@elasticmachine
Copy link
Contributor

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

@tsullivan
Copy link
Member Author

@elasticmachine merge upstream

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.

Not quite sure what to verify here, but I don't see any obvious issues from an operations perspective.

@joelgriffith
Copy link
Contributor

I'm happy with the changes here, let's let platform folks give final approval and then we should be good to merge

@tsullivan tsullivan requested a review from jbudz June 10, 2020 20:53
@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

x-pack/plugins/reporting/server/plugin.ts Show resolved Hide resolved
runValidations(config, elasticsearch, browserDriverFactory, this.logger);

this.logger.debug('Start complete');
this.start$.next(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does someone read them?

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 is just for a unit test

@tsullivan tsullivan merged commit ebff420 into elastic:master Jun 11, 2020
@tsullivan tsullivan deleted the reporting/setup-nsyncified branch June 11, 2020 17:53
tsullivan added a commit to tsullivan/kibana that referenced this pull request Jun 11, 2020
)

* [Reporting] Convert plugin setup and start to synchronous

* revert class conversion

* diff prettify

* Fix test mocks + add some plugin async helpers where needed

* no setupReady startReady needed

* Add plugin test for sync/error cases

* PR feedback on tests/setup logs

* rename symbol

Co-authored-by: Joel Griffith <joel.griffith@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
tsullivan added a commit that referenced this pull request Jun 11, 2020
…68932)

* [Reporting] Convert plugin setup and start to synchronous

* revert class conversion

* diff prettify

* Fix test mocks + add some plugin async helpers where needed

* no setupReady startReady needed

* Add plugin test for sync/error cases

* PR feedback on tests/setup logs

* rename symbol

Co-authored-by: Joel Griffith <joel.griffith@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Joel Griffith <joel.griffith@elastic.co>
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 Feature:NP Migration 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.

[Reporting] Plugin lifecycle setup step needs to be synchronous
7 participants