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

Add proto changes for pty-shell resizing #2820

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

azliu0
Copy link
Contributor

@azliu0 azliu0 commented Jan 29, 2025

Describe your changes

Adds proto changes for handling resize in pty-shell.

Backward/forward compatibility checks

Check these boxes or delete any item (or this section) if not relevant for this PR.

  • Client+Server: this change is compatible with old servers
  • Client forward compatibility: this change ensures client can accept data intended for later versions of itself

Note on protobuf: protobuf message changes in one place may have impact to
multiple entities (client, server, worker, database). See points above.


Changelog

Copy link
Contributor

@thecodingwizard thecodingwizard left a comment

Choose a reason for hiding this comment

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

Would it be better to have optional uint32 window_rows and optional uint32 window_cols be part of RuntimeInputMessage, and have the worker / runtime construct the magical resize sequence based off this information, rather than the client?

That way, in case we decide to change the magical resize sequence in the future, we don't have to worry about backwards-compatibility with older clients.

Please let me know if you disagree though.

@azliu0 azliu0 force-pushed the azliu/runtime-input-resize-proto branch from 0f2e4e9 to 296ea32 Compare January 29, 2025 05:50
Copy link
Contributor

@thecodingwizard thecodingwizard left a comment

Choose a reason for hiding this comment

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

lgtm! @thundergolfer should anyone else review this PR (and the other pty-shell resizing PR's)?

@@ -2180,6 +2180,8 @@ message RuntimeInputMessage {
bytes message = 1;
uint64 message_index = 2;
bool eof = 3;
optional uint32 window_rows = 4;
optional uint32 window_cols = 5;
Copy link
Contributor

Choose a reason for hiding this comment

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

  • maybe we should comment that window_rows and window_cols are only used for container exec?
  • do you think window_rows or terminal_rows or pty_rows is clearer? (feel free to keep as window_rows if you think that makes more sense to you)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no strong preference on the naming! willing to defer to anyone else who has a strong opinion on what this field should look like

@azliu0 azliu0 force-pushed the azliu/runtime-input-resize-proto branch from 296ea32 to 5877963 Compare January 29, 2025 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants