-
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
[data.search.session] Use locators instead of URL generators #115681
[data.search.session] Use locators instead of URL generators #115681
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
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.
Code only review - nice change! The more we use locators the better! Presentation team changes LGTM
@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.
Discover changes approved!
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.
Tested search sessions in Discover/Dashboard. Didn't notice any issues.
I also tested an upgrade from 7.16 to 8.0. all seems good 👍
nice work
@@ -164,3 +165,193 @@ describe('7.13.0 -> 7.14.0', () => { | |||
`); | |||
}); | |||
}); | |||
|
|||
describe('7.14.0 -> 7.18.0', () => { |
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 am confused :)
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.
😅
try { | ||
url = await urls.getUrlGenerator(urlGeneratorId).createUrl(state); | ||
const locator = locators.get(locatorId); | ||
return locator?.getRedirectUrl(state); |
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.
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