[data.search.session] Use locators instead of URL generators#115681
[data.search.session] Use locators instead of URL generators#115681lukasolson merged 12 commits intoelastic:masterfrom
Conversation
| try { | ||
| url = await urls.getUrlGenerator(urlGeneratorId).createUrl(state); | ||
| const locator = locators.get(locatorId); | ||
| return locator?.getRedirectUrl(state); |
There was a problem hiding this comment.
I think we should leave it like this in this migration pr, but I think later we should use locator.navigate instead. I assume this will solve the potential problem of "too long URLs"
There was a problem hiding this comment.
👍 I had this same thought... I just did this for now since it was simpler but is there any reason we shouldn't use navigate in this PR?
There was a problem hiding this comment.
is there any reason we shouldn't use navigate in this PR?
I think mostly because this will require destination apps to be able to handle incoming state: now they only can extract the initial state from the URL, but they will have to extract it from location.state.
So as this will require more changes and more testing, I suggest we focus on migration and use an old URL based approach for now
There was a problem hiding this comment.
Noticed this bug with redirect endpoint - #116313. I think it is fine to fix separately
|
Could you please also update relevant docs: https://github.com/elastic/kibana/blob/master/dev_docs/tutorials/data/search.mdx |
ThomThomson
left a comment
There was a problem hiding this comment.
Code only review - nice change! The more we use locators the better! Presentation team changes LGTM
|
@elasticmachine merge upstream |
majagrubic
left a comment
There was a problem hiding this comment.
Discover changes approved!
| }); | ||
| }); | ||
|
|
||
| describe('7.14.0 -> 7.18.0', () => { |
| try { | ||
| url = await urls.getUrlGenerator(urlGeneratorId).createUrl(state); | ||
| const locator = locators.get(locatorId); | ||
| return locator?.getRedirectUrl(state); |
There was a problem hiding this comment.
Noticed this bug with redirect endpoint - #116313. I think it is fine to fix separately
…arch-session-locators
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @lukasolson |
💔 Backport failedThe backport operation could not be completed due to the following error: The backport PRs will be merged automatically after passing CI. To backport manually run: |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Resolves #85126.
Migrates the search session service from URL generators to locators.
To do:
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers