Support ansible-core 2.19 and data tagging
It looks like Ara will need some changes to work with data tagging and error handling and other API changes in Core.
Sorry, should this be closed as a duplicate #588?
Hi @gotmax23 and thanks for the issue.
I've indeed attempted to centralize the data tagging stuff in that issue. Did you find something that didn't work, though ?
I need to try again with the latest (pre-)release but last I know everything just worked according to ara's own testing.
There are opportunities to do new things but nothing broken that I came across.
Errors don't seem to work properly with ansible-core 2.19.0b1:
$ ara --version
ara 1.7.2
$ ANSIBLE_LOAD_CALLBACK_PLUGINS=1 ansible ftop2.0 -m fail
[ERROR]: Task failed: Action failed: Failed as requested from task
Origin: <adhoc 'fail' task>
{'action': {'module': 'fail', 'args': {}}, 'timeout': 0, 'async_val': 0, 'poll': 15}
ftop2.0 | FAILED! =>
changed: false
msg: Failed as requested from task
[WARNING]: Callback dispatch 'v2_runner_on_failed' failed for plugin 'ara_default': Type 'ErrorSummary' is unsupported for variable storage.
Callback dispatch 'v2_runner_on_failed' failed for plugin 'ara_default'.
<<< caused by >>>
Type 'ErrorSummary' is unsupported for variable storage.
Origin: <unknown>
ErrorSummary(details=(Detail(msg='Task failed.', formatted_source_context="Origin: <adhoc 'fail' [...]
I haven't had the chance to really dig into this yet but did come across these release notes from 2.19 beta2: https://forum.ansible.com/t/data-tagging-preview-and-testing/40759/21?u=rfc2549
Ansible Core 2.19.0b2 has been tagged and released to PyPI. It contains a number of compatibility bugfixes, especially for callbacks that attempt to perform custom serialization of object graphs passed into the callback methods.
@gotmax23 I've reproduced the issue with 2.19.0b1 by running ara's own integration tests:
> ansible-playbook tests/integration/lookups.yaml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
Operations to perform:
Apply all migrations: admin, api, auth, contenttypes, db, sessions
Running migrations:
No migrations to apply.
PLAY [Assert playbook properties] *****************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ****************************************************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Retrieve the current playbook so we can get the ID] *****************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Save the playbook id so we can re-use it easily] ********************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Recover data from ARA] **********************************************************************************************************************************************************************************************************************************
[WARNING]: Found variable using reserved name 'tasks'.
[WARNING]: Found variable using reserved name 'hosts'.
ok: [localhost]
TASK [Print versions we're testing with] **********************************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": "Integration test playbook running under ansible-core 2.19.0b1, ara 1.7.3.dev15 (client) and 1.7.3.dev15 (server)"
}
TASK [Assert playbook properties] *****************************************************************************************************************************************************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Validate hostname when localhost_as_hostname is enabled] ************************************************************************************************************************************************************************************************
[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg.
[DEPRECATION WARNING]: The `bool` filter coerced invalid value '' (str) to False. This feature will be removed from the 'ansible.builtin.bool' filter plugin (requested as 'bool') in version 2.23.
skipping: [localhost]
[WARNING]: Callback dispatch 'v2_runner_on_skipped' failed for plugin 'ara_default': Type 'WarningSummary' is unsupported for variable storage.
Callback dispatch 'v2_runner_on_skipped' failed for plugin 'ara_default'.
<<< caused by >>>
Type 'WarningSummary' is unsupported for variable storage.
Origin: <unknown>
WarningSummary(details=(Detail(msg='Deprecation warnings can be disabled by setting `deprecation_warnings=False` [...]
However the issue is gone with 2.19.0b2:
> ansible-playbook tests/integration/lookups.yaml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
Operations to perform:
Apply all migrations: admin, api, auth, contenttypes, db, sessions
Running migrations:
No migrations to apply.
PLAY [Assert playbook properties] *****************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ****************************************************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Retrieve the current playbook so we can get the ID] *****************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Save the playbook id so we can re-use it easily] ********************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Recover data from ARA] **********************************************************************************************************************************************************************************************************************************
[WARNING]: Found variable using reserved name 'hosts'.
[WARNING]: Found variable using reserved name 'tasks'.
ok: [localhost]
TASK [Print versions we're testing with] **********************************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": "Integration test playbook running under ansible-core 2.19.0b2, ara 1.7.3.dev15 (client) and 1.7.3.dev15 (server)"
}
TASK [Assert playbook properties] *****************************************************************************************************************************************************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Validate hostname when localhost_as_hostname is enabled] ************************************************************************************************************************************************************************************************
[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg.
[DEPRECATION WARNING]: The `bool` filter coerced invalid value '' (str) to False. This feature will be removed from the 'ansible.builtin.bool' filter plugin (requested as 'bool') in version 2.23.
skipping: [localhost]
TASK [Validate hostname when localhost_as_hostname is not enabled] ********************************************************************************************************************************************************************************************
ok: [localhost] => {
"changed": false,
"msg": "inventory_hostname localhost == localhost"
}
I already commented on resolving the deprecation notices in the other issue but it seems OK now.
I haven't bisected it down to the specific commit but https://github.com/ansible/ansible/commit/03181ac87b6c62bec8ae63a896d8a986a60eae8a might be it.