Ability to get scoped call cluster from alerting and action executors#64432
Merged
mikecote merged 8 commits intoelastic:masterfrom Apr 27, 2020
Merged
Ability to get scoped call cluster from alerting and action executors#64432mikecote merged 8 commits intoelastic:masterfrom
mikecote merged 8 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
rylnd
approved these changes
Apr 24, 2020
Contributor
rylnd
left a comment
There was a problem hiding this comment.
From SIEM's end: I tested this functionality out with our existing ML integration and things work beautifully. Thank you!
gmmorris
approved these changes
Apr 27, 2020
Comment on lines
+34
to
+44
| const createServicesMock = () => { | ||
| const mock: jest.Mocked<Services & { | ||
| savedObjectsClient: ReturnType<typeof savedObjectsClientMock.create>; | ||
| }> = { | ||
| callCluster: elasticsearchServiceMock.createScopedClusterClient().callAsCurrentUser, | ||
| getScopedCallCluster: jest.fn(), | ||
| savedObjectsClient: savedObjectsClientMock.create(), | ||
| }; | ||
| return mock; | ||
| }; | ||
|
|
| }; | ||
|
|
||
| const createServicesMock = () => { | ||
| const mock: jest.Mocked<Services & { |
Contributor
There was a problem hiding this comment.
Shouldn't this just be jest.Mocked< AlertServices> ? 🤔
Contributor
Author
There was a problem hiding this comment.
The jest.Mocked<...> doesn't apply recursively. This was necessary to allow services.savedObjectsClient.get.mockResolvedValue(...).
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
mikecote
added a commit
to mikecote/kibana
that referenced
this pull request
Apr 27, 2020
…elastic#64432) * Initial work * Rename to getScopedCallCluster * Fix typecheck * Fix more type check issues * Add tests * Add docs Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Apr 28, 2020
…bana into pipeline-editor-part-mvp-2 * 'feature/ingest-node-pipelines' of github.com:elastic/kibana: (152 commits) [Ingest pipelines] Simulate pipeline (elastic#64223) Ability to get scoped call cluster from alerting and action executors (elastic#64432) Add editApp and editPath to embeddable (elastic#64297) TSVB validation: Allow numeric values for axes (elastic#63553) [ML] Fixing optional plugin dependency types (elastic#64450) [Logs UI] Alerting (elastic#62806) [Endpoint] Show Policy Status on Host Details using Policy Response API (elastic#64116) [Maps] update LayerWizard previewLayer to take layerDescriptor instead of ISource (elastic#64461) Remove SO root property index signature (elastic#64434) [ML] Functional tests - stabilize job row details validations (elastic#64503) [Ingest] Add Global settings flyout (elastic#64276) Bump cypress dev-dependency from 4.2.0 to 4.4.1 (elastic#64408) Migrate saved object of type url to kibana platform (elastic#64043) [NP] Migrate ui capabilities (elastic#64185) Bump karma-mocha dev-dependency from 1.3.0 to 2.0.0 (elastic#64407) Migrate kql_telemetry saved object registration to Kibana platform (elastic#64149) Remove SO autocreateindex error and error page (elastic#64037) Fix issue with yarn.lock (elastic#64496) Bump @hapi/boom dependency from 7.4.2 to 7.4.11 (elastic#64433) Bump gonzales-pe dev-dependency from 4.2.4 to 4.3.0 (elastic#64401) ... # Conflicts: # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx # x-pack/plugins/ingest_pipelines/public/shared_imports.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #62886
In this PR, I'm adding a new alert and action executor service of
getScopedCallCluster. This function allows you to pass instances ofClusterClientto get a scoped call cluster function that is tied to the user in context of the execution.This PR also:
TODO: