Skip to content

Commit

Permalink
Merge pull request #1057 from moreati/release-v0.3.7
Browse files Browse the repository at this point in the history
Release v0.3.7
  • Loading branch information
moreati authored Apr 9, 2024
2 parents b488bae + f6ed546 commit 3f7a0f7
Show file tree
Hide file tree
Showing 72 changed files with 436 additions and 231 deletions.
21 changes: 17 additions & 4 deletions .ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
#variables:
#ANSIBLE_VERBOSITY: 3

trigger:
branches:
include:
- "*"
exclude:
- docs-master

jobs:
- job: mac11
# vanilla Ansible is really slow
Expand All @@ -27,15 +34,15 @@ jobs:

Loc_27_210:
tox.env: py27-mode_localhost-ansible2.10
Loc_312_7:
Loc_312_9:
python.version: '3.12'
tox.env: py312-mode_localhost-ansible7
tox.env: py312-mode_localhost-ansible9

Van_27_210:
tox.env: py27-mode_localhost-ansible2.10-strategy_linear
Van_312_7:
Van_312_9:
python.version: '3.12'
tox.env: py312-mode_localhost-ansible7-strategy_linear
tox.env: py312-mode_localhost-ansible9-strategy_linear

- job: Linux
pool:
Expand Down Expand Up @@ -150,3 +157,9 @@ jobs:
Ans_312_7:
python.version: '3.12'
tox.env: py312-mode_ansible-ansible7
Ans_312_8:
python.version: '3.12'
tox.env: py312-mode_ansible-ansible8
Ans_312_9:
python.version: '3.12'
tox.env: py312-mode_ansible-ansible9
2 changes: 1 addition & 1 deletion ansible_mitogen/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


ANSIBLE_VERSION_MIN = (2, 10)
ANSIBLE_VERSION_MAX = (2, 14)
ANSIBLE_VERSION_MAX = (2, 16)

NEW_VERSION_MSG = (
"Your Ansible version (%s) is too recent. The most recent version\n"
Expand Down
22 changes: 19 additions & 3 deletions docs/ansible_detailed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,25 @@ Noteworthy Differences
* Mitogen 0.2.x supports Ansible 2.3-2.9; with Python 2.6, 2.7, or 3.6.
Mitogen 0.3.1+ supports

- Ansible 2.10, 3, and 4; with Python 2.7, or 3.6-3.11
- Ansible 5; with Python 3.8-3.11
- Ansible 6 and 7; with Python 3.8-3.12
+-----------------+-----------------+
| Ansible version | Python versions |
+=================+=================+
| 2.10 | |
+-----------------+ |
| 3 | 2.7, 3.6 - 3.11 |
+-----------------+ |
| 4 | |
+-----------------+-----------------+
| 5 | 3.8 - 3.11 |
+-----------------+-----------------+
| 6 | |
+-----------------+ 3.8 - 3.12 |
| 7 | |
+-----------------+-----------------+
| 8 | 3.9 - 3.12 |
+-----------------+-----------------+
| 9 | 3.10 - 3.12 |
+-----------------+-----------------+

Verify your installation is running one of these versions by checking
``ansible --version`` output.
Expand Down
9 changes: 9 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ Release Notes
To avail of fixes in an unreleased version, please download a ZIP file
`directly from GitHub <https://github.com/mitogen-hq/mitogen/>`_.


v0.3.7 (2024-04-08)
-------------------

* :gh:issue:`1021` Support for Ansible 8 (ansible-core 2.15)
* tests: Replace uses of ``include:`` & ``import:``, unsupported in Ansible 9
* :gh:issue:`1053` Support for Ansible 9 (ansible-core 2.16)


v0.3.6 (2024-04-04)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

sys.path.append('.')

VERSION = '0.3.6'
VERSION = '0.3.7'

author = u'Network Genomics'
copyright = u'2021, the Mitogen authors'
Expand Down
2 changes: 1 addition & 1 deletion mitogen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@


#: Library version as a tuple.
__version__ = (0, 3, 6)
__version__ = (0, 3, 7)


#: This is :data:`False` in slave contexts. Previously it was used to prevent
Expand Down
3 changes: 2 additions & 1 deletion scripts/pogrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# - apt-get source libpam0g
# - cd */po/
# - python ~/pogrep.py "Password: "
from __future__ import print_function

import sys
import shlex
Expand All @@ -31,7 +32,7 @@
if last_word == 'msgid' and word == 'msgstr':
if last_rest == sys.argv[1]:
thing = rest.rstrip(': ').decode('utf-8').lower().encode('utf-8').encode('base64').rstrip()
print ' %-60s # %s' % (repr(thing)+',', path)
print(' %-60s # %s' % (repr(thing)+',', path))

last_word = word
last_rest = rest
Expand Down
4 changes: 2 additions & 2 deletions tests/ansible/integration/action/make_tmp_path.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
- name: integration/action/make_tmp_path.yml
hosts: test-targets
tasks:
- meta: end_play
when: not is_mitogen
- include_tasks: ../_mitogen_only.yml

#
# non-root
Expand Down Expand Up @@ -161,3 +160,4 @@
fail_msg: out={{out}}
tags:
- make_tmp_path
- mitogen_only
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: integration/async/runner_timeout_then_polling.yml
hosts: test-targets
tasks:
- include_tasks: ../_mitogen_only.yml

# Verify async-with-timeout-then-poll behaviour.
# This is semi-broken in upstream Ansible, it does not bother to update the
Expand All @@ -13,7 +14,6 @@
async: 1
poll: 0
register: job
when: is_mitogen

- name: busy-poll up to 500 times
async_status:
Expand All @@ -22,7 +22,6 @@
until: result.finished
retries: 500
delay: 0
when: is_mitogen
ignore_errors: true

- assert:
Expand All @@ -31,6 +30,6 @@
- result.finished == 1
- result.msg == "Job reached maximum time limit of 1 seconds."
fail_msg: result={{result}}
when: is_mitogen
tags:
- mitogen_only
- runner_timeout_then_polling
6 changes: 2 additions & 4 deletions tests/ansible/integration/become/sudo_requiretty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@
- name: integration/become/sudo_requiretty.yml
hosts: test-targets
tasks:
# - include_tasks: ../_mitogen_only.yml

# TODO: https://github.com/dw/mitogen/issues/692
# - name: Verify we can login to a non-passworded requiretty account
# shell: whoami
# become: true
# become_user: mitogen__require_tty
# register: out
# when: is_mitogen

# - assert:
# that:
# - out.stdout == 'mitogen__require_tty'
# when: is_mitogen


# ---------------
Expand All @@ -28,12 +27,11 @@
# vars:
# ansible_become_pass: require_tty_pw_required_password
# register: out
# when: is_mitogen

# - assert:
# that:
# - out.stdout == 'mitogen__require_tty_pw_required'
# when: is_mitogen
tags:
- mitogen_only
- sudo
- sudo_requiretty
6 changes: 2 additions & 4 deletions tests/ansible/integration/connection/become_same_user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,27 @@
hosts: bsu-joe
gather_facts: no
tasks:
- include_tasks: ../_mitogen_only.yml

# bsu-joe's login user is joe, so become should be ignored.
- mitogen_get_stack:
become: true
become_user: joe
register: out
when: is_mitogen

- assert:
that:
- out.result[0].method == "ssh"
- out.result[0].kwargs.username == "joe"
- out.result|length == 1 # no sudo
fail_msg: out={{out}}
when: is_mitogen


# Now try with a different account.
- mitogen_get_stack:
become: true
become_user: james
register: out
when: is_mitogen

- assert:
that:
Expand All @@ -37,6 +35,6 @@
- out.result[1].kwargs.username == "james"
- out.result|length == 2 # no sudo
fail_msg: out={{out}}
when: is_mitogen
tags:
- become_same_user
- mitogen_only
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
gather_facts: no
any_errors_fatal: false
tasks:
- meta: end_play
when: not is_mitogen
- include_tasks: ../_mitogen_only.yml

- name: Run _disconnect_during_module.yml
delegate_to: localhost
Expand All @@ -32,3 +31,4 @@
tags:
- disconnect
- disconnect_during_module
- mitogen_only
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
hosts: test-targets
gather_facts: no
tasks:
- meta: end_play
when: not is_mitogen
- include_tasks: ../_mitogen_only.yml

- mitogen_action_script:
script: |
Expand Down Expand Up @@ -47,3 +46,4 @@
tags:
- disconnect
- disconnect_resets_connection
- mitogen_only
7 changes: 3 additions & 4 deletions tests/ansible/integration/connection/home_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
- name: integration/connection/home_dir.yml
hosts: test-targets
tasks:
- include_tasks: ../_mitogen_only.yml

- name: "Find out root's homedir."
# Runs first because it blats regular Ansible facts with junk, so
# non-become run fixes that up.
setup:
become: true
register: root_facts
when: is_mitogen

- name: "Find regular homedir"
setup:
register: user_facts
when: is_mitogen

- name: "Verify Connection.homedir correct when become:false"
mitogen_action_script:
Expand All @@ -24,7 +24,6 @@
"connection homedir": self._connection.homedir,
"homedir from facts": "{{user_facts.ansible_facts.ansible_user_dir}}"
}
when: is_mitogen
- name: "Verify Connection.homedir correct when become:true"
become: true
Expand All @@ -35,6 +34,6 @@
"connection homedir": self._connection.homedir,
"homedir from facts": "{{root_facts.ansible_facts.ansible_user_dir}}"
}
when: is_mitogen
tags:
- home_dir
- mitogen_only
2 changes: 1 addition & 1 deletion tests/ansible/integration/connection/put_large_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
file_name: large-file
file_size: 512
tasks:
- include: _put_file.yml
- include_tasks: _put_file.yml
tags:
- put_file
- put_large_file
2 changes: 1 addition & 1 deletion tests/ansible/integration/connection/put_small_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
file_name: small-file
file_size: 123
tasks:
- include: _put_file.yml
- include_tasks: _put_file.yml
tags:
- put_file
- put_small_file
4 changes: 2 additions & 2 deletions tests/ansible/integration/connection/reset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
- name: integration/connection/reset.yml
hosts: test-targets
tasks:
- meta: end_play
when: not is_mitogen
- include_tasks: ../_mitogen_only.yml

- debug: msg="reset.yml skipped on Ansible<2.5.6"
when:
Expand Down Expand Up @@ -47,4 +46,5 @@
- out_become.ppid != out_become2.ppid
fail_msg: out={{out}} out2={{out2}} out_become={{out_become}} out_become2={{out_become2}}
tags:
- mitogen_only
- reset
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
hosts: test-targets
gather_facts: no
tasks:
- meta: end_play
when: not is_mitogen
- include_tasks: ../_mitogen_only.yml

- meta: end_play
when:
Expand Down Expand Up @@ -88,3 +87,4 @@
]
tags:
- delegate_to_template
- mitogen_only
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
- name: integration/connection_delegation/local_action.yml
hosts: cd-newuser-normal-normal
tasks:
- meta: end_play
when: not is_mitogen
- include_tasks: ../_mitogen_only.yml

- local_action: mitogen_get_stack
become: true
Expand Down Expand Up @@ -35,3 +34,4 @@
]
tags:
- local_action
- mitogen_only
Loading

0 comments on commit 3f7a0f7

Please sign in to comment.