From 805f628736d450cd8ee8ea88b5c4c8c211654bc6 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Tue, 29 Oct 2024 11:38:21 +0000 Subject: [PATCH] WIP --- .github/workflows/tests.yml | 64 +------------------------------ ansible_mitogen/mixins.py | 9 ++++- tests/ansible/all.yml | 2 - tests/ansible/integration/all.yml | 39 ------------------- 4 files changed, 8 insertions(+), 106 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cc20f04a2..ef00866fd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ on: - docs-master env: - #ANSIBLE_VERBOSITY: 3 + ANSIBLE_VERBOSITY: 3 #MITOGEN_LOG_LEVEL: DEBUG MITOGEN_TEST_IMAGE_TEMPLATE: "ghcr.io/mitogen-hq/%(distro)s-test" @@ -24,57 +24,9 @@ jobs: fail-fast: false matrix: include: - - name: Ans_27_210 - tox_env: py27-mode_ansible-ansible2.10 - - name: Ans_27_4 - tox_env: py27-mode_ansible-ansible4 - - - name: Ans_36_210 - python_version: '3.6' - tox_env: py36-mode_ansible-ansible2.10 - - name: Ans_36_4 - python_version: '3.6' - tox_env: py36-mode_ansible-ansible4 - - - name: Ans_311_210 - python_version: '3.11' - tox_env: py311-mode_ansible-ansible2.10 - - name: Ans_311_3 - python_version: '3.11' - tox_env: py311-mode_ansible-ansible3 - - name: Ans_311_4 - python_version: '3.11' - tox_env: py311-mode_ansible-ansible4 - - name: Ans_311_5 - python_version: '3.11' - tox_env: py311-mode_ansible-ansible5 - - name: Ans_313_6 - python_version: '3.13' - tox_env: py313-mode_ansible-ansible6 - - name: Ans_313_7 - python_version: '3.13' - tox_env: py313-mode_ansible-ansible7 - - name: Ans_313_8 - python_version: '3.13' - tox_env: py313-mode_ansible-ansible8 - - name: Ans_313_9 - python_version: '3.13' - tox_env: py313-mode_ansible-ansible9 - name: Ans_313_10 python_version: '3.13' tox_env: py313-mode_ansible-ansible10 - - name: Van_313_10 - python_version: '3.13' - tox_env: py313-mode_ansible-ansible10-strategy_linear - - - name: Mito_27 - tox_env: py27-mode_mitogen - - name: Mito_36 - python_version: '3.6' - tox_env: py36-mode_mitogen - - name: Mito_313 - python_version: '3.13' - tox_env: py313-mode_mitogen steps: - uses: actions/checkout@v4 @@ -164,24 +116,10 @@ jobs: fail-fast: false matrix: include: - - name: Mito_27 - tox_env: py27-mode_mitogen - - name: Mito_313 - python_version: '3.13' - tox_env: py313-mode_mitogen - - - name: Loc_27_210 - tox_env: py27-mode_localhost-ansible2.10 - name: Loc_313_10 python_version: '3.13' tox_env: py313-mode_localhost-ansible10 - - name: Van_27_210 - tox_env: py27-mode_localhost-ansible2.10-strategy_linear - - name: Van_313_10 - python_version: '3.13' - tox_env: py313-mode_localhost-ansible10-strategy_linear - steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/ansible_mitogen/mixins.py b/ansible_mitogen/mixins.py index 3953eb52e..6f177ee07 100644 --- a/ansible_mitogen/mixins.py +++ b/ansible_mitogen/mixins.py @@ -489,10 +489,13 @@ def _run_cmd(): for possible_python in possible_pythons: try: + LOG.debug('_low_level_execute_command(): trying %s', possible_python) self._possible_python_interpreter = possible_python rc, stdout, stderr = _run_cmd() + LOG.debug('_low_level_execute_command(): got rc=%d, stdout=%r, stderr=%r', rc, stdout, stderr) # TODO: what exception is thrown? - except: + except BaseException as exc: + LOG.debug('%r._low_level_execute_command for possible_python=%r: %s, %r', self, possible_python, type(exc), exc) # we've reached the last python attempted and failed # TODO: could use enumerate(), need to check which version of python first had it though if possible_python == 'python': @@ -501,10 +504,12 @@ def _run_cmd(): continue stdout_text = to_text(stdout, errors=encoding_errors) + stderr_text = to_text(stderr, errors=encoding_errors) return { 'rc': rc, 'stdout': stdout_text, 'stdout_lines': stdout_text.splitlines(), - 'stderr': stderr, + 'stderr': stderr_text, + 'stderr_lines': stderr_text.splitlines(), } diff --git a/tests/ansible/all.yml b/tests/ansible/all.yml index 7a3e70001..49a3d83a1 100644 --- a/tests/ansible/all.yml +++ b/tests/ansible/all.yml @@ -1,6 +1,4 @@ - import_playbook: setup/all.yml tags: setup -- import_playbook: regression/all.yml - tags: regression - import_playbook: integration/all.yml tags: integration diff --git a/tests/ansible/integration/all.yml b/tests/ansible/integration/all.yml index ac196584e..c74a28f45 100644 --- a/tests/ansible/integration/all.yml +++ b/tests/ansible/integration/all.yml @@ -1,41 +1,2 @@ - -# -# This playbook imports all tests that are known to work at present. -# - -- import_playbook: action/all.yml - tags: action -- import_playbook: async/all.yml - tags: async -- import_playbook: become/all.yml - tags: become -- import_playbook: connection/all.yml - tags: connection -- import_playbook: connection_delegation/all.yml - tags: connection_delegation -- import_playbook: connection_loader/all.yml - tags: connection_loader -- import_playbook: context_service/all.yml - tags: context_service -- import_playbook: glibc_caches/all.yml - tags: glibc_caches -- import_playbook: interpreter_discovery/all.yml - tags: interpreter_discovery -- import_playbook: local/all.yml - tags: local -- import_playbook: module_utils/all.yml - tags: module_utils -- import_playbook: playbook_semantics/all.yml - tags: playbook_semantics -- import_playbook: process/all.yml - tags: process -- import_playbook: runner/all.yml - tags: runner - import_playbook: ssh/all.yml tags: ssh -- import_playbook: strategy/all.yml - tags: strategy -- import_playbook: stub_connections/all.yml - tags: stub_connections -- import_playbook: transport_config/all.yml - tags: transport_config