Skip to content
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

[Infra] Refactor useSearchSession to useReloadRequestTime for timestamp based refresh #205338

Merged
merged 6 commits into from
Jan 3, 2025

Conversation

Bluefinger
Copy link
Contributor

@Bluefinger Bluefinger commented Dec 31, 2024

Summary

Refactoring useSearchSession to useReloadRequestTime to decouple the usage of search.session for refreshing, avoiding a re-rendering loop issue. This change is then propagated to various Lens charts to make use of that instead of relying on searchSessionId.

Closes #203412

How to test

  • Go to Infrastructure Inventory page in Observability
  • Enable Auto-Refresh
  • Click on a infra item (host/service/etc) to open the fly-out
  • Update the time range in the flyout
  • Things should update without spurious refreshes.

@Bluefinger Bluefinger added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Dec 31, 2024
@Bluefinger
Copy link
Contributor Author

/ci

@Bluefinger
Copy link
Contributor Author

/ci

@Bluefinger
Copy link
Contributor Author

/ci

@Bluefinger Bluefinger marked this pull request as ready for review January 2, 2025 14:45
@Bluefinger Bluefinger requested review from a team as code owners January 2, 2025 14:45
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

Copy link
Member

@jennypavlova jennypavlova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🙌 Code review only

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
infra 1.3MB 1.3MB -26.0B

History

@Bluefinger Bluefinger merged commit fe988fa into elastic:main Jan 3, 2025
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12600937508

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 3, 2025
…mp based refresh (elastic#205338)

## Summary

Refactoring `useSearchSession` to `useReloadRequestTime` to decouple the
usage of search.session for refreshing, avoiding a re-rendering loop
issue. This change is then propagated to various Lens charts to make use
of that instead of relying on searchSessionId.

Closes elastic#203412

## How to test

- Go to Infrastructure Inventory page in Observability
- Enable Auto-Refresh
- Click on a infra item (host/service/etc) to open the fly-out
- Update the time range in the flyout
- Things should update without spurious refreshes.

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit fe988fa)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 3, 2025
…imestamp based refresh (#205338) (#205521)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Infra] Refactor useSearchSession to useReloadRequestTime for
timestamp based refresh
(#205338)](#205338)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gonçalo Rica Pais da
Silva","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-03T16:44:52Z","message":"[Infra]
Refactor useSearchSession to useReloadRequestTime for timestamp based
refresh (#205338)\n\n## Summary\r\n\r\nRefactoring `useSearchSession` to
`useReloadRequestTime` to decouple the\r\nusage of search.session for
refreshing, avoiding a re-rendering loop\r\nissue. This change is then
propagated to various Lens charts to make use\r\nof that instead of
relying on searchSessionId.\r\n\r\nCloses #203412\r\n\r\n## How to
test\r\n\r\n- Go to Infrastructure Inventory page in Observability\r\n-
Enable Auto-Refresh\r\n- Click on a infra item (host/service/etc) to
open the fly-out\r\n- Update the time range in the flyout\r\n- Things
should update without spurious
refreshes.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"fe988fa55272a4ee6006a3a3ffc899a03fd4390c","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-infra_services"],"title":"[Infra]
Refactor useSearchSession to useReloadRequestTime for timestamp based
refresh","number":205338,"url":"https://github.com/elastic/kibana/pull/205338","mergeCommit":{"message":"[Infra]
Refactor useSearchSession to useReloadRequestTime for timestamp based
refresh (#205338)\n\n## Summary\r\n\r\nRefactoring `useSearchSession` to
`useReloadRequestTime` to decouple the\r\nusage of search.session for
refreshing, avoiding a re-rendering loop\r\nissue. This change is then
propagated to various Lens charts to make use\r\nof that instead of
relying on searchSessionId.\r\n\r\nCloses #203412\r\n\r\n## How to
test\r\n\r\n- Go to Infrastructure Inventory page in Observability\r\n-
Enable Auto-Refresh\r\n- Click on a infra item (host/service/etc) to
open the fly-out\r\n- Update the time range in the flyout\r\n- Things
should update without spurious
refreshes.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"fe988fa55272a4ee6006a3a3ffc899a03fd4390c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205338","number":205338,"mergeCommit":{"message":"[Infra]
Refactor useSearchSession to useReloadRequestTime for timestamp based
refresh (#205338)\n\n## Summary\r\n\r\nRefactoring `useSearchSession` to
`useReloadRequestTime` to decouple the\r\nusage of search.session for
refreshing, avoiding a re-rendering loop\r\nissue. This change is then
propagated to various Lens charts to make use\r\nof that instead of
relying on searchSessionId.\r\n\r\nCloses #203412\r\n\r\n## How to
test\r\n\r\n- Go to Infrastructure Inventory page in Observability\r\n-
Enable Auto-Refresh\r\n- Click on a infra item (host/service/etc) to
open the fly-out\r\n- Update the time range in the flyout\r\n- Things
should update without spurious
refreshes.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"fe988fa55272a4ee6006a3a3ffc899a03fd4390c"}}]}]
BACKPORT-->

Co-authored-by: Gonçalo Rica Pais da Silva <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Infra] Refactor useSearchSession hook
4 participants