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

Remove deprecated & unused public-AsyncPlugin #127048

Merged

Conversation

afharo
Copy link
Member

@afharo afharo commented Mar 7, 2022

Summary

Part of #121956.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@afharo afharo added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting v8.2.0 labels Mar 7, 2022
@afharo afharo marked this pull request as ready for review March 7, 2022 18:54
@afharo afharo requested a review from a team as a code owner March 7, 2022 18:54
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
core 978 971 -7

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 296.0KB 295.1KB -920.0B
Unknown metric groups

API count

id before after diff
core 2381 2373 -8

ESLint disabled line counts

id before after diff
core 48 46 -2

Total ESLint disabled count

id before after diff
core 58 56 -2

Unreferenced deprecated APIs

id before after diff
core 8 7 -1

History

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

@afharo afharo enabled auto-merge (squash) March 8, 2022 09:17
Comment on lines -106 to -112
if (isPromise(contractOrPromise)) {
if (this.coreContext.env.mode.dev) {
// eslint-disable-next-line no-console
console.log(
`Plugin ${pluginName} is using asynchronous setup lifecycle. Asynchronous plugins support will be removed in a later version.`
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I just wonder if we shouldn't keep this block and now throw instead of just logging a warning? It would avoid developer mistakes if a new plugin is defining async setup or start functions by mistake?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry! I had auto-merge enabled. I can create a follow-up PR to add this. Do you think it's worth it?

Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed on slack, it would be a nice to have, just to get a more explicit error during the dev process, but it's really not strictly necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

We discussed it on Slack: if a plugin exposes a promised contract and declares it as class MyPlugin extends Plugin<Promise<Contract>>, it's technically correct and we shouldn't throw.

The plugins using that contract will have to await the contract, which doesn't make it a good contract according to Kibana's architecture, but that's a different discussion.

If we see it's really needed in the future, we can add the validation later on.

@afharo afharo merged commit 22369fd into elastic:main Mar 9, 2022
@afharo afharo deleted the remove-unreferenced-apis/public-AsyncPlugin branch March 9, 2022 07:09
jloleysens added a commit to jloleysens/kibana that referenced this pull request Mar 9, 2022
…re-browser-errors

* 'main' of github.com:elastic/kibana: (46 commits)
  [Reporting] Capture Kibana stopped error (elastic#127017)
  add updatedAt to SimpleSavedObject (elastic#126359)
  Remove deprecated & unused `ElasticsearchServiceStart.legacy` (elastic#127050)
  remove opacity for fitting line series (elastic#127176)
  Remove deprecated & unused `HttpServiceSetup.auth` (elastic#127056)
  [Lens] Show underlying data editor navigation (elastic#125983)
  Bump dependencies (elastic#127238)
  Remove deprecated & unused `public-AsyncPlugin` (elastic#127048)
  Remove deprecated & unused `SavedObjectsImportFailure.title` (elastic#127043)
  skip flaky suite (elastic#123372)
  [kbn/generate] add basic package generator (elastic#127095)
  [build] Up compression quality (elastic#127064)
  Made fix to broken test. Deleted all existing pipelines before test starts. FLAKY: elastic#118593 (elastic#127102)
  Increase timeout for Jest integration tests (elastic#127220)
  skip failing test suite (elastic#126949)
  [DOCS] Adds note for data source performance impact (elastic#127184)
  [Security Solution] Adds CCS privileges warning enable switch in advanced settings (elastic#124459)
  [App Search] Move to tabbed single tabbed JSON flyout with upload and paste options and refactor cards (elastic#127162)
  Update dependency chromedriver to v99 (elastic#127079)
  [kbn/pm] add timings for more parts of bootstrap (elastic#127157)
  ...

# Conflicts:
#	x-pack/plugins/reporting/common/errors/index.ts
#	x-pack/plugins/reporting/server/lib/tasks/execute_report.ts
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 release_note:skip Skip the PR/issue when compiling release notes v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants