-
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
[Security solution] Update default Bedrock api url #176090
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
A documentation preview will be available soon.
Request a new doc build by commenting
If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here. |
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.
Everything looks good, but left a question about the multi-line error message
|
||
// @ts-expect-error expects an axios error as the parameter | ||
expect(connector.getResponseErrorMessage(err)).toEqual( | ||
`API Error: The requested operation is not recognized by the service. |
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.
Seems slightly weird to have an multi-line error message - or at least non-standard. I would guess that in some environments (writing to the Kibana log) these will get removed/replaced - for instance, in the server log connector, we replace "\n
" with ";
".
Does it need to be multi-line?
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.
It doesn't need to, it just looks nicer in the assistant. If you look at the screenshots in the description, you can see it puts it all in one line anyways on the Test connector err message and it looks fine when that happens, so it shouldn't matter. I have a comment about it in the code. Is this ok?
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 suspect it will be fine, but as it's not what we typically do (AFAIK), there could be some unintended side effects - I would guess in UX's. Have you checked what this looks like in the Kibana logs as displayed in cloud log viewers? I don't >think< it will split this into multiple log documents ...
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 don't think so either, but will deploy this branch to double check
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.
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 - I'll let Steph roll the dice on the multi-line error message! 🤞🏻
@elasticmachine merge upstream |
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.
Thank you! :)
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
(cherry picked from commit 3a4ad77)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…176176) # Backport This will backport the following commits from `main` to `8.12`: - [[Security solution] Update default Bedrock api url (#176090)](#176090) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-02-02T17:43:33Z","message":"[Security solution] Update default Bedrock api url (#176090)","sha":"3a4ad7725a28429f25acd3ce630fb43f45ecde1e","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team: SecuritySolution","ci:cloud-deploy","ci:cloud-redeploy","v8.13.0","Team:Security Generative AI","v8.12.2"],"title":"[Security solution] Update default Bedrock api url","number":176090,"url":"https://github.com/elastic/kibana/pull/176090","mergeCommit":{"message":"[Security solution] Update default Bedrock api url (#176090)","sha":"3a4ad7725a28429f25acd3ce630fb43f45ecde1e"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176090","number":176090,"mergeCommit":{"message":"[Security solution] Update default Bedrock api url (#176090)","sha":"3a4ad7725a28429f25acd3ce630fb43f45ecde1e"}},{"branch":"8.12","label":"v8.12.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Steph Milovic <[email protected]>
This PR didn't make it on time to the latest build candidate of v8.12.1. Updating the labels. |
Summary
It seems Amazon Bedrock changed the behavior of the default service endpoint. Previously the
bedrock
endpoint supported "inference requests for models" (in our case, the invoke API). Now that responsibility lies withbedrock-runtime
.I noticed this behavior when I was testing with Bedrock today. The last time i tested with it was early this week and the
bedrock
endpoint still worked at that time. I cannot find any announcement or release note pointing to this change. This likely means existing connectors will become broken with this error. In order to help our user fix the error, I enhanced the error message for this situation with a recommendation for how to resolve:I tried to included a markdown link to the endpoint docs, but since the actions test view renders plaintext, not markdown, I did not include the link:
I also updated the documentation link for the url to go to the most relevant page,
https://docs.aws.amazon.com/general/latest/gr/bedrock.html
To test
Old Bedrock Endpoint
, notice the enhanced error messageNew Bedrock Endpoint
, notice the API working