[Search] Client side session service#76889
Conversation
lukasolson
left a comment
There was a problem hiding this comment.
I think we need to have a discussion about whether or not we decide to make the sessionService stateful, or to expect to pass the sessionId everywhere. Right now we're doing a mix of both (e.g. in searchSource) and I think we should make a choice to do one or the other.
Also, I'm not totally sure I understand all of the changes to dashboard app controller. Maybe we can chat about those.
Add original error to expression exception
|
@Dosant I agree about the impact of removing the |
majagrubic
left a comment
There was a problem hiding this comment.
I made a quick pass through this, works well, but I haven't tested it in depth. Overall, the changes make sense, no major comments there.
Some minor questions below.
| }); | ||
| }); | ||
|
|
||
| test('fires once even when there is an error', async (done) => { |
There was a problem hiding this comment.
Great for adding a test case!
Dosant
left a comment
There was a problem hiding this comment.
Recent code change LGTM, didn't retest
Thanks for looking into clear() thing
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
async chunks size
distributable file count
page load bundle size
History
To update your PR or re-run it, just comment with: |
* Add a session service and use it in discover and dashboard * check unefined * Start session in visualize * Fix tests * docs * OSS error alignemnt * Adjust error messages in xpack * Add getErrorMessage * Use showError in vizualize Add original error to expression exception * Cleanup * ts, doc and i18n fixes * Fix jest tests * Fix functional test * functional test * ts * Update functional tests * Add unit tests to interceptor and timeout error * expose toasts test function * doc * typos * lint * Cleanup * review 1 * Code review * doc * doc fix * visualization type fix * fix jest * Fix xpack functional test * fix xpack test * code review * Add tracking methods to session service * remove chromium * Fix ts and jest tests * jest + docs * ts fix * siem test * Use session service to show a timeout notification per session + more unit tests * ts and docs * Remove session service from search source (not needed) * Code review * ts * Single active session in FE session service * Cleanup * Don't integrate with dashboard \ visualize Add functional tests for session toast plugin * Typescript * ts * Improve functional tests * es * simplify filter test * wait until loadedw * filter test * delete crypto for now * Select the correct index 🤦 * timerange * Adjust functional test logic * improved test format @Dosant * Handle exceptions * Don't close sessions automatically, warn instead * jest * Adjust functional test * Remove unused code * delete export Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add a session service and use it in discover and dashboard * check unefined * Start session in visualize * Fix tests * docs * OSS error alignemnt * Adjust error messages in xpack * Add getErrorMessage * Use showError in vizualize Add original error to expression exception * Cleanup * ts, doc and i18n fixes * Fix jest tests * Fix functional test * functional test * ts * Update functional tests * Add unit tests to interceptor and timeout error * expose toasts test function * doc * typos * lint * Cleanup * review 1 * Code review * doc * doc fix * visualization type fix * fix jest * Fix xpack functional test * fix xpack test * code review * Add tracking methods to session service * remove chromium * Fix ts and jest tests * jest + docs * ts fix * siem test * Use session service to show a timeout notification per session + more unit tests * ts and docs * Remove session service from search source (not needed) * Code review * ts * Single active session in FE session service * Cleanup * Don't integrate with dashboard \ visualize Add functional tests for session toast plugin * Typescript * ts * Improve functional tests * es * simplify filter test * wait until loadedw * filter test * delete crypto for now * Select the correct index 🤦 * timerange * Adjust functional test logic * improved test format @Dosant * Handle exceptions * Don't close sessions automatically, warn instead * jest * Adjust functional test * Remove unused code * delete export Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* master: (51 commits) [Discover] Unskip flaky test (elastic#80670) Fix security solution template label (elastic#80754) [Ingest]: ignore 404, check if there are transforms in results. (elastic#80721) Moving loader to logo in header, add a slight 250ms pause (elastic#78879) [Security Solution][Cases] Fix bug with case connectors (elastic#80642) Update known-plugins.asciidoc (elastic#75388) [Lens] Add median operation (elastic#79453) Fix navigateToApp logic when navigating to the current app. (elastic#80809) [Visualizations] Fix bad color mapping with multiple split series (elastic#80801) [ILM] Add esErrorHandler for the new es js client (elastic#80302) Fix codeowners (elastic#80826) skip flaky suite (elastic#79463) [Timelion] Remove kui usage (elastic#80287) [Ingest Manager] add skipIfNoDockerRegistry to package_install_complete test (elastic#80779) [Alerting UI] Disable "Save" button for Alerts with broken Connectors (elastic#80579) Allow the default space to be accessed via `/s/default` (elastic#77109) Add script to identify plugin dependencies for TS project references migration (elastic#80463) [Search] Client side session service (elastic#76889) feat: 🎸 add separator for different context menu groups (elastic#80498) Lazy load reporting (elastic#80492) ...
|
@lizozom Please update the "Dev Docs" section in the summary to include content that we can pull for the API plugin changes doc. |
|
@lizozom how do I test this PR please? Thanks! |
Summary
This PR introduces the frontend session management service as part of #61738, and integrates it into the discover, by initializing a session before fetching fresh data from the server.
This PR also uses the session service, to show the timeout error once per session, instead of using a debounce.
Dev Docs
Checklist
Delete any items that are not applicable to this PR.
For maintainers