[9.3] [Streams] Use original request for rules client when in default space (#247014)#247275
Merged
cesco-f merged 2 commits intoelastic:9.3from Dec 22, 2025
Merged
[9.3] [Streams] Use original request for rules client when in default space (#247014)#247275cesco-f merged 2 commits intoelastic:9.3from
cesco-f merged 2 commits intoelastic:9.3from
Conversation
…elastic#247014) Related to elastic#239968. ## Summary Optimizes the `QueryService` to use the original request when operating from the default space, only creating a fake request bound to the default space when the request originates from a non-default space. ## Problem Previously, `QueryService.getClientWithRequest()` was unconditionally creating a fake request bound to the default space for the rules client, even when the original request was already coming from the default space. This was unnecessary overhead. ## Solution - Added `SpacesPluginStart` as an optional dependency in `StreamsPluginStartDependencies` - Modified the logic to check the current space ID: - If the request is from the **default space** → use the original request - If the request is from a **non-default space** → use the fake request bound to the default space (cherry picked from commit 1a8a9dd) # Conflicts: # x-pack/platform/plugins/shared/streams/server/lib/streams/assets/query/query_service.ts
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
|
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.
Backport
This will backport the following commits from
mainto9.3:Questions ?
Please refer to the Backport tool documentation