Commit Graph

3495 Commits (a3644963c40f117b2bef819cc8617bbd395c7f95)
 

Author SHA1 Message Date
Alex Willmer bce3bab3e8 Add the msvcrt moduleto the default module deny list
Commit https://github.com/python/cpython/commit/880d42a3b247 (first
released in Python 3.8a0) moved an import of msvcrt from an if <win32>
block, into a try/except block. So now the import is tried even on Linux
or MacOS.

https://docs.python.org/3/library/msvcrt.html is a Windows specific
builtin.
4 years ago
Alex Willmer ceb0a94467 Explain why the Python 2.x thread module is blacklisted
Based on the original commit I believe it is only an optimization.
However I could be wrong. I intend to request review of this part.
4 years ago
Alex Willmer 1e72ebaf8b tests: Update test coverage to Python 3.9
The Travis Linux distribution must be upgraded because the Trusty
(Ubuntu 14.04) image does not have Python 3.9. Xenial (Ubuntu 16.04) is
the earliest version that offers Python 3.9.

I have not chosen a later release, in order to aid restoration of Python
2.4 - 2.6 tests.
4 years ago
Alex Willmer 4b39013ef4 tests: Compatiblity shim for threading.Thread.is_alive()
On Python >= 3.8 thread.isAlive() is deprecated (removed in Python 3.9.
On Python <= 2.5 thread.is_alive() isn't present (added in Python 2.6).
4 years ago
Michael Weigle 6b5a46ccd0
Fixes RuntimeWarning for improper bufferring on local connection 4 years ago
Alex Willmer 522085ab35
Merge pull request #788 from moreati/tests-resource_intensive-tag
tests: Tag resource intensive tasks, to skip when strategy=linear
4 years ago
Alex Willmer 7cc9145360
Merge branch 'master' into tests-resource_intensive-tag 4 years ago
Alex Willmer a40f84839d
Merge pull request #797 from moreati/docstrings
tests: docstrings for ci_lib module use in Continuous Integration tests
4 years ago
Alex Willmer f5b3fab04c
Merge branch 'master' into docstrings 4 years ago
Alex Willmer 1a0951c664
Merge branch 'master' into tests-resource_intensive-tag 4 years ago
Alex Willmer ee17634c3b
Merge pull request #790 from moreati/docker-diet
tests: Move test container images to Amazon Elastic Container Registry
4 years ago
Alex Willmer 9111778823
Merge branch 'master' into docker-diet 4 years ago
Alex Willmer db354df331
Merge branch 'master' into fix0.3.0naming 4 years ago
Alex Willmer 6e0a01f8a0
Merge pull request #782 from moreati/tox
tests: Add unofficial Tox environments for Ansible tests
4 years ago
Alex Willmer 25446cd698 tests: Throttle docker pulls for Ansible tests
I hope this will prevent AWS Elastic Container Registry returning 429:
Too Many Requests error, due to the burst of activity from multiple VMs,
when a CI build begins.
4 years ago
Alex Willmer 99235071a3 tests: docstrings for ci_lib 4 years ago
Alex Willmer 1c7e107809 tests: Use AWS Elastic Container registry for test images
This replaces use of Docker Hub, which now rate limits API calls and
causing CI builds to fail.

refs #791
4 years ago
Alex Willmer adbed36dd9 tests: Avoid double docker pull on Azure Pipes 4 years ago
Alex Willmer bb271d8d00 tests: Tag resource intensive tasks, to skip when strategy=linear
The ansible_mitogen test suite takes over an hour when Ansible is not
accelerated by Mitogen. This change aims to reduce that by skipping
tests with a large number of iterations when the linear strategy is
chosen.

The tagged tests are intended to uncover Mitogen resource leaks. Since
Mitogen is not invoked when strategy=linear, the slight reduction in
test coverage is an acceptable trade off.
4 years ago
Alex Willmer 8ced7e2506
Merge branch 'master' into distro-vs-distros 4 years ago
Alex Willmer e8af5adcd7
Merge branch 'master' into tox 4 years ago
Alex Willmer 8654af738b
Merge pull request #784 from mitogen-hq/mitogen-hq-badges
Update badges for new mitogen-hq organisation
4 years ago
Alex Willmer 5b56f9a33a
Update badges for new mitogen-hq organisation
Moving the repository from dw/mitogen to mitogen-hq/mitogen has confused a few external services. This is part of the cleanup
4 years ago
Alex Willmer a64e966ab9 tests: Add unofficial Tox environments for Ansible tests
These are not part of the official testing regime (tests run for pull
requests). I find them convenient for local development.

Limitations
- Python 2.7+ only. No Python 2.4, 2.5, or 2.6.
- Requires Pythons pre-installed (e.g. DeadSnakes, pyenv)
- No coverage of alternate controller OS (e.g. MacOS)

The environments tested by default are

py27-mode_ansible-ansible2.10
py36-mode_ansible-ansible2.10
py39-mode_ansible-ansible2.10
py27-mode_mitogen
py36-mode_mitogen
py39-mode_mitogen
py27-mode_mitogen-distro_centos7
py36-mode_mitogen-distro_centos7
py39-mode_mitogen-distro_centos7
4 years ago
Steven Robertson e8af2c239c fix 0.3.0-rc.0 version reporting 4 years ago
Alex Willmer bc5bf4cc3d
Merge branch 'master' into distro-vs-distros 4 years ago
David Wilson cc8f9a0169
Merge pull request #779 from dw/update-copyright
Bump copyright year and use generic author name (testing Travis)
4 years ago
David Wilson fad6eb1b47 Bump copyright year and use generic author name (testing Travis) 4 years ago
Steven Robertson f7808a0f87
Merge pull request #764 from moreati/issue763
Fix DjangoMixin test imports for setuptools >= 50.0
4 years ago
Alex Willmer 9dce5fe056 tests: Correct DISTRO vs DISTROS usage in CI configurations
The environment variable DISTRO is used to set the target Docker image
used when running the Mitogen unit tests. DISTROS is used for the
Ansible integration tests. VER sets the version of Ansible that is
installed on the controller.

When MODE=Mitogen
- there is no need to set VER, because nothing that installs Ansible
- it does not make sense to set DISTROS.
4 years ago
Alex Willmer f162a8a7c5 Fix DjangoMixin test imports for setuptools >= 50.0 4 years ago
Steven Robertson 0c3ae9f70b
Merge pull request #767 from s1113950/add0.2.10+0.3.0changelog
code cleanup + adds 0.2.10 + 0.3.0 changelog
4 years ago
Steven Robertson ba222744af
Merge branch 'master' into add0.2.10+0.3.0changelog 4 years ago
Steven Robertson e183ad21ff
Merge pull request #769 from MarkusTeufelberger/patch-1
Add ansible.legacy.setup to be fixed on py3.5
4 years ago
MarkusTeufelberger 8d3026b109
Add ansible.legacy.setup to be fixed on py3.5 4 years ago
Steven Robertson f489478127 code cleanup + adds 0.2.10 + 0.3.0 changelog 4 years ago
Steven Robertson 43b104d402
Merge pull request #714 from scottsb/patch-1
Correct latest ansible version supported
4 years ago
Steven Robertson 8d3da2dbd2
Merge branch 'master' into patch-1 4 years ago
Steven Robertson 9463728e6b
Merge pull request #715 from s1113950/collectionsSupport
Ansible 2.10 + Collections support
4 years ago
Steven Robertson 4657979210 adding clarifying comments 4 years ago
Steven Robertson 2510f1a2c2 fix py3.5.1-3.5.3 setup import error for Ansible 2.10 4 years ago
Steven Robertson 22cce2dfae Merge branch 'master' into collectionsSupport 4 years ago
Steven Robertson 27ad214a92
Merge pull request #759 from moreati/callback_me_maybe
tests: Fix AttributeError in callback plugins used by test suite
4 years ago
Alex Willmer 79b4c0f815 tests: Fix AttributeError in callback plugins used by test suite
CALLBACK_VERSION et al are documented as required in
https://docs.ansible.com/ansible/2.10/dev_guide/developing_plugins.html#callback-plugins.
The need for document_fragment is noted in
cfa8075537/lib/ansible/plugins/callback/default.py (L28-L32)

Fixes #758

This addresses the following error, seen while running
`ansible_tests.py`.

```
TASK [Gathering Facts gather_timeout=10, gather_subset=['all']]
****************
task path:
/home/alex/src/mitogen/tests/ansible/regression/issue_109__target_has_old_ansible_installed.yml:4
[WARNING]: Failure using method (v2_runner_on_start) in callback plugin
(<ansible.plugins.callback.nice_stdout.CallbackModule object at
0x7f76b3dad090>): 'show_per_host_start'
Callback Exception:
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py",
line 372, in send_callback
    method(*new_args, **kwargs)
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/default.py",
line 240, in v2_runner_on_start
    if self.get_option('show_per_host_start'):
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/__init__.py",
line 91, in get_option
    return self._plugin_options[k]
Callback Exception:
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py",
line 372, in send_callback
    method(*new_args, **kwargs)
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/default.py",
line 240, in v2_runner_on_start
    if self.get_option('show_per_host_start'):
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/__init__.py",
line 91, in get_option
    return self._plugin_options[k]
[task 339882] 00:00:08.172036 D ansible_mitogen.affinity: CPU mask for
WorkerProcess: 0x000004
Callback Exception:
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py",
line 372, in send_callback
    method(*new_args, **kwargs)
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/default.py",
line 240, in v2_runner_on_start
    if self.get_option('show_per_host_start'):
File
"/home/alex/src/mitogen/.tox/py27-ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/__init__.py",
line 91, in get_option
    return self._plugin_options[k]
```
4 years ago
Steven Robertson f886293a6a Merge branch 'master' into collectionsSupport 4 years ago
Steven Robertson 5a0da02e6c code review changes, using when statements and adding trailing comma 4 years ago
Steven Robertson 5942bfb7d5
Merge pull request #757 from moreati/issue756
ssh: Match newer ssh host key prompt that accepts the fingerprint
4 years ago
Alex Willmer b0ce29dcfd ssh: Match newer ssh host key prompt that accepts the fingerprint
This fixes an ERROR in test_accept_enforce_host_keys() while running the
test suite.

Fixes #756
4 years ago
Steven Robertson 196a476270 🎉 no more warnings, only load specific collection subdirs instead of top-level collection path (ie no ansible_collections/google, only ansible_collections/google/cloud, etc) 4 years ago
Steven Robertson 741e99f698 ansible 2.10 no longer has a at the end of the error msg... 🤦 4 years ago