Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.3.20 #1208

Merged
merged 13 commits into from
Jan 7, 2025
Merged

Release v0.3.20 #1208

merged 13 commits into from
Jan 7, 2025

Conversation

moreati
Copy link
Member

@moreati moreati commented Jan 7, 2025

No description provided.

moreati and others added 13 commits December 2, 2024 11:24
…nterpreter

This tightens up our monkey patching `Connection._action` so it's only applied
during `meta: reset_connection` & promptly removed. This fixes "'int' object
has no attribute 'template'" when `ansible.plugins.action.wait_for_connection`
or other code calls `ansible.plugins.connection.ConnectionBase.reset()`.

This could also have switched to `templar=templar` on the temporary action,
rather than `templar=0`, but it's not strictly necessary to fix this bug. I
anticipate other changes doing so soon, to improve interpreter discovery &
templated python interpreter path support.
…ython-interpreter

ansible_mitogen: Fix timeout in wait_for_connection with templated ansible_python_interpreter
The previous commit (53b4881 in PR 1200) was
not intended to change these values, but some WIP slipped through. This
partially reverts that commit so the two changes (moving the monkey patch,
making the monkey patch more capable) exist in distinct commits.
This will mitigate the impact of mitogen-hq#1185 a little, which causes the job to
continue running without making progress, until it hits this timeout.
Successful jobs are typically completing in 8 - 12 minutes.

refs mitogen-hq#1185
Ansible >= 4 (ansible-core >= 2.11) the SSH plugin has a `timeout` option and
with variable `ansible_ssh_timeout`, but not a `ansible_timeout` variable.
The local plugin has no such option or variable(s). However `ansible_timeout`
is backfilled for all conection plugins, by legacy mechanisms that populate
the play context attribute:
- `ansible.constants.COMMON_CONNECTION_VARS`
- `ansible.constants.MAGIC_VARIABLE_MAPPING`

The `timeout` keyword is for task completion timeout, not connection timeout.
ansible_mitogen: Templated connection timeout
…RETER

This adapts PR mitogen-hq#740 by @extmind (afe0026),
which augmented the call to `Connection.get_task_var()` with
`C.config.get_config_value('INTERPRETER_PYTHON'` as a default. Instead this
*replaces* the call to `Connection.get_task_var()`. The aim is greater
simplicity by disentangling templating of a configured interpreter path and
discovery of an interpreter when none is configured. I think this also reduces
the number of times `Connection._get_task_vars()` is called, so reducing the
number of times we do the ugly stack frame inspection.

I've also added test cases.

Co-authored-by: Lars Beckers <lars@extmind.de>
ansible_mitogen: Respect interpreter_python and ANSIBLE_PYTHON_INTERPRETER
@moreati moreati merged commit 161a231 into mitogen-hq:stable Jan 7, 2025
22 checks passed
@moreati moreati deleted the release-v0.3.20 branch January 7, 2025 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant