-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Cloud Security] Handle critical errors returned from the Agentless API when creating and deleting agentless agents #195997
[Cloud Security] Handle critical errors returned from the Agentless API when creating and deleting agentless agents #195997
Conversation
ed2b902
to
917cec7
Compare
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
Pinging @elastic/fleet (Team:Fleet) |
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.
LGTM
869782e
to
d8ddf42
Compare
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.
LGTM, haven't tested though
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @seanrathier |
Starting backport for target branches: 8.x |
…PI when creating and deleting agentless agents (elastic#195997) (cherry picked from commit d153584)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…less API when creating and deleting agentless agents (#195997) (#197490) # Backport This will backport the following commits from `main` to `8.x`: - [[Cloud Security] Handle critical errors returned from the Agentless API when creating and deleting agentless agents (#195997)](#195997) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"seanrathier","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-23T15:46:26Z","message":"[Cloud Security] Handle critical errors returned from the Agentless API when creating and deleting agentless agents (#195997)","sha":"d15358496b8cbc153d494f9a8f70c9400ebb1d66","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","Team:Cloud Security","backport:prev-minor","ci:project-deploy-security","8.17 candidate"],"title":"[Cloud Security] Handle critical errors returned from the Agentless API when creating and deleting agentless agents","number":195997,"url":"https://github.com/elastic/kibana/pull/195997","mergeCommit":{"message":"[Cloud Security] Handle critical errors returned from the Agentless API when creating and deleting agentless agents (#195997)","sha":"d15358496b8cbc153d494f9a8f70c9400ebb1d66"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195997","number":195997,"mergeCommit":{"message":"[Cloud Security] Handle critical errors returned from the Agentless API when creating and deleting agentless agents (#195997)","sha":"d15358496b8cbc153d494f9a8f70c9400ebb1d66"}}]}] BACKPORT--> Co-authored-by: seanrathier <[email protected]>
Summary
We are adding more defined error handling on the statuses returned from the Agentless API. This includes some changes to the data and messages being logged and the error that is thrown to the user.
We've also refactored the code to have the agentless agent
create
anddelete
actions share the same handling function.Checklist
Delete any items that are not applicable to this PR.