Alex Willmer
bcc726d3b7
ci: Handle dnf packages in bootstrap role
1 week ago
Alex Willmer
780f8af1a4
ci: Factor out image prep bootstrap as a role
...
Promoting the script to a full template will fix some whitespace errors later.
1 week ago
Alex Willmer
d1c4217db0
ci: Wait for fresh image prep containers to start
1 week ago
Alex Willmer
09b972e96e
ci: Fix ansible-lint complaints in image prep playbooks
1 week ago
Alex Willmer
509c572682
Merge pull request #1368 from moreati/prepare-v0.3.33
...
Prepare v0.3.33
2 weeks ago
Alex Willmer
c9eb6e54e2
Begin 0.3.34dev
2 weeks ago
Alex Willmer
4a442f503e
Prepare v0.3.33
2 weeks ago
Alex Willmer
e52132c89b
Merge pull request #1367 from moreati/ansible13
...
Test/fix Ansible 13 (ansible-core 2.20) support
2 weeks ago
Alex Willmer
f966b3e5c6
CI: Remove lingering stdout_callback=yaml in macOS jobs
...
Support removed in Ansible 13 (ansible-core 2.20).
refs #1285 , #1291
2 weeks ago
Alex Willmer
7c9c38325d
ansible_mitogen: Ansible 13 (ansible-core 2.20) support
2 weeks ago
Alex Willmer
5da56f577c
CI: Use non-rc Python 3.14 releases
...
Left over from Python 3.14 support work.
2 weeks ago
Alex Willmer
734047e1cc
CI: Remove Ansible 11 (ansible-core 2.18) strategy=linear jobs
...
I believe I kep them as a reference during Ansible 12 fixups. No longer needed
and they slow down CI runs.
2 weeks ago
Alex Willmer
8b29846990
Merge pull request #1365 from moreati/prepare-v0.3.32
...
Prepare v0.3.32
2 weeks ago
Alex Willmer
61a7fa1fee
Begin 0.3.33dev
2 weeks ago
Alex Willmer
28ea4780db
Prepare v0.3.32
2 weeks ago
Alex Willmer
36f7cee2d1
Merge pull request #1363 from moreati/issue1362-issue-templates
...
Convert bug issue templates to an issue form
2 weeks ago
Alex Willmer
9a2e600317
chore: Convert bug template to a form
2 weeks ago
Alex Willmer
2cc507a6de
chore: Remove Mitogen 0.2 issue template
...
No longer used
2 weeks ago
Alex Willmer
db63dd1def
Merge pull request #1359 from moreati/issue1260
...
CI: Remove integration of retired lgtm.com
3 weeks ago
Alex Willmer
cab024a6fc
CI: Remove integration of retired lgtm.com
...
Company was aquired by Github in 2019. Service was switched off in Dec 2022,
replaced by GitHub code scanning. Fixes #1260
See
- https://github.blog/news-insights/product-news/the-next-step-for-lgtm-com-github-code-scanning/
3 weeks ago
Alex Willmer
aea028f175
Merge pull request #1357 from moreati/issue1218
...
ansible_mitogen: Remove maximum Ansible version check
3 weeks ago
Alex Willmer
df890459c5
ansible_mitogen: Remove maximum Ansible version check
...
fixes #1218
3 weeks ago
Alex Willmer
847f34c17d
Merge pull request #1243 from moreati/boot-cmd--argv
...
mitogen: Pass first stage, preamble length, and context name in argv
3 weeks ago
Alex Willmer
83c5ab1900
mitogen: Send first stage parameters as argv (796 bytes -> 822)
...
Benefit: The base64 lump is now static for a given Mitogen version, and the
variable parts are more visible. This will make debugging, auditting, and
allow-listing a bit easier.
Potential benefit: generate the base64 once, at build time or startup. Rather
than once per connection.
Cost: Bootstrap command is 26 bytes longer.
```
➜ mitogen git:(boot-cmd--argv) ✗ ./preamble_size.py
SSH command size: 822
Preamble (mitogen.core + econtext) size: 18230 (17.80KiB)
Original Minimized Compressed
mitogen.core 152237 148.7KiB 68453 66.8KiB 45.0% 18130 17.7KiB 11.9%
mitogen.parent 98746 96.4KiB 51215 50.0KiB 51.9% 12922 12.6KiB 13.1%
mitogen.fork 8445 8.2KiB 4139 4.0KiB 49.0% 1652 1.6KiB 19.6%
mitogen.ssh 10847 10.6KiB 6913 6.8KiB 63.7% 2102 2.1KiB 19.4%
mitogen.sudo 12089 11.8KiB 5924 5.8KiB 49.0% 2249 2.2KiB 18.6%
mitogen.select 12325 12.0KiB 2929 2.9KiB 23.8% 964 0.9KiB 7.8%
mitogen.service 41581 40.6KiB 22398 21.9KiB 53.9% 5847 5.7KiB 14.1%
mitogen.fakessh 15753 15.4KiB 8135 7.9KiB 51.6% 2672 2.6KiB 17.0%
mitogen.master 52891 51.7KiB 27586 26.9KiB 52.2% 7129 7.0KiB 13.5%
```
4 weeks ago
Alex Willmer
3b7a75dfaf
mitogen: Send first stage as argv (786 bytes -> 796 bytes)
...
This saves one layer of quoting/quote escaping in the bootstrap command and a
string interpolation per connection. The cost is an increasing the bootstrap
command by 10 bytes. I like the tradeoff. I could be convinced to revert it.
```console
➜ mitogen git:(boot-cmd--argv) ✗ ./preamble_size.py
SSH command size: 796
Preamble (mitogen.core + econtext) size: 18230 (17.80KiB)
Original Minimized Compressed
mitogen.core 152237 148.7KiB 68453 66.8KiB 45.0% 18130 17.7KiB 11.9%
mitogen.parent 99181 96.9KiB 51384 50.2KiB 51.8% 12956 12.7KiB 13.1%
mitogen.fork 8445 8.2KiB 4139 4.0KiB 49.0% 1652 1.6KiB 19.6%
mitogen.ssh 10847 10.6KiB 6913 6.8KiB 63.7% 2102 2.1KiB 19.4%
mitogen.sudo 12089 11.8KiB 5924 5.8KiB 49.0% 2249 2.2KiB 18.6%
mitogen.select 12325 12.0KiB 2929 2.9KiB 23.8% 964 0.9KiB 7.8%
mitogen.service 41581 40.6KiB 22398 21.9KiB 53.9% 5847 5.7KiB 14.1%
mitogen.fakessh 15753 15.4KiB 8135 7.9KiB 51.6% 2672 2.6KiB 17.0%
mitogen.master 52891 51.7KiB 27586 26.9KiB 52.2% 7129 7.0KiB 13.5%
```
4 weeks ago
Alex Willmer
191abd492a
mitogen: Compress first stage without header or checksum (790 bytes -> 786)
...
```console
➜ mitogen git:(boot-cmd--argv) ✗ ./preamble_size.py
SSH command size: 786
Preamble (mitogen.core + econtext) size: 18230 (17.80KiB)
Original Minimized Compressed
mitogen.core 152237 148.7KiB 68453 66.8KiB 45.0% 18130 17.7KiB 11.9%
mitogen.parent 99166 96.8KiB 51375 50.2KiB 51.8% 12957 12.7KiB 13.1%
mitogen.fork 8445 8.2KiB 4139 4.0KiB 49.0% 1652 1.6KiB 19.6%
mitogen.ssh 10847 10.6KiB 6913 6.8KiB 63.7% 2102 2.1KiB 19.4%
mitogen.sudo 12089 11.8KiB 5924 5.8KiB 49.0% 2249 2.2KiB 18.6%
mitogen.select 12325 12.0KiB 2929 2.9KiB 23.8% 964 0.9KiB 7.8%
mitogen.service 41581 40.6KiB 22398 21.9KiB 53.9% 5847 5.7KiB 14.1%
mitogen.fakessh 15753 15.4KiB 8135 7.9KiB 51.6% 2672 2.6KiB 17.0%
mitogen.master 52891 51.7KiB 27586 26.9KiB 52.2% 7129 7.0KiB 13.5%
```
Confirmed Python 2.4 supports this use of zlib.compressobj, despite lack of
mention in https://docs.python.org/2.4/lib/module-zlib.html
```pycon
Python 2.4.6 (#2 , Apr 29 2018, 11:16:24)
[GCC 7.3.0] on linux4
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib
>>> c=zlib.compressobj(zlib.Z_BEST_COMPRESSION,zlib.DEFLATED,-zlib.MAX_WBITS)
>>> c.compress('qwertyuiop') + c.flush()
'+,O-*\xa9,\xcd\xcc/\x00\x00'
```
4 weeks ago
Alex Willmer
408946adbe
mitogen: Golf 8 bytes from bootstrap first stage (798 -> 790)
...
Before
```
SSH command size: 798
Preamble (mitogen.core + econtext) size: 18230 (17.80KiB)
Original Minimized Compressed
mitogen.core 152237 148.7KiB 68453 66.8KiB 45.0% 18130 17.7KiB 11.9%
mitogen.parent 99020 96.7KiB 51247 50.0KiB 51.8% 12910 12.6KiB 13.0%
mitogen.fork 8445 8.2KiB 4139 4.0KiB 49.0% 1652 1.6KiB 19.6%
mitogen.ssh 10847 10.6KiB 6913 6.8KiB 63.7% 2102 2.1KiB 19.4%
mitogen.sudo 12089 11.8KiB 5924 5.8KiB 49.0% 2249 2.2KiB 18.6%
mitogen.select 12325 12.0KiB 2929 2.9KiB 23.8% 964 0.9KiB 7.8%
mitogen.service 41581 40.6KiB 22398 21.9KiB 53.9% 5847 5.7KiB 14.1%
mitogen.fakessh 15753 15.4KiB 8135 7.9KiB 51.6% 2672 2.6KiB 17.0%
mitogen.master 52891 51.7KiB 27586 26.9KiB 52.2% 7129 7.0KiB 13.5%
```
After
```
SSH command size: 790
Preamble (mitogen.core + econtext) size: 18230 (17.80KiB)
Original Minimized Compressed
mitogen.core 152237 148.7KiB 68453 66.8KiB 45.0% 18130 17.7KiB 11.9%
mitogen.parent 99020 96.7KiB 51247 50.0KiB 51.8% 12903 12.6KiB 13.0%
mitogen.fork 8445 8.2KiB 4139 4.0KiB 49.0% 1652 1.6KiB 19.6%
mitogen.ssh 10847 10.6KiB 6913 6.8KiB 63.7% 2102 2.1KiB 19.4%
mitogen.sudo 12089 11.8KiB 5924 5.8KiB 49.0% 2249 2.2KiB 18.6%
mitogen.select 12325 12.0KiB 2929 2.9KiB 23.8% 964 0.9KiB 7.8%
mitogen.service 41581 40.6KiB 22398 21.9KiB 53.9% 5847 5.7KiB 14.1%
mitogen.fakessh 15753 15.4KiB 8135 7.9KiB 51.6% 2672 2.6KiB 17.0%
mitogen.master 52891 51.7KiB 27586 26.9KiB 52.2% 7129 7.0KiB 13.5%
```
4 weeks ago
Alex Willmer
fdb5c62532
Merge pull request #1353 from moreati/prepare-v0.3.31
...
Prepare v0.3.31
4 weeks ago
Alex Willmer
e4e82f53a1
Begin 0.3.32dev
4 weeks ago
Alex Willmer
77b7a31949
Prepare v0.3.31
4 weeks ago
Alex Willmer
69a5cdce1b
Merge pull request #1352 from moreati/issue1350
...
ansible_mitogen: Fix ModuleNotFoundError: No module named 'ansible_mitogen'
4 weeks ago
Alex Willmer
85069b28cd
ansible_mitogen: Fix ModuleNotFoundError: No module named 'ansible_mitogen'
...
Loading the ansible_mitogen Ansible plugins apparently doesn't follow the same
rules as importing a Python module. So sys.path manipulations in __init__.py
weren't fired when Ansible tried to load the plugins from a /custom/path that
wasn't already on sys.path.
This wasn't picked up by the test because CI always installs Mitogen as a
Python package (in a virtual env).
This reverses 6145508312 .
4 weeks ago
Alex Willmer
2305446ab8
Merge pull request #1346 from moreati/prepare-v0.3.30
...
Prepare v0.3.30
1 month ago
Alex Willmer
c72acfd966
Begin v0.3.31.dev
1 month ago
Alex Willmer
1e90ff25ee
Prepare v0.3.30
1 month ago
Alex Willmer
48243724a0
Merge pull request #1341 from mhartmay/logforwarder-fix
...
master: Fix LogForwarder in case an own LogRecordFactory is used
1 month ago
Marc Hartmayer
24745183ed
master: Fix LogForwarder in case an own LogRecordFactory is used
...
Since Python 3.2 the log record factory can be changed by using
`logging.setLogRecordFactory` [1]. Therefore use `logging.makeLogRecord` as
recommended in the documentation:
"LogRecord instances are created automatically by the Logger every time
something is logged, and can be created manually via makeLogRecord() (for
example, from a pickled event received over the wire)." [2]
This fixes the test case
`log_handler_test.LogRecordFactoryTest.test_logrecordfactory`.
[1] https://docs.python.org/3/library/logging.html#logging.setLogRecordFactory
[2] https://docs.python.org/3/library/logging.html#logrecord-objects
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
1 month ago
Marc Hartmayer
dad28e8b4a
tests: Add a test case that verifies behavior when the log record factory is modified
...
The test currently fails with the following error:
$ PYTHONPATH=$(pwd)/tests:$PYTHONPATH python3 -m unittest -v log_handler_test
...
test_logrecordfactory (log_handler_test.LogRecordFactoryTest.test_logrecordfactory) ... --- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.12/logging/__init__.py", line 464, in format
return self._format(record)
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/logging/__init__.py", line 460, in _format
return self._fmt % values
~~~~~~~~~~^~~~~~~~
KeyError: 'custom_attribute'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.12/logging/__init__.py", line 1160, in emit
msg = self.format(record)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/logging/__init__.py", line 999, in format
return fmt.format(record)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/logging/__init__.py", line 999, in format
return fmt.format(record)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/logging/__init__.py", line 706, in format
s = self.formatMessage(record)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/logging/__init__.py", line 675, in formatMessage
return self._style.format(record)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/logging/__init__.py", line 466, in format
raise ValueError('Formatting field not found in record: %s' % e)
ValueError: Formatting field not found in record: 'custom_attribute'
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
1 month ago
Alex Willmer
3c648f7df8
Merge pull request #1345 from moreati/oi-mate-wheres-your-loicense
...
Fix and formalise license metadata
1 month ago
Alex Willmer
01baec8347
Declare license as SPDX identifier in metadata
...
Fixes warning seen during packaging operations
```
➜ mitogen git:(master) ✗ uv build --sdist
Building source distribution...
...
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: BSD License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running egg_info
...
```
1 month ago
Alex Willmer
85f0c33dc5
Correct mitogen.imports.* licenses
1 month ago
Alex Willmer
8f66aa5fcd
Merge pull request #1248 from moreati/sys.path
...
ansible_mitogen: De-duplicate sys.path manipulations by Ansible plugins
1 month ago
Alex Willmer
6145508312
ansible_mitogen: De-duplicate sys.path manipulations by Ansible plugins
1 month ago
Alex Willmer
9701424be0
Merge pull request #1266 from moreati/imports-cleanup
...
Imports cleanup
1 month ago
Alex Willmer
7d5f63ccbf
Cleanup unused and missing imports
1 month ago
Alex Willmer
3338a651a6
Merge pull request #1339 from moreati/prepare-v0.3.29
...
Prepare v0.3.29
3 months ago
Alex Willmer
6071fb58c9
Begin 0.3.30dev
3 months ago
Alex Willmer
e670bf0ebd
Prepare v0.3.29
3 months ago
Alex Willmer
f6451bf795
Merge pull request #1287 from moreati/issue1242-py3.14
...
Python 3.14 support
3 months ago
Alex Willmer
090952a987
Python 3.14 support
3 months ago