Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete webhook validation for topology references #484

Merged

Conversation

fmount
Copy link
Contributor

@fmount fmount commented Mar 20, 2025

This patch is a follow up of [1] in the validation webhook area. It enhances the validation workflow and it aims to complete the pattern by distributing the ValidateTopology logic across the API instances.
It is based on [2] and the key improvements include:

  • Distributed validation: it provides a ValidateTopology function across all API instances, ensuring consistent validation throughout the system
  • Optimized validation calls: it refines how validation is triggered and reduce code duplication; it still requires a basic struct refactor to fully de-duplicate the existing functions, but it can be done as part of a follow up

This patch leverages the centralized topology validator introduced in infra-operator [3].

Jira: https://issues.redhat.com/browse/OSPRH-14626

[1] openstack-k8s-operators#924
[2] openstack-k8s-operators/nova-operator#936
[3] openstack-k8s-operators/infra-operator#356

@openshift-ci openshift-ci bot requested review from dprince and viroel March 20, 2025 09:58
Copy link

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/8708d6b46aa0445fa69cc76e74d74e43

openstack-k8s-operators-content-provider FAILURE in 10m 11s
⚠️ neutron-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@fmount fmount requested a review from stuggi March 20, 2025 10:10
@fmount fmount changed the title Improve webhook validation for topology references Complete webhook validation for topology references Mar 20, 2025
@fmount fmount force-pushed the topologyref_webhook branch from 5881c59 to 6d6bbf8 Compare March 20, 2025 22:10
This patch improves the topology webhook validation. In particular:

- it optimizes the validation calls; it refines how validation is
  triggered and reduces code duplication
- it leverages the centralized topology validator introduced in
  infra-operator [1]

[1] openstack-k8s-operators/infra-operator#356

Signed-off-by: Francesco Pantano <[email protected]>
Copy link
Contributor

@stuggi stuggi left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

openshift-ci bot commented Mar 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fmount, stuggi

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

The pull request process is described here

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

@openshift-merge-bot openshift-merge-bot bot merged commit a97f9c7 into openstack-k8s-operators:main Mar 24, 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.

2 participants