Merge pull request #1144 from moreati/washup

Washup
pull/994/merge
Alex Willmer 3 weeks ago committed by GitHub
commit 45ab5344d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -158,6 +158,7 @@ def _connect_ssh(spec):
}
}
def _connect_buildah(spec):
"""
Return ContextService arguments for a Buildah connection.
@ -173,6 +174,7 @@ def _connect_buildah(spec):
}
}
def _connect_docker(spec):
"""
Return ContextService arguments for a Docker connection.
@ -276,6 +278,7 @@ def _connect_podman(spec):
}
}
def _connect_setns(spec, kind=None):
"""
Return ContextService arguments for a mitogen_setns connection.

@ -36,8 +36,6 @@ import random
import traceback
import ansible
import ansible.constants
import ansible.plugins
import ansible.plugins.action
import ansible.utils.unsafe_proxy
import ansible.vars.clean

@ -64,6 +64,7 @@ __metaclass__ = type
import abc
import logging
import os
import ansible.utils.shlex
import ansible.constants as C
import ansible.executor.interpreter_discovery
@ -88,12 +89,12 @@ def run_interpreter_discovery_if_necessary(s, task_vars, action, rediscover_pyth
# keep trying different interpreters until we don't error
if action._finding_python_interpreter:
return action._possible_python_interpreter
if s in ['auto', 'auto_legacy', 'auto_silent', 'auto_legacy_silent']:
# python is the only supported interpreter_name as of Ansible 2.8.8
interpreter_name = 'python'
discovered_interpreter_config = u'discovered_interpreter_%s' % interpreter_name
if task_vars.get('ansible_facts') is None:
task_vars['ansible_facts'] = {}
@ -134,7 +135,7 @@ def run_interpreter_discovery_if_necessary(s, task_vars, action, rediscover_pyth
def parse_python_path(s, task_vars, action, rediscover_python):
"""
Given the string set for ansible_python_interpeter, parse it using shell
syntax and return an appropriate argument vector. If the value detected is
syntax and return an appropriate argument vector. If the value detected is
one of interpreter discovery then run that first. Caches python interpreter
discovery value in `facts_from_task_vars` like how Ansible handles this.
"""

@ -1275,7 +1275,7 @@ on each process whose name begins with ``mitogen:``::
[pid 29858] futex(0x55ea9be52f60, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, 0xffffffff
^C
$
$
This shows one thread waiting on IO (``poll``) and two more waiting on the same
lock. It is taken from a real example of a deadlock due to a forking bug.

@ -21,6 +21,8 @@ To avail of fixes in an unreleased version, please download a ZIP file
In Progress (unreleased)
------------------------
* :gh:issue:`1138` CI: Complete migration from Azure DevOps Pipelines to
GitHub Actions
v0.3.11 (2024-10-07)
@ -117,7 +119,7 @@ v0.3.4 (2023-07-02)
* :gh:issue:`929` Support Ansible 6 and ansible-core 2.13
* :gh:issue:`832` Fix runtime error when using the ansible.builtin.dnf module multiple times
* :gh:issue:`925` :class:`ansible_mitogen.connection.Connection` no longer tries to close the
* :gh:issue:`925` :class:`ansible_mitogen.connection.Connection` no longer tries to close the
connection on destruction. This is expected to reduce cases of `mitogen.core.Error: An attempt
was made to enqueue a message with a Broker that has already exitted`. However it may result in
resource leaks.

@ -1038,7 +1038,7 @@ receive items in the order they are requested, as they become available.
Mitogen enables SSH compression by default, there are circumstances where
disabling SSH compression is desirable, and many scenarios for future
connection methods where transport-layer compression is not supported at
all.
all.
.. [#f2] Compression may seem redundant, however it is basically free and reducing IO
is always a good idea. The 33% / 200 byte saving may mean the presence or

@ -119,7 +119,7 @@ def _chroot(path):
os.chroot(path)
class Operations(fuse.Operations): # fuse.LoggingMixIn,
class Operations(fuse.Operations): # fuse.LoggingMixIn,
def __init__(self, host, path='.'):
self.host = host
self.root = path

@ -61,7 +61,7 @@ def child_main(sender, delay):
Executed on the main thread of the Python interpreter running on each
target machine, Context.call() from the master. It simply sends the output
of the UNIX 'ps' command at regular intervals toward a Receiver on master.
:param mitogen.core.Sender sender:
The Sender to use for delivering our result. This could target
anywhere, but the sender supplied by the master simply causes results

@ -3290,7 +3290,7 @@ class Router(object):
This can be used from any thread, but its output is only meaningful
from the context of the :class:`Broker` thread, as disconnection or
replacement could happen in parallel on the broker thread at any
moment.
moment.
"""
return (
self._stream_by_id.get(dst_id) or

@ -652,7 +652,7 @@ class ParentImpEnumerationMethod(FinderMethod):
insane) parent package, and if no insane parents exist, simply use
:mod:`sys.path` to search for it from scratch on the filesystem using the
normal Python lookup mechanism.
This is required for older versions of :mod:`ansible.compat.six`,
:mod:`plumbum.colors`, Ansible 2.8 :mod:`ansible.module_utils.distro` and
its submodule :mod:`ansible.module_utils.distro._distro`.

@ -631,7 +631,7 @@ class TimerList(object):
def get_timeout(self):
"""
Return the floating point seconds until the next event is due.
:returns:
Floating point delay, or 0.0, or :data:`None` if no events are
scheduled.

@ -11,7 +11,6 @@
- name: integration/connection_delegation/delegate_to_template.yml
vars:
physical_host: "cd-normal-alias"
physical_hosts: ["cd-normal-alias", "cd-normal-normal"]
hosts: test-targets
gather_facts: no
tasks:

@ -52,7 +52,7 @@
{% if "1" == "1" %}
{{ special_python }}
{% else %}
python
python
{% endif %}
tags:
- complex_args

@ -48,7 +48,7 @@ class CastTest(unittest.TestCase):
self.assertCasts(wrap_var([]), [])
self.assertCasts(wrap_var(u''), u'')
self.assertCasts(wrap_var(()), [])
def test_subtypes_roundtrip(self):
self.assertCasts(wrap_var(Bytes()), b'')
self.assertCasts(wrap_var(Dict()), {})

@ -15,7 +15,7 @@ tar xzvf cpython-2.4.6.tar.gz
(
cd cpython-2.4.6
./configure --prefix=/usr/local/python2.4.6 --with-pydebug --enable-debug CFLAGS="-g -O0" # --enable-debug
./configure --prefix=/usr/local/python2.4.6 --with-pydebug --enable-debug CFLAGS="-g -O0" # --enable-debug
echo 'zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz' >> Modules/Setup.config
make -j 8
sudo make install

@ -2,8 +2,7 @@
# I use this locally on Ubuntu 22.04, with the following additions
#
# sudo add-apt-repository ppa:deadsnakes/ppa
# sudo apt update
# sudo apt install awscli lib{ldap2,sasl2,ssl}-dev python{2,2.7,3} python3.{6..13}{,-venv} python-is-python3 sshpass tox
# sudo apt install lib{ldap2,sasl2,ssl}-dev python{2,2.7,3}{,-dev} python3.{7..13}{,-dev,-venv} python-is-python3 sshpass tox
# Py A cntrllr A target coverage Django Jinja2 pip psutil pytest tox virtualenv
# ==== ========== ========== ========== ========== ========== ========== ========== ========== ========== ==========
@ -99,9 +98,6 @@ passenv =
ANSIBLE_*
HOME
MITOGEN_*
# Azure DevOps, TF_BUILD is set to 'True' when running in a build task
# https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables
TF_BUILD
setenv =
# See also azure-pipelines.yml
ANSIBLE_STRATEGY = mitogen_linear

Loading…
Cancel
Save