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

[8.x] fix tty and related tests (#206919) #207205

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\nCo-authored-by: Elastic Machine ","sha":"e7b5f3d84401ca0861b8d18588277e1d11e188ba","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor","React@18"],"title":"fix tty and related tests","number":206919,"url":"https://github.com//pull/206919","mergeCommit":{"message":"fix tty and related tests (#206919)\n\n## Summary\r\n\r\nCulled from https://github.com//pull/206411\r\n\r\nThis PR is informed from the work that's being done for the migration to\r\nReact 18, whilst trying out kibana with react 18 we had couple of test\r\nfail relating to this particular component, details here\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/266993#0194655f-1466-4ee3-80ed-54e398b09492)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/266993/jobs/0194655f-1466-4ee3-80ed-54e398b09492/artifacts/01946583-34ed-444a-bc55-10e684c325ef),\r\nit's worth mentioning the way the component was written causes\r\nunnecessary re-renders that doesn't actually make the interval for the\r\ntty playspeed exactly constant. The approach taken here is such that\r\nthere's no need to depend on state change to cause the next line to be\r\nwritten, now we setup a timer interval just once for the entire duration\r\nthat the tty is playing, and said timer only ever gets cleaned up on\r\npause.\r\n\r\n\r\nP.S. This fix does not utilize any APIs from react 18 so it's backward\r\ncompatible with our current version of react.\r\n\r\n### Checklist\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\nCo-authored-by: Elastic Machine ","sha":"e7b5f3d84401ca0861b8d18588277e1d11e188ba"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com//pull/206919","number":206919,"mergeCommit":{"message":"fix tty and related tests (#206919)\n\n## Summary\r\n\r\nCulled from https://github.com//pull/206411\r\n\r\nThis PR is informed from the work that's being done for the migration to\r\nReact 18, whilst trying out kibana with react 18 we had couple of test\r\nfail relating to this particular component, details here\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/266993#0194655f-1466-4ee3-80ed-54e398b09492)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/266993/jobs/0194655f-1466-4ee3-80ed-54e398b09492/artifacts/01946583-34ed-444a-bc55-10e684c325ef),\r\nit's worth mentioning the way the component was written causes\r\nunnecessary re-renders that doesn't actually make the interval for the\r\ntty playspeed exactly constant. The approach taken here is such that\r\nthere's no need to depend on state change to cause the next line to be\r\nwritten, now we setup a timer interval just once for the entire duration\r\nthat the tty is playing, and said timer only ever gets cleaned up on\r\npause.\r\n\r\n\r\nP.S. This fix does not utilize any APIs from react 18 so it's backward\r\ncompatible with our current version of react.\r\n\r\n### Checklist\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\nCo-authored-by: Elastic Machine ","sha":"e7b5f3d84401ca0861b8d18588277e1d11e188ba"}}]}] BACKPORT-->

## Summary

Culled from elastic#206411

This PR is informed from the work that's being done for the migration to
React 18, whilst trying out kibana with react 18 we had couple of test
fail relating to this particular component, details here
[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/266993#0194655f-1466-4ee3-80ed-54e398b09492)
[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/266993/jobs/0194655f-1466-4ee3-80ed-54e398b09492/artifacts/01946583-34ed-444a-bc55-10e684c325ef),
it's worth mentioning the way the component was written causes
unnecessary re-renders that doesn't actually make the interval for the
tty playspeed exactly constant. The approach taken here is such that
there's no need to depend on state change to cause the next line to be
written, now we setup a timer interval just once for the entire duration
that the tty is playing, and said timer only ever gets cleaned up on
pause.

P.S. This fix does not utilize any APIs from react 18 so it's backward
compatible with our current version of react.

### Checklist

<!-- Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials -->
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
<!--
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit e7b5f3d)
@kibanamachine kibanamachine merged commit bd70808 into elastic:8.x Jan 20, 2025
11 checks passed
@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
sessionView 355.3KB 355.3KB +16.0B

cc @eokoneyo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants