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

Async search cancellation UI #60058

Closed
wants to merge 140 commits into from

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Mar 12, 2020

Summary

Based of #59714
Resolves #24227.
Resolves #46370.
Waiting on #53538.

This PR adds the functionality needed to batch cancel in-progress queries as well as allow queries to run beyond the configured timeouts (both elasticsearch.shardTimeout and elasticsearch.requestTimeout).

It also adds the UI as demoed in the mockups

What still needs to be done -

  • Make run beyond timeout disabled in OSS
    • Move runBeyondTimeout to data_enhanced
    • Make a registry for async query actions
  • Remove the async search actions from the plugin API (use setSearchInterceptor instead)
  • Re-build the UI component
  • Implement info level notifications + support two buttons
  • Canceled embeddable indication
  • Support feature controls

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@lizozom lizozom requested a review from lukasolson March 12, 2020 18:59
@lizozom lizozom requested a review from a team as a code owner March 12, 2020 18:59
@lizozom lizozom self-assigned this Mar 12, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@kibanamachine
Copy link
Contributor

💔 Build Failed


Test Failures

Kibana Pipeline / kibana-xpack-agent / "after all" hook for "Loads prebuilt rules".Signal detection rules "after all" hook for "Loads prebuilt rules"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: Minified React error #301; visit https://reactjs.org/docs/error-decoder.html?invariant=301 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

Because this error occurred during a 'before all' hook we are skipping the remaining tests in the current suite: 'Signal detection rules'

Because this error occurred during a 'after all' hook we are skipping the remaining tests in the current suite: 'Signal detection rules'
    at Oa (http://localhost:61121/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:400:62306)
    at SafeSubscriber._next (http://localhost:61121/bundles/commons.bundle.js:3:4305287)
    at SafeSubscriber.__tryOrUnsub (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:116240)
    at SafeSubscriber.next (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:114680)
    at Subscriber._next (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:113069)
    at Subscriber.next (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:112666)
    at BehaviorSubject._subscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:27:200965)
    at BehaviorSubject.Observable._trySubscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:121365)
    at BehaviorSubject.Subject._trySubscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:163189)
    at BehaviorSubject.Observable.subscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:121100)

Kibana Pipeline / kibana-xpack-agent / "after all" hook for "launches the inspect query modal when the inspect button is clicked".Events Viewer Events viewer query modal "after all" hook for "launches the inspect query modal when the inspect button is clicked"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: Minified React error #301; visit https://reactjs.org/docs/error-decoder.html?invariant=301 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

Because this error occurred during a 'before all' hook we are skipping the remaining tests in the current suite: 'Events viewer query modal'

Because this error occurred during a 'after all' hook we are skipping the remaining tests in the current suite: 'Events viewer query modal'
    at Oa (http://localhost:61121/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:400:62306)
    at SafeSubscriber._next (http://localhost:61121/bundles/plugin/data/data.plugin.js:81:457589)
    at SafeSubscriber.__tryOrUnsub (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:116240)
    at SafeSubscriber.next (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:114680)
    at Subscriber._next (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:113069)
    at Subscriber.next (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:112666)
    at BehaviorSubject._subscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:27:200965)
    at BehaviorSubject.Observable._trySubscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:121365)
    at BehaviorSubject.Subject._trySubscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:163189)
    at BehaviorSubject.Observable.subscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:121100)

Kibana Pipeline / kibana-xpack-agent / "after each" hook for "inspects the Hosts Stat".Inspect Hosts stats and tables "after each" hook for "inspects the Hosts Stat"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: Minified React error #301; visit https://reactjs.org/docs/error-decoder.html?invariant=301 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

Because this error occurred during a 'after each' hook we are skipping the remaining tests in the current suite: 'Hosts stats and tables'
    at Oa (http://localhost:61121/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:400:62306)
    at SafeSubscriber._next (http://localhost:61121/bundles/plugin/data/data.plugin.js:81:457589)
    at SafeSubscriber.__tryOrUnsub (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:116240)
    at SafeSubscriber.next (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:114680)
    at Subscriber._next (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:113069)
    at Subscriber.next (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:112666)
    at BehaviorSubject._subscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:27:200965)
    at BehaviorSubject.Observable._trySubscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:121365)
    at BehaviorSubject.Subject._trySubscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:163189)
    at BehaviorSubject.Observable.subscribe (http://localhost:61121/bundles/plugin/data/data.plugin.js:15:121100)

and 48 more failures, only showing the first 3.

History

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

onClick={() => {
setIsOpen(!isOpen);
}}
// isLoading={true}
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Remove this comment.

Also, is there currently no way to show multiple icons in an EuiButton? (One for the loading indicator, and the other one you already have here.)

data.search.cancelPendingSearches();
break;
case LoadingButtonAction.ActionRunBeyondTimeout:
// TODO: implement me
Copy link
Member

Choose a reason for hiding this comment

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

This can be implemented now.

@mdefazio
Copy link
Contributor

This looks good. Did we still want to promote one of the options behind the loading button? Changing the first option to be a primary filled button?

image

I wasn't able to get the toast to show (I think issues on my end), perhaps we can zoom tomorrow?

@lizozom
Copy link
Contributor Author

lizozom commented Mar 18, 2020

closing due to UI changes

@lizozom lizozom closed this Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v8.0.0
Projects
None yet
5 participants