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

[Entity Manager] Exposing stop and start transforms actions in the EntityClient #192186

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

tiansivive
Copy link
Contributor

This PR exposes two new methods (startTransforms and stopTransforms) in the EntityClient as proposed here
This 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.

@tiansivive tiansivive added release_note:skip Skip the PR/issue when compiling release notes team:obs-entities Observability Entities Team labels Sep 5, 2024
@tiansivive tiansivive requested a review from a team as a code owner September 5, 2024 13:35
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Sep 5, 2024
@@ -78,4 +86,18 @@ export class EntityClient {

return { definitions };
}

async startTransforms(definition: EntityDefinition) {
Copy link
Contributor

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

Copy link
Contributor

@miltonhultgren miltonhultgren Sep 6, 2024

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

Copy link
Contributor Author

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()

Copy link
Contributor

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 :)

Copy link
Contributor Author

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?

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 6, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: a5a1491
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-192186-a5a14916d406

Failed CI Steps

Metrics [docs]

✅ unchanged

History

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

@tiansivive tiansivive enabled auto-merge (squash) September 6, 2024 14:01
@tiansivive tiansivive merged commit 337e692 into elastic:main Sep 6, 2024
24 checks passed
@kibanamachine kibanamachine added v8.16.0 backport:skip This commit does not require backporting labels Sep 6, 2024
crespocarlos pushed a commit to crespocarlos/kibana that referenced this pull request Sep 11, 2024
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes team:obs-entities Observability Entities Team v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants