Skip to content

Commit 3dfaf83

Browse files
committed
preamble_size: Fix variability of command & preamble(?) size
Previously the command size could very depanding on the current username, hostname, and process pid. Before ``` SSH command size: 759 Preamble (mitogen.core + econtext) size: 18227 (17.80KiB) ... ``` After SSH command size: 755 Preamble (mitogen.core + econtext) size: 18227 (17.80KiB) ... ```
1 parent 936b08d commit 3dfaf83

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ In progress (unreleased)
2323

2424
* :gh:issue:`1306` CI: Report sudo version on Ansible targets
2525
* :gh:issue:`1306` CI: Move sudo test users defaults into ``/etc/sudoers.d``
26+
* :gh:issue:`1306` preamble_size: Fix variability of measured command size
2627

2728

2829
v0.3.27 (2025-08-20)

preamble_size.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ def header(self):
3131

3232
router = mitogen.master.Router()
3333
context = mitogen.parent.Context(router, 0)
34-
options = mitogen.ssh.Options(max_message_size=0, hostname='foo')
34+
options = mitogen.ssh.Options(
35+
hostname='foo',
36+
max_message_size=0,
37+
remote_name='alice@host:1234',
38+
)
3539
conn = mitogen.ssh.Connection(options, router)
3640
conn.context = context
3741

0 commit comments

Comments
 (0)