Commit Graph

3694 Commits (175f70c8a2eece53dfe4e2aa7dbe3438528ae90c)
 

Author SHA1 Message Date
Alex Willmer 6e0a01f8a0
Merge pull request #782 from moreati/tox
tests: Add unofficial Tox environments for Ansible tests
5 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.
5 years ago
Alex Willmer 99235071a3 tests: docstrings for ci_lib 5 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
5 years ago
Alex Willmer adbed36dd9 tests: Avoid double docker pull on Azure Pipes 5 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.
5 years ago
Alex Willmer 8ced7e2506
Merge branch 'master' into distro-vs-distros 5 years ago
Alex Willmer e8af5adcd7
Merge branch 'master' into tox 5 years ago
Alex Willmer 8654af738b
Merge pull request #784 from mitogen-hq/mitogen-hq-badges
Update badges for new mitogen-hq organisation
5 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
5 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
5 years ago
Steven Robertson e8af2c239c fix 0.3.0-rc.0 version reporting 5 years ago
Alex Willmer bc5bf4cc3d
Merge branch 'master' into distro-vs-distros 5 years ago
David Wilson cc8f9a0169
Merge pull request #779 from dw/update-copyright
Bump copyright year and use generic author name (testing Travis)
5 years ago
David Wilson fad6eb1b47 Bump copyright year and use generic author name (testing Travis) 5 years ago
David Wilson 8b2bb9e43f Merge remote-tracking branch 'origin/master' into docs-master
* origin/master: (277 commits)
  Fix DjangoMixin test imports for setuptools >= 50.0
  Add ansible.legacy.setup to be fixed on py3.5
  code cleanup + adds 0.2.10 + 0.3.0 changelog
  adding clarifying comments
  fix py3.5.1-3.5.3 setup import error for Ansible 2.10
  tests: Fix AttributeError in callback plugins used by test suite
  code review changes, using when statements and adding trailing comma
  ssh: Match newer ssh host key prompt that accepts the fingerprint
  🎉 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)
  ansible 2.10 no longer has a  at the end of the error msg... 🤦
  skip vanilla Ansible 2.10 hanging task if not is_mitogen
  vanilla ansible is now running but is really slow; bump timeout
  try vanilla ansible 2.10 on Mac
  travis is having trouble running vanilla Ansible so migrating to Azure
  disable debops since it breaks with ansible 2.10
  install all required debops extras for ansible
  netaddr needs to be on the Ansible controller, not in target nodes
  forgot to update apt cache
  turn off host key checking with ad-hoc python-netaddr install and add back in debops command line
  don't need to ci_lib run setting up python-netaddr
  need to specify strategy plugin for ansible ad-hoc
  need python-netaddr in docker target containers for debops
  adding hopefully new-style import that works for Ansible 2.10
  make sure to apt-get update first before install
  apt needs sudo
  disable python <= 2.6 tests
  install missing python-netaddr for debops
  revert missing interpreter change, it breaks with Mitogen and without Mitogen, something else might be causing new-style detection to not work
  oops, broke new-style missing interpreter detection. Regex should match now
  fix custom_python_new_style_missing_interpreter, looks like Ansible 2.10 changed how new-style module detection works
  add workaround for TravisCI 4MB log limit job termination
  fix regression in Darwin 19 (OSX 10.15+) ansible python interpreter detection
  something broke with Mac 10.14 with dscl, before trying a hack see if OS upgrade works
  don't run sshpass install through run
  azure tests don't like sshpass v1.06 so pegging to 1.05
  fix Error: Calling Non-checksummed download of sshpass formula file from an arbitrary URL is disabled
  result length is 3 in Azure, 4 on local Mac
  fixed ansible_become_pass test, looks like regression on Ansible's end
  localhost_ansible tests now pass, adding -vvv to ansible_tests to get more debug info there
  fixed issue of switching between mitogen and non-mitogen strategies
  fix yml parsing
  oops, yml file can't be empty
  ignore another flaky test that works locally
  fix ansible version check error
  fix runner_one_job ansible version comparison
  oops, 0664 not 0666
  fix fixup_perms2() test
  default copy perms look like 0644 now based on ansible source and docs
  missed a format call var
  remove ansible from github tag install setup in test config files
  add support for ansible_collections site-package (from pip ansible==2.10.0 install) + switch to ansible 2.10.0 rather than github tag
  remove debugging
  remove synchronize fail test for azure
  ignore synchronize for now, made ticket
  try and get some visibility into test failures
  fix venv install
  see if sys.path is being loaded properly on azure
  print didn't work because verbosity, throw valueerror to see
  more debugging, synchronize is being weird on azure
  python3 needs python3-venv
  tests are in a bad state...somehow both apt and brew can exist on azure using a linux job with an ubuntu vm image???
  need to group all python install commands together
  python3 tests are broken...
  cffi super old, try and update it
  try a different psycopg2 package as well
  need to install psycopg2-binary in the created venv
  fix 'struct _is' error hopefully
  brew is missing postgresql
  awesome, /usr/local/bin/python2.7 already exists
  missed a format
  wrong letter 🤦 what am I doing
  missed a )
  missed a ,
  clean up azure python version used
  print what's being ran in tests
  try running ansible_mitogen 2.10 tests with python3
  check sys.path issue
  add back in ansible tests but don't run synchronize
  turn off failing Ansible-only tests for now, also raising errors to see what Azure is gonna do with collections
  removed duplicate install and added debug dump of collection loading to see what tests are doing
  ansible.posix.synchronize isn't being loaded in tests but is locally, reducing v count to get around azure devops scroll bug
  hopefully this also fails the same way
  any amount of v is too much v, even when viewing tests in raw log file mode
  add missing collections 🤦
  verify collection is working as expected
  can't replicate but think it's because synchronize is now a collection
  2 v freezes things...this is impossible to debug
  figure out what synchronize is now
  put future import in wrong place
  3 v is too much v for azure devops to render
  add some debugging info, was able to run the failed synchronize test locally just fine using test framework, not sure what's going on
  test cleanup and trying to replicate synchronize fails
  warnings silenced, see if can put back in vvv
  try and suppress mode warning clogging up logs
  logs too verbose, unable to load test page
  run tests with verbose logging
  perhaps a modern debops version will work
  travis pip is 9 from what the logs say
  remove ansible 2.4-specific test
  fix fixup_perms2 default file mode
  ...
5 years ago
Steven Robertson f7808a0f87
Merge pull request #764 from moreati/issue763
Fix DjangoMixin test imports for setuptools >= 50.0
5 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.
5 years ago
Alex Willmer f162a8a7c5 Fix DjangoMixin test imports for setuptools >= 50.0 5 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
5 years ago
Steven Robertson ba222744af
Merge branch 'master' into add0.2.10+0.3.0changelog 5 years ago
Steven Robertson e183ad21ff
Merge pull request #769 from MarkusTeufelberger/patch-1
Add ansible.legacy.setup to be fixed on py3.5
5 years ago
MarkusTeufelberger 8d3026b109
Add ansible.legacy.setup to be fixed on py3.5 5 years ago
Steven Robertson f489478127 code cleanup + adds 0.2.10 + 0.3.0 changelog 5 years ago
Steven Robertson 43b104d402
Merge pull request #714 from scottsb/patch-1
Correct latest ansible version supported
5 years ago
Steven Robertson 8d3da2dbd2
Merge branch 'master' into patch-1 5 years ago
Steven Robertson 9463728e6b
Merge pull request #715 from s1113950/collectionsSupport
Ansible 2.10 + Collections support
5 years ago
Steven Robertson 4657979210 adding clarifying comments 5 years ago
Steven Robertson 2510f1a2c2 fix py3.5.1-3.5.3 setup import error for Ansible 2.10 5 years ago
Steven Robertson 22cce2dfae Merge branch 'master' into collectionsSupport 5 years ago
Steven Robertson 27ad214a92
Merge pull request #759 from moreati/callback_me_maybe
tests: Fix AttributeError in callback plugins used by test suite
5 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]
```
5 years ago
Steven Robertson f886293a6a Merge branch 'master' into collectionsSupport 5 years ago
Steven Robertson 5a0da02e6c code review changes, using when statements and adding trailing comma 5 years ago
Steven Robertson 5942bfb7d5
Merge pull request #757 from moreati/issue756
ssh: Match newer ssh host key prompt that accepts the fingerprint
5 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
5 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) 5 years ago
Steven Robertson 741e99f698 ansible 2.10 no longer has a at the end of the error msg... 🤦 5 years ago
Steven Robertson e6d7cd3aff skip vanilla Ansible 2.10 hanging task if not is_mitogen 5 years ago
Steven Robertson 91f55a60bc vanilla ansible is now running but is really slow; bump timeout 5 years ago
Steven Robertson 90f40ada6c try vanilla ansible 2.10 on Mac 5 years ago
Steven Robertson ef029726e2 travis is having trouble running vanilla Ansible so migrating to Azure 5 years ago
Steven Robertson 46a0fc92a1 disable debops since it breaks with ansible 2.10 5 years ago
Steven Robertson 855750a71f install all required debops extras for ansible 5 years ago
Steven Robertson 8b845974fb netaddr needs to be on the Ansible controller, not in target nodes 5 years ago
Steven Robertson 4721334dc9 forgot to update apt cache 5 years ago
Steven Robertson 428f4d8703 turn off host key checking with ad-hoc python-netaddr install and add back in debops command line 5 years ago
Steven Robertson 550265d426 don't need to ci_lib run setting up python-netaddr 5 years ago
Steven Robertson 88dde70b5c need to specify strategy plugin for ansible ad-hoc 5 years ago
Steven Robertson db5e7032c8 need python-netaddr in docker target containers for debops 5 years ago