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

Allow channel handler to control adjust_window message sending #8775

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

yarisx
Copy link
Contributor

@yarisx yarisx commented Sep 3, 2024

The channel handler callback module can implement the get_adjust/0 function returning either 'immediate' or 'delayed' values.
In the latter case the channel handler module is responsible for invoking ssh_connection:adjust_window/3 to send ssh_msg_adjust_window to the peer.

Copy link
Contributor

github-actions bot commented Sep 3, 2024

CT Test Results

    2 files     29 suites   19m 24s ⏱️
  465 tests   461 ✅  4 💤 0 ❌
1 670 runs  1 646 ✅ 24 💤 0 ❌

Results for commit f2389c3.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@u3s u3s added the team:PS Assigned to OTP team PS label Sep 3, 2024
@u3s u3s self-assigned this Sep 3, 2024
@u3s
Copy link
Contributor

u3s commented Sep 3, 2024

you can ignore "unexpected event found" errors in ssh test results at this stage, they're probably unrelated.

@yarisx yarisx force-pushed the ymaslenn/ssh_controlled_adjust branch from 473af79 to 9826e65 Compare September 13, 2024 05:48
@yarisx
Copy link
Contributor Author

yarisx commented Sep 13, 2024

Rebased to the latest master, hope that makes test failures go away.

@yarisx yarisx force-pushed the ymaslenn/ssh_controlled_adjust branch from 9826e65 to 91e71a9 Compare October 22, 2024 11:04
@u3s
Copy link
Contributor

u3s commented Oct 23, 2024

sorry for delay.

please convert draft into PR.

I think this is a wanted feature but we need to discuss some details:

  • naming: maybe auto and manual return values + window_handling_mode instead of get_adjust ?
  • I would like it be more self documenting ... maybe you have a better idea?

The channel handler callback module can implement the window_handling_mode/0
function returning either 'auto' or 'manual' values.
In the latter case the channel handler module is responsible for invoking
ssh_connection:adjust_window/3 to send ssh_msg_adjust_window to the peer.
@yarisx yarisx force-pushed the ymaslenn/ssh_controlled_adjust branch from 91e71a9 to 3aaf55a Compare November 22, 2024 12:27
@yarisx
Copy link
Contributor Author

yarisx commented Nov 22, 2024

I've changed the implementation because the initial code did not cover the case when clients do not utilize ssh_client_channel behaviour. Now any channel handler can set window handling mode using the new exported ssh_connection_handler:set_window_handling_mode/3. Also created a couple of tests to check that the code works, hopefully - as intended.

@yarisx yarisx marked this pull request as ready for review November 26, 2024 06:16
@@ -231,12 +235,25 @@ end_per_group(_, Config) ->
Config.

%%--------------------------------------------------------------------
init_per_testcase(_TestCase, Config) ->
init_per_testcase(TestCase, Config) ->
io:format(user, "Testcase ~p~n", [TestCase]),
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove io:format above, or replace with ct:log if you prefer.

@u3s u3s added the testing currently being tested, tag is used by OTP internal CI label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants