Skip to content

Conversation

@Valkyrie00
Copy link
Contributor

@Valkyrie00 Valkyrie00 commented Nov 5, 2025

Summary

This PR adds the ansible.posix.profile_roles callback to ansible.cfg to enable automatic role-level timing
aggregation in CI-Framework jobs.

Ref: "OSPRH-21380"

Motivation

Currently, CI-Framework jobs use profile_tasks which shows only the top ~20 slowest individual tasks. This
makes it difficult to:

  • Understand total time spent in each role (requires manual summation)
  • Identify roles with many small tasks (they don't appear in top N)
  • Analyze bottlenecks at the role level
  • Get visibility into subprocess playbook executions

Solution

The profile_roles callback automatically aggregates all tasks by role and displays total time per role at the
end of playbook execution. This provides:

  • Automatic aggregation - No manual calculation needed
  • Complete visibility - All roles shown, not just top N tasks
  • Multi-level analysis - Works in both main and subprocess playbooks
  • Zero overhead - Pure reporting enhancement, no performance impact
  • Backward compatible - Works alongside existing profile_tasks

Validation

  • ✅ Tested locally with minimal playbook
  • ✅ Validated in production uni[01/02/04]alpha job
  • ✅ Confirmed backward compatibility

Documentation

Detailed analysis, validation results are availabe in a dedicated internal document

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 5, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 5, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Valkyrie00 Valkyrie00 changed the title [DNM] feat(ansible-cfg): enable profile_roles callback for role-level timing metrics feat(ansible-cfg): enable profile_roles callback for role-level timing metrics Nov 7, 2025
@Valkyrie00 Valkyrie00 marked this pull request as ready for review November 7, 2025 15:08
@Valkyrie00 Valkyrie00 requested a review from a team as a code owner November 7, 2025 15:08
@Valkyrie00 Valkyrie00 force-pushed the feat/OSPRH-21380-ansible-profile-roles-callback branch from 61caeea to c1c482c Compare November 7, 2025 15:19
…g metrics

Add ansible.posix.profile_roles to the enabled callbacks in ansible.cfg
to provide role-level timing aggregation in addition to the existing
task-level timing from profile_tasks.

Signed-off-by: Vito Castellano <vcastell@redhat.com>
@Valkyrie00 Valkyrie00 force-pushed the feat/OSPRH-21380-ansible-profile-roles-callback branch from c1c482c to b0ee039 Compare November 10, 2025 09:53
@Valkyrie00 Valkyrie00 enabled auto-merge (rebase) November 10, 2025 10:11
@Valkyrie00 Valkyrie00 merged commit 0cf91bc into openstack-k8s-operators:main Nov 10, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants