Allow channel handler to control adjust_window message sending
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.
CT Test Results
2 files 29 suites 20m 55s ⏱️ 467 tests 463 ✅ 4 💤 0 ❌ 1 672 runs 1 648 ✅ 24 💤 0 ❌
Results for commit fb2d5d93.
:recycle: 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
you can ignore "unexpected event found" errors in ssh test results at this stage, they're probably unrelated.
Rebased to the latest master, hope that makes test failures go away.
sorry for delay.
please convert draft into PR.
I think this is a wanted feature but we need to discuss some details:
- naming: maybe
autoandmanualreturn values +window_handling_modeinstead ofget_adjust? - I would like it be more self documenting ... maybe you have a better idea?
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.
- this PR is affected by PR-9309
- this PR still looks interesting but maybe we could re-discuss how it should look like - as functionality triggering it (PR-8345) is reverted.
- I'm leaning towards having this logic nested in
ssh_client_channelbehavior, and leavingssh_connectionsimple - I think this was initial intention behind modules in ssh application - what do you think about it?
On one hand I agree that it would be better to keep the code clean and simple. On the other hand if this functionality is limited to the ssh_client_channel behaviour then any client that does not implement the behaviour cannot enjoy this kind of flow control. Also if I read the code correctly modules like ssh_cli, ssh_shell, ssh_sftpd also can't have this functionality without patching each module, because they implement ssh_server_channel behaviour which does not have any common code for handling ssh messages (which ssh_client_channel has).
But then again if there was no demand for the feature up until now, nobody will get hurt by any implementation.
I've pushed the changes to restore window-adjusting functionality to ssh_client_channel, is anything more expected from me?
@IngelaAndin @u3s I see that the PR has the "stalled" label, probably have missed something. Could you please comment on what is expected from my side?
@yarisx No waiting label means that you need to do something, stalled label means that we are swamped with other work and have problems prioritizing this at the moment , but please be patient because we are interested.