Commit Graph

223 Commits (e120cd2caeb41fccd2502b427628ff9ff6b66ac3)

Author SHA1 Message Date
Alex Willmer 3ba1625a99 ci: Reduce verbosity of Ansible integration tests 3 years ago
Alex Willmer 9e9161cbb9 CI: Clamp ansible-base to < 2.10.14
refs #861
3 years ago
Alex Willmer a990eb3d77 CI: Remove obsolete reverse shell historically used to debug CI
This reverse shell was historically used to debug CI jobs interactively.
It is not used anymore, and may be causing jobs to hang, then timeout.
There is no reason to keep it, and removing it simplifies CI jobs.

Additionally it has been reported as flagged by security scanners, so
removing it makes Mitogen easier to package/adopt.

fixes #847
3 years ago
Alex Willmer 042e46682e Abandon Travis CI We have no credits, and its a PITA to maintain two CI platforms. The tests running on Travis provide very little extra coverage vs Azure Pipelines alone 3 years ago
Alex Willmer 0db7467e4a tests: Authenticate to AWS Elastic Container Registry for `docker pull`
This should increase the rate limit from 1/s to 10/s. AWS
credentials are obtained from environment variables in Azure
pipelines, or the default AWS CLI profile.

https://docs.aws.amazon.com/AmazonECR/latest/public/public-service-quotas.html
https://docs.aws.amazon.com/AmazonECR/latest/public/public-registries.html#public-registry-auth
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
3 years ago
Alex Willmer 3d350643a9 tests: Tighten requirements.txt, due to new package releases
Attempt to fix

Collecting hdrhistogram==0.6.1 (from -r tests/ansible/requirements.txt
(line 2))
Downloading
2422ad2ad90047d3b9f73061e8696f/hdrhistogram-0.6.1.tar.gz
(61kB)
    Complete output from command python setup.py egg_info:
    Couldn't find index page for 'pbr' (maybe misspelled?)
        sources=['src/python-codec.c'])]
      File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
File "/tmp/venv/lib/python3.5/site-packages/setuptools/dist.py",
line 315, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
File "/tmp/venv/lib/python3.5/site-packages/setuptools/dist.py",
line 361, in fetch_build_eggs
        replace_conflicting=True,
File
"/tmp/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line
850, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
File
"/tmp/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line
1122, in best_match
        return self.obtain(req, installer)
File
"/tmp/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line
1134, in obtain
        return installer(requirement)
File "/tmp/venv/lib/python3.5/site-packages/setuptools/dist.py",
line 429, in fetch_build_egg
        return cmd.easy_install(req)
File
"/tmp/venv/lib/python3.5/site-packages/setuptools/command/easy_install.py",
line 659, in easy_install
        raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable
distribution for Requirement.parse('pbr')
3 years ago
Alex Willmer a8e8cf91cb tests: Rebuild Docker containers
A few changes are bundled in this
 - Ansible 2.10.x and Mitogen 0.3.x are used to build nearly all images
   (Ansile 2.3.x is retained for CentOS 5, because it uses Python 2.4).
 - Tox is used to install/run Ansible, replacing build_docker_images.py
 - A static inventory, identifying containers by name rather than ID.
 - debian-test image is renamed to debian9-test
 - debian9-test image is now based on debian:9
 - centos6-test image is now based on moreati/centos6-vault
   following the same scheme as centos5-test.
 - Images are now uploaded to Amazon Elastic Container Registry (ECR).
   See #809.
 - Debian recommended packages aren't installed (e.g. build-essential)
 - Python 2.x and Python 3.x are installed wherever available.
 - Python Virtualenv is installed wherever available.
4 years ago
Alex Willmer e67e4b83b4 tests: Fix throttling of Docker pulls
fixes #809
4 years ago
Alex Willmer b71fbe528c
Merge branch 'master' into distro-vs-distros 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 7cc9145360
Merge branch 'master' into tests-resource_intensive-tag 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 9111778823
Merge branch 'master' into docker-diet 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 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
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
Steven Robertson 91f55a60bc vanilla ansible is now running but is really slow; bump timeout 4 years ago
Steven Robertson 90f40ada6c try vanilla ansible 2.10 on Mac 4 years ago
Steven Robertson ef029726e2 travis is having trouble running vanilla Ansible so migrating to Azure 4 years ago
Steven Robertson 855750a71f install all required debops extras for ansible 4 years ago
Steven Robertson 8b845974fb netaddr needs to be on the Ansible controller, not in target nodes 4 years ago
Steven Robertson 4721334dc9 forgot to update apt cache 4 years ago
Steven Robertson 428f4d8703 turn off host key checking with ad-hoc python-netaddr install and add back in debops command line 4 years ago
Steven Robertson 550265d426 don't need to ci_lib run setting up python-netaddr 4 years ago
Steven Robertson 88dde70b5c need to specify strategy plugin for ansible ad-hoc 4 years ago
Steven Robertson db5e7032c8 need python-netaddr in docker target containers for debops 4 years ago
Steven Robertson ce91d5ee25 make sure to apt-get update first before install 4 years ago
Steven Robertson c96dddae28 apt needs sudo 4 years ago
Steven Robertson 1dadae03a9 install missing python-netaddr for debops 4 years ago
Steven Robertson cf3d646613 fix custom_python_new_style_missing_interpreter, looks like Ansible 2.10 changed how new-style module detection works 4 years ago
Steven Robertson ae4f6ece41 add workaround for TravisCI 4MB log limit job termination 4 years ago
Steven Robertson a561a8bad2 something broke with Mac 10.14 with dscl, before trying a hack see if OS upgrade works 4 years ago
Steven Robertson 86e63fda85 don't run sshpass install through run 4 years ago
Steven Robertson ddb87f6b0c azure tests don't like sshpass v1.06 so pegging to 1.05 4 years ago
Steven Robertson b68d4e9a7f fix Error: Calling Non-checksummed download of sshpass formula file from an arbitrary URL is disabled 4 years ago
Steven Robertson b469da399b localhost_ansible tests now pass, adding -vvv to ansible_tests to get more debug info there 4 years ago
Steven Robertson 4b37699b45 missed a format call var 4 years ago
Steven Robertson ce57e81b22 remove ansible from github tag install setup in test config files 4 years ago
Steven Robertson 33e176d62e add support for ansible_collections site-package (from pip ansible==2.10.0 install) + switch to ansible 2.10.0 rather than github tag 4 years ago
Steven Robertson 207e36194d try and get some visibility into test failures 4 years ago
Steven Robertson e1e28f14e3 fix venv install 4 years ago
Steven Robertson 2a06d493de python3 needs python3-venv 4 years ago
Steven Robertson d7d29ad9c1 tests are in a bad state...somehow both apt and brew can exist on azure using a linux job with an ubuntu vm image??? 4 years ago
Steven Robertson be70dc9e5d need to group all python install commands together 4 years ago
Steven Robertson 3404654ab4 python3 tests are broken... 4 years ago
Steven Robertson 7f58af6977 try a different psycopg2 package as well 4 years ago
Steven Robertson 9a34d5c2c9 need to install psycopg2-binary in the created venv 4 years ago
Steven Robertson 9bef6fe784 fix 'struct _is' error hopefully 4 years ago
Steven Robertson ed2473400b brew is missing postgresql 4 years ago
Steven Robertson 24c0737d37 awesome, /usr/local/bin/python2.7 already exists 4 years ago
Steven Robertson 3831f691c1 missed a format 4 years ago
Steven Robertson af08fb1276 wrong letter 🤦 what am I doing 4 years ago
Steven Robertson 1154a979b1 missed a ) 4 years ago
Steven Robertson c73f19f276 missed a , 4 years ago
Steven Robertson 7507b88255 clean up azure python version used 4 years ago
Steven Robertson a6c293d100 try running ansible_mitogen 2.10 tests with python3 4 years ago
Steven Robertson a7705a3435 add back in ansible tests but don't run synchronize 4 years ago
Steven Robertson ff8a276186 turn off failing Ansible-only tests for now, also raising errors to see what Azure is gonna do with collections 4 years ago
Steven Robertson f757dbcb82 removed duplicate install and added debug dump of collection loading to see what tests are doing 4 years ago
Steven Robertson 5fa9f97b66 ansible.posix.synchronize isn't being loaded in tests but is locally, reducing v count to get around azure devops scroll bug 4 years ago
Steven Robertson 2303bef7c8 any amount of v is too much v, even when viewing tests in raw log file mode 4 years ago
Steven Robertson 5aedb5f157 add missing collections 🤦 4 years ago
Steven Robertson d017b60f47 2 v freezes things...this is impossible to debug 4 years ago
Steven Robertson 40d53bcf96 3 v is too much v for azure devops to render 4 years ago
Steven Robertson f91cbf4d00 test cleanup and trying to replicate synchronize fails 4 years ago
Steven Robertson 8d95172821 warnings silenced, see if can put back in vvv 4 years ago
Steven Robertson 0a46a4e47b logs too verbose, unable to load test page 4 years ago
Steven Robertson b3c94867e2 run tests with verbose logging 4 years ago
Steven Robertson 069d7da79f perhaps a modern debops version will work 4 years ago
Steven Robertson dc94633011 ansible_install.py already installs ansible and collections, so don't need to in ansible_tests.py 4 years ago
Steven Robertson 2c9b6433ef fix another encoding place 4 years ago
Steven Robertson 140406342b fixed installing into python2 container by specifying encoding 4 years ago
Steven Robertson 371f0a6657 ansible 2.10 installed in python 2.7.16 locally, see if it's the python version or pip that's the issue 4 years ago
Steven Robertson 55c5a274cc install community.general collection 4 years ago
Steven Robertson 3a3b8bcb80 oops, forgot a ) 4 years ago
Steven Robertson 437761ebef more test scripts 4 years ago
Steven Robertson 5dee6fb891 fix ansible install, also TODO: why do we have 3 almost the same install scripts... 4 years ago
Steven Robertson 130e111f21 rename test and add VER to mito27_27 4 years ago
Steven Robertson fa1269bca8 see what happens with only ansible 2.10 tests, still need to install collections tho 4 years ago
Steven Robertson cc8febb841 use new released 2.10 4 years ago
Steven Robertson e34cf8667f
Merge branch 'master' into collectionsSupport 4 years ago
Steven Robertson bacc752ff2 Pegs python 2 version, removes unused imports, fixes sudden ssh dir with bad perms, generates key for sudo user as well in tests 4 years ago
Steven Robertson b20aa982c7 use a commit that actually exists 5 years ago
Steven Robertson c2ee512a99 fix duplicate test name 5 years ago
Steven Robertson 40183138b4 add some tests pointing to almost-devel version of Ansible for collection preparation 5 years ago
Steven Robertson 573a3c6161 have to number format option for python2.6 5 years ago
Steven Robertson 6bdcbff7b2 upgrade to ubuntu 18 might fix keyserver thing 5 years ago
Steven Robertson e0666edaac fix formatting 5 years ago
Steven Robertson 530f5e6412 read in ansible installation version always 5 years ago
Steven Robertson db386a0350 enable ansible 2.9.6 tests 5 years ago
Steven Robertson a94e3d08f9 didn't need to update all the way to 10.15; since tests pass locally on 10.14.4 will switch to 10.14 5 years ago
Steven Robertson faf7798c16 revert python3 setup + add TODO; python3 tests aren't working now but python2 is EOL so they should work soon 5 years ago
Steven Robertson bbc13d9776 permission denied error for python3 5 years ago
Steven Robertson f8c8889009 mac's SIP prevents symlinking so python3 wasn't used ever 5 years ago
Steven Robertson ccabb46b37 upgrade ansible to latest 2.8 version + bump python version in attempt to get test passing 5 years ago