Skip to content

Change the way how the hooks playbook is executed#2930

Merged
dasm merged 1 commit intoopenstack-k8s-operators:mainfrom
danpawlik:remove-hooks-play
May 5, 2025
Merged

Change the way how the hooks playbook is executed#2930
dasm merged 1 commit intoopenstack-k8s-operators:mainfrom
danpawlik:remove-hooks-play

Conversation

@danpawlik
Copy link
Copy Markdown
Contributor

In many places, it was done that Ansible playbook is importing another ansible playbook, which is importing again another playbook and another. It is too complex and after doing simple improvement as it was done in this change by removing import_playbook: hooks.yml, we see that those tasks can be running in same play.
With that approach we can:

  • easy understand playbook/role execution,
  • better control variables,
  • in some part faster execution due there is no need to make delegation or gather_facts,
  • easier to debug

@danpawlik danpawlik requested a review from a team as a code owner April 28, 2025 08:37
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 28, 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

@danpawlik
Copy link
Copy Markdown
Contributor Author

recheck

evallesp
evallesp previously approved these changes Apr 28, 2025
Copy link
Copy Markdown
Contributor

@evallesp evallesp left a comment

Choose a reason for hiding this comment

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

Great

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/d386e780a9974f9d8611e68be58fcf43

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 01m 34s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 07m 05s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 42m 36s
✔️ podified-multinode-hci-deployment-crc SUCCESS in 1h 31m 47s
adoption-standalone-to-crc-ceph-provider RETRY_LIMIT in 33m 08s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 06s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 22s
cifmw-multinode-kuttl FAILURE in 20m 48s
build-push-container-cifmw-client FAILURE in 18m 57s

In many places, it was done that Ansible playbook is importing another
ansible playbook, which is importing again another playbook and another.
It is too complex and after doing simple improvement as it was done
in this change by removing import_playbook: hooks.yml, we see
that those tasks can be running in same play.
With that approach we can:

- easy understand playbook/role execution,
- better control variables,
- in some part faster execution due there is no need to make delegation
  or gather_facts,
- easier to debug

Signed-off-by: Daniel Pawlik <dpawlik@redhat.com>
Copy link
Copy Markdown
Contributor

@dasm dasm left a comment

Choose a reason for hiding this comment

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

Great work @danpawlik !

@dasm dasm merged commit 3656f94 into openstack-k8s-operators:main May 5, 2025
4 checks passed
@dasm dasm mentioned this pull request May 5, 2025
@danpawlik danpawlik deleted the remove-hooks-play branch June 12, 2025 06:53
danpawlik added a commit to danpawlik/ci-framework that referenced this pull request Mar 31, 2026
The playbooks were migrated into role cifmw_setup.
As it was mentioned in commit message [1], such approach
should be better for developers to maintain the code.
Also skip removing 08-run-tests.yml because the NFV team is using it
and it takes a time to verify that. The playbook would be removed in
next pull request.

[1] openstack-k8s-operators#2930

Depends-On: https://review.rdoproject.org/r/c/rdo-jobs/+/58147
Depends-On: openstack-k8s-operators#3208
Signed-off-by: Daniel Pawlik <dpawlik@redhat.com>
openshift-merge-bot Bot pushed a commit that referenced this pull request Apr 17, 2026
The playbooks were migrated into role cifmw_setup.
As it was mentioned in commit message [1], such approach
should be better for developers to maintain the code.
Also skip removing 08-run-tests.yml because the NFV team is using it
and it takes a time to verify that. The playbook would be removed in
next pull request.

[1] #2930

Depends-On: https://review.rdoproject.org/r/c/rdo-jobs/+/58147
Depends-On: #3208
Signed-off-by: Daniel Pawlik <dpawlik@redhat.com>
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