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

[Terminal Output] bug fixes to text sizer and missed lines rendered issue. #142524

Merged
merged 8 commits into from
Oct 4, 2022

Conversation

mitodrummer
Copy link
Contributor

@mitodrummer mitodrummer commented Oct 3, 2022

Summary

  • Removes a playback optimization from the tty player to simplify logic and avoid certain edge cases that are hard to fix.
  • fit to screen button state fixed, and going fullscreen/normal will auto fit properly now.
  • removes io event loading logic in favor of simpler session based loading. this has been done due to issues getting a unique char_device when there are parallel sessions running on two different containers on the same pod. We will most likely add this back in once we figure out how to fix this on the data side.

Note: render loop speed increased to make up for removal of multiline per loop rendering optimzation.

Fixes: #142291

Checklist

Karl Godard added 4 commits September 29, 2022 17:05
…button state). increased playback speed to make up for removal of multi line per frame rendering
@mitodrummer mitodrummer added bug Fixes for quality problems that affect the customer experience backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.5.0 labels Oct 3, 2022
@mitodrummer mitodrummer requested a review from a team October 3, 2022 19:53
@mitodrummer mitodrummer added the release_note:skip Skip the PR/issue when compiling release notes label Oct 3, 2022
@@ -39,6 +39,8 @@ describe('SessionView component', () => {
dispatchEvent: jest.fn(),
})),
});

global.ResizeObserver = require('resize-observer-polyfill');
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -234,7 +234,7 @@ export const useXtermPlayer = ({
// there is some random race condition with the jump to feature that causes these calls to error out.
}
} else {
linesToPrint = lines.slice(lineNumber, lineNumber + TTY_LINES_PER_FRAME);
linesToPrint = lines.slice(lineNumber, lineNumber + 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

interesting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea, it was an optimization in an attempt to limit the amount of state changes. caused more problems than solved..

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it!

If rendering shows to be a problem for larger sections, we can think about other solutions, either using Throttle or requestAnimationFrame, then we can make playback faster, but internally we are optimizing when to render.

Copy link
Contributor

@opauloh opauloh left a comment

Choose a reason for hiding this comment

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

lgtm

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
sessionView 101 102 +1

Async chunks

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

id before after diff
sessionView 454.1KB 455.0KB +896.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@mitodrummer mitodrummer merged commit 6de0091 into elastic:main Oct 4, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 4, 2022
…ssue. (elastic#142524)

* removed complex lines per frame logic. caused too many edge cases. tests added to prevent future regressions

* fix fit to screen option (when changing from fullscreen to not. also button state). increased playback speed to make up for removal of multi line per frame rendering

* fixed tests

* removing tty loading technique due to problems with unique char_device in multi container sessions on the same pod

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

💚 All backports created successfully

Status Branch Result
8.5

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 Oct 4, 2022
…ssue. (#142524) (#142545)

* removed complex lines per frame logic. caused too many edge cases. tests added to prevent future regressions

* fix fit to screen option (when changing from fullscreen to not. also button state). increased playback speed to make up for removal of multi line per frame rendering

* fixed tests

* removing tty loading technique due to problems with unique char_device in multi container sessions on the same pod

Co-authored-by: Karl Godard <[email protected]>
(cherry picked from commit 6de0091)

Co-authored-by: Karl Godard <[email protected]>
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this pull request Oct 11, 2022
…ssue. (elastic#142524)

* removed complex lines per frame logic. caused too many edge cases. tests added to prevent future regressions

* fix fit to screen option (when changing from fullscreen to not. also button state). increased playback speed to make up for removal of multi line per frame rendering

* fixed tests

* removing tty loading technique due to problems with unique char_device in multi container sessions on the same pod

Co-authored-by: Karl Godard <[email protected]>
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this pull request Oct 14, 2022
…ssue. (elastic#142524)

* removed complex lines per frame logic. caused too many edge cases. tests added to prevent future regressions

* fix fit to screen option (when changing from fullscreen to not. also button state). increased playback speed to make up for removal of multi line per frame rendering

* fixed tests

* removing tty loading technique due to problems with unique char_device in multi container sessions on the same pod

Co-authored-by: Karl Godard <[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) bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes v8.5.0 v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Terminal Output] Playback is skipping some lines on the second render loop
4 participants