-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Entity Manager] Exposing stop and start transforms actions in the EntityClient #192186
Conversation
x-pack/plugins/observability_solution/entity_manager/server/lib/entities/delete_transforms.ts
Show resolved
Hide resolved
x-pack/plugins/observability_solution/entity_manager/server/lib/entities/stop_transforms.ts
Show resolved
Hide resolved
x-pack/plugins/observability_solution/entity_manager/server/lib/entity_client.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/observability_solution/entity_manager/server/routes/entities/reset.ts
Outdated
Show resolved
Hide resolved
@@ -78,4 +86,18 @@ export class EntityClient { | |||
|
|||
return { definitions }; | |||
} | |||
|
|||
async startTransforms(definition: EntityDefinition) { |
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.
What about renaming startEntityDefinition/stopEntityDefinition to align with the naming of other methods and abstract internals
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.
From the view, it might be better to use wording like enable/disable or pause/resume
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 can just call it start
😅
Might make sense since any consumer would have some EntityClient instance, so it'd read something like: client.start()
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.
To me, that sounds more like it's starting the client, even if they called it entityManager.start
it's not really correct since it doesn't start/stop all of the things the entity manager is running.
I think we have to spend the character budget and call it something longer in order to be descriptive enough :)
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 updated it to @klacabane's suggestion
I left it as start/stop, but enable/disable sound fine to me too. Less so for pause/resume, since it's kinda awkward to resume something you've never started in the first place?
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: |
…tityClient (elastic#192186) This PR exposes two new methods (`startTransforms` and `stopTransforms`) in the EntityClient as proposed [here](elastic/elastic-entity-model#160) This work is also required by the Entity Analytics team: elastic/security-team#10230 In addition, it splits up `stop_and_delete_transforms` into more granular actions, one for stopping and another for deleting. The uninstall function is now responsible for appropriately calling those actions in sequence.
This PR exposes two new methods (
startTransforms
andstopTransforms
) in the EntityClient as proposed hereThis work is also required by the Entity Analytics team: https://github.com/elastic/security-team/issues/10230
In addition, it splits up
stop_and_delete_transforms
into more granular actions, one for stopping and another for deleting. The uninstall function is now responsible for appropriately calling those actions in sequence.