Skip to content

ci: update header for run_role_with_clear_facts [citest_skip]#22

Closed
richm wants to merge 1 commit into
mainfrom
ci-update-run_role
Closed

ci: update header for run_role_with_clear_facts [citest_skip]#22
richm wants to merge 1 commit into
mainfrom
ci-update-run_role

Conversation

@richm
Copy link
Copy Markdown
Collaborator

@richm richm commented Apr 8, 2026

Update header for run_role_with_clear_facts to indicate not editable
and clarify what it does

Signed-off-by: Rich Megginson rmeggins@redhat.com

Summary by Sourcery

Rename remaining references from trustee_attestation_client to trustee_client and add a reusable task file to clear facts and run the trustee_client role with configurable error handling.

Enhancements:

  • Adjust Ansible test variables to use the new trustee_client-prefixed distribution facts.
  • Add a shared run_role_with_clear_facts task file that clears Ansible facts and invokes the linux-system-roles.trustee_client role with optional failure handling.

Documentation:

  • Update contributor and CI testing plan documentation to point to the trustee_client repository, issues, and workflows instead of trustee_attestation_client.
  • Refresh README badges and links to use the trustee_client GitHub repository paths.

Update header for run_role_with_clear_facts to indicate not editable
and clarify what it does

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@richm richm requested a review from spetrosi as a code owner April 8, 2026 13:31
@richm richm self-assigned this Apr 8, 2026
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 8, 2026

Reviewer's Guide

Aligns repository references and CI/tmt configuration with the renamed trustee_client role and introduces a centrally managed Ansible helper task file to clear facts and run the trustee_client role with optional failure suppression.

Sequence diagram for tft CI workflow running trustee_client plans

sequenceDiagram
    actor Developer
    participant GitHub
    participant GitHubActions
    participant TestingFarm
    participant tmt
    participant trustee_client_role

    Developer->>GitHub: Push_commit_or_open_PR
    GitHub-->>GitHubActions: Trigger_tft_workflow
    GitHubActions->>TestingFarm: Request_tests(tf_scope=private, tmt_plan_filter="tag:playbooks_parallel,trustee_client")
    TestingFarm->>tmt: Start_tmt_multihost_pipeline
    tmt->>trustee_client_role: Run_plans_tagged_playbooks_parallel_and_trustee_client
    trustee_client_role-->>tmt: Report_role_test_results
    tmt-->>TestingFarm: Report_plan_results
    TestingFarm-->>GitHubActions: Publish_results_and_status
    GitHubActions-->>GitHub: Set_final_commit_status
Loading

Flow diagram for run_role_with_clear_facts helper task

flowchart TD
    A[Start_run_role_with_clear_facts] --> B[Clear_Ansible_facts_on_managed_nodes]
    B --> C[Include_role_trustee_client]
    C --> D{allow_failure_enabled}
    D -- yes --> E[Ignore_role_failure_in_test_outcome]
    D -- no --> F[Propagate_role_failure_to_test]
    E --> G[End_run_role_with_clear_facts]
    F --> G[End_run_role_with_clear_facts]
Loading

File-Level Changes

Change Details Files
Rename remaining references from trustee_attestation_client to trustee_client in docs, CI docs, and configuration.
  • Update contributing guide heading and GitHub URLs to use trustee_client naming and issue links.
  • Adjust plans README to reference trustee_client GitHub workflow and example git-url for Testing Farm runs.
  • Change tft GitHub Actions workflow tmt_plan_filter tag from trustee_attestation_client to trustee_client.
  • Update README badges to point to trustee_client GitHub workflows while leaving the main title unchanged.
contributing.md
plans/README-plans.md
.github/workflows/tft.yml
README.md
Introduce shared Ansible task helper to clear facts and run the linux-system-roles.trustee_client role with optional failed_when control.
  • Add tests/tasks/run_role_with_clear_facts.yml as a non-editable, centrally managed task file with a clear header explaining purpose and usage.
  • Implement a Clear facts step using the meta: clear_facts action before running the role.
  • Add conditional block to run linux-system-roles.trustee_client with __sr_failed_when set to false, catching and ignoring failures via a rescue block.
  • Run linux-system-roles.trustee_client normally when __sr_failed_when is true or undefined, honoring provided __sr_tasks_from and __sr_public variables.
tests/tasks/run_role_with_clear_facts.yml
Rename internal test vars that track RHEL-like distributions from trustee_attestation_client to trustee_client.
  • Rename __trustee_attestation_client_rh_distros to __trustee_client_rh_distros and update references.
  • Rename __trustee_attestation_client_rh_distros_fedora to __trustee_client_rh_distros_fedora and update references.
  • Update corresponding boolean helper variables for detecting RHEL(-like) and Fedora distributions to use the new trustee_client prefix.
tests/vars/rh_distros_vars.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • In README.md the main heading and the tox workflow badge URL still reference trustee_attestation_client; if the role is being renamed, consider updating those remaining identifiers to trustee_client for consistency.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In README.md the main heading and the tox workflow badge URL still reference `trustee_attestation_client`; if the role is being renamed, consider updating those remaining identifiers to `trustee_client` for consistency.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@richm richm closed this Apr 8, 2026
@richm richm deleted the ci-update-run_role branch April 8, 2026 13:36
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