Adds a `runNow` api to Task Manager, allowing us to force the refresh of a recurring task.
This PR includes a couple of sustainability changes as well as the feature itself.
1. **Declarative query composition.** At the moment the queries in the TaskStore are huge JSON objects that are hard to maintain and understand. This PR introduces a pattern where the different parts of the query are composed out of type-checked functions, making it easier to maintain and to construct dynamically as needs change. _This was included in this PR as the **markAvailableTasksAsClaimed** query needs different query clauses depending on whether there are specific Tasks we wish to claim first.
2. **Refactoring of the Task Poller** As the `runNow` api is introduced we find Task Manager's lifecycle in a weird state where it has both a _pull_ model, where timeouts & callbacks interact without having to responsd to any external requests, and a _push_ model where requests are made to the new `runNow` api. Balancing these two proved error prone, hard to maintain and had the potential of _lossy_ behaviour where requests are dropped accidentally. To address this TaskPoller has been refactored using Rxjs observables, remodelling the existing _pull_ mechanism as a _push_ mechanism so Task Manager can _respond_ to both _polling_ calls and _runNow_ in a similar fashion.
And ofcourse the main feature of this PR:
3. **runNow api** An api on TaskManager that takes a _task ID_ and attempts to run the task. The call returns a promise which resolves with a result which notifies the caller when the task has either completed successfully, or result in an error.
Ensure no deprecated Node.js core API's are used in Kibana. This is
achieved by throwing an error in either development mode or in CI if one
of the deprecated API's is called, and as such, new PR's should no
longer be able to be merged if they use deprecated API's.
Some of these API's (like the `Buffer` constructor`) is a security risk.
This adds an absolute session timeout (lifespan) to user sessions.
It also improves the existing session timeout toast and the overall
user experience in several ways.
* run mocha tests from x-pack with root mocha script
* Only run Karma tests in xpack intake job
* disable failing suites
* fix typo
* skip correct suite (there are multiple root suites)
* support disabling junit reporting with $DISABLE_JUNIT_REPORTER
* don't generate junit in ispec_plugin tests
* eui to 16.0.0
* type defs
* card click
* snapshot updates
* time format test updates
* ts return
* integration fix
* async
* more time format fixes
* more time format fixes
* test updates
* add uisettings dateformat timepicker test
* after method to clear setting
* Update dependency rxjs to ^6.5.3
* move argument type def up for better coverage
* adapt to possibly undefined helpExtension
* complete definition of deprecation$ type
* define types that bindNodeCallback can no longer infer
* define more types that bindNodeCallback can't infer
* be more explicit and accurate about the types for a subject/observable pair
* fix interface error, TS now identifies it
* ignore a return type flaw because types are not being managed properly
* avoid overspecifying types
* allow types to be inferred where possible
* remove unnecessary withLatestFrom()
* reduce number of rxjs versions installed
* update kbn/pm dist
* Update moment related packages
* unify moment version in yarn.lock
* adapt ro pluralization fixes
* update some bad pluralization in fixtures/snapshots
* [npm] Removes react-clipboard.js
Added in the original commit of APM, but does not appear to still be used.
* [npm] Remove redux-test-utils
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Added in https://github.com/elastic/kibana/pull/18885 as part of the
RxJS 6 upgrade and used in the screenshot stictcher, however it is not
longer used.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Originally added in https://github.com/elastic/kibana/pull/19236 as part
of the notification service, however it's no longer used.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>