ara icon indicating copy to clipboard operation
ara copied to clipboard

Consider what to do with data tagging

Open dmsimard opened this issue 11 months ago • 3 comments

There is development in ansible-core to implement "Data Tagging": https://github.com/ansible/ansible/pull/84621

I am out of the loop but apparently it's been a long time coming.

We should look at what this means for ara, maybe there are breaking changes or new features we can benefit from.

For example, there are changes to the callback init: Image

There are also changes in the default callback: Image

dmsimard avatar Jan 30 '25 02:01 dmsimard

There has been progress with data tagging: https://forum.ansible.com/t/data-tagging-preview-and-testing/40759

I haven't had the time to give it a spin yet.

dmsimard avatar Mar 22 '25 20:03 dmsimard

Using the latest fallible seems to mostly just work?

Fallible experimental build 2025.3.11
This build contains the following experimental features:
  - [WIP] Templating overhaul, implement Data Tagging

The PR claims:

  • Most nested/recursive templating operations are now fully lazy, vastly improving performance in complex scenarios.
  • Standardized error handling and exception capture throughout controller and target Python code.
  • Automatically provide detailed error messages with operation and source context.

We can test that.

Image

I don't know how much of this has already existed in prior releases of ansible-core but I do have some comments.

All of ara's integration tests are still passing but there's some deprecations:

TASK [smoke-tests : Add dynamically templated labels to this playbook] ****************************************************************************************************************************************************************************************
[DEPRECATION WARNING]: Jinja constant strings should not contain embedded templates. This feature will be removed in version 2.23.
Origin: /home/dmsimard/dev/sandbox/ara/ara/tests/integration/roles/smoke-tests/tasks/ara-ops.yaml:194:9

192     state: present
193     labels:
194       - "git:{{ lookup('pipe', 'git -C {{ playbook_dir }} rev-parse HEAD') }}"
            ^ column 9

[DEPRECATION WARNING]: Top-level facts are deprecated, use `ansible_facts` instead. This feature will be removed in version 2.22.
Origin: /home/dmsimard/dev/sandbox/ara/ara/tests/integration/roles/smoke-tests/tasks/ara-ops.yaml:195:9

193     labels:
194       - "git:{{ lookup('pipe', 'git -C {{ playbook_dir }} rev-parse HEAD') }}"
195       - "os:{{ ansible_distribution }}-{{ ansible_distribution_version }}"
            ^ column 9

Areas where we might look for new changes, features, improvements or bugs:

There's (new?) exception fields that the callback can use. If they've existed before we do not do anything special with them but they are picked up:

Image

From within the callback interface, it looks like this:

Image

Image

We could have the ability to record these in particular fields to highlight them easily. In other words, we could leave it pretty printed as part of the results or make it look pretty and well parsed, or something.

From a performance perspective it is similar, if not a bit worse (sample of 1, have not had time to do exhaustive testing):

Image

That's the extent of what I can check today.

dmsimard avatar Mar 23 '25 22:03 dmsimard

There's now:

  • a porting guide: https://docs.ansible.com/ansible-core/2.19/porting_guides/porting_guide_core_2.19.html
  • data tagging release notes: https://github.com/ansible/ansible/blob/stable-2.19/changelogs/fragments/templates_types_datatagging.yml
  • full changelog: https://github.com/ansible/ansible/blob/stable-2.19/changelogs/CHANGELOG-v2.19.rst

dmsimard avatar Apr 24 '25 23:04 dmsimard