-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Expressions] Fix setup and start contracts #110841
Conversation
c5bb0dc
to
386905c
Compare
Pinging @elastic/kibana-app-services (Team:AppServices) |
getRenderer: jest.fn(), | ||
getRenderers: jest.fn(), | ||
getType: jest.fn(), | ||
getTypes: jest.fn(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should most likely remove all the getters from setup contract as well as there is no way to be certain specific thing is going to be registered at the time you are requesting it (we can only guarantee that in start contract)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to remove that, but I found a few places where logic relies on those getters. I think it makes sense to keep them because it can be the case when you register functions conditionally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove those that are not used, seems only getFunction
is used at the moment ?
and please open an issue for getFunction
one.
- the setup_expression.ts is not working reliably (possibly missing functions registered by other plugins)
- the functions.ts should be using start contract
- application.tsx should be using start contract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are more methods, but they all are being called from the same place:
getFunction
;getFunctions
;getTypes
.
I have created #112596 to remove that. Meantime, I've updated contracts and removed the ones that are not used. The rest I marked as deprecated to prevent new usages.
a185e9a
to
c552101
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
c552101
to
c81ff81
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes in Canvas look good 👍
💚 Build SucceededMetrics [docs]Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
References to deprecated APIs
History
To update your PR or re-run it, just comment with: |
…-migrate-away-from-injected-css-js * 'master' of github.com:elastic/kibana: (189 commits) fix permissions for cloud test (elastic#112568) Updates the VEGA docs for v8.0 (elastic#112781) Updates the TSVB docs for v8 (elastic#112778) [Expressions] Fix setup and start contracts (elastic#110841) [DOCS] Update remote cluster and security links (elastic#112874) test/functional/apps/management/_test_huge_fields.js (elastic#112878) Fix the other one... (elastic#112873) [data.search.aggs] Use fields instead of _source in top_hits agg (elastic#109531) [Search sessions] Don't show incomplete warning if search requests aren't in session (elastic#112364) [data.search] Do not send ignore_throttled when search:includeFrozen is disabled (elastic#112755) [Monitoring] Add KQL filter bar to alerts (elastic#111663) Log deprecation warnings for plugins which won't be disable-able in 8.0 (elastic#112602) [CI] Balance CI Groups (elastic#112836) Add ILM URLs to documentation link service (elastic#112748) Bump chromedriver to 93 (elastic#112847) [Maps] move joins from LayerDescriptor to VectorLayerDescriptor (elastic#112427) Add a handler for a possible promise rejection (elastic#112840) Removes space, fix build (elastic#112856) [Maps] fix unhandled promise rejections in jest tests (elastic#112712) Copy pass 3 (elastic#112815) ... # Conflicts: # src/plugins/dashboard/public/application/dashboard_app.tsx # src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx
* Refactor executor forking to implement state inheritance * Fix setup and start contracts typings * Add support of named forks * Add expressions service life-cycle assertions Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Resolves #106509. The
registerFunction
,registerType
, andregisterRenderer
functions cannot assert the right life-cycle state at the moment due to #106510 and #106511.Checklist
For maintainers