[CPS] Update asScoped call sites - @elastic/kibana-cases#254456
Closed
gsoldevila wants to merge 1 commit into
Closed
[CPS] Update asScoped call sites - @elastic/kibana-cases#254456gsoldevila wants to merge 1 commit into
gsoldevila wants to merge 1 commit into
Conversation
Contributor
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
ff3c2b9 to
380ee7f
Compare
380ee7f to
cf74160
Compare
Member
Author
|
Superseded by the consolidated PR #255066, which makes |
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.
Background
Cross-Project Search (CPS) is a Serverless feature that orchestrates searches across Elastic projects using
project_routingheaders, injected at the ES client level by Kibana.#254186 introduced a new optional
optsparameter toelasticsearch.client.asScoped()that lets callers explicitly declare their CPS routing intent. This PR is one of a series that updates call sites owned by @elastic/kibana-cases.What changed
All
asScoped()call sites in this PR have been annotated with a// TODO REVIEWcomment and an explicitprojectRoutingoption (pre-selected based on whether the request carries aurl: URLproperty). The annotation is intentional: it is meant to prompt the owning team to review each call site and confirm or adjust the routing choice.What you need to do
Please review each
// TODO REVIEWannotated call site and decide the correct routing strategy:projectRouting: 'space'— the client will inject the current space NPRE (Named Project Routing Expression) so that searches are scoped to the user's space. The request object passed toasScoped()must carry aurl: URLproperty; if it does not (e.g.FakeRequest, background tasks), this will throw at runtime.projectRouting: 'origin-only'— no project routing is injected automatically. Use this for system/background requests or any context where the request object has no URL.Once you have confirmed the routing choice for each call site, please take ownership of this PR, update the options as needed, and remove the
// TODO REVIEWcomments before merging.