Skip to content

Align and remove omitempty from databaseInstance#472

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
stuggi:database_instance
Sep 19, 2025
Merged

Align and remove omitempty from databaseInstance#472
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
stuggi:database_instance

Conversation

@stuggi

@stuggi stuggi commented Sep 19, 2025

Copy link
Copy Markdown
Contributor

For adoption testing a ctlplane with disabled manila gets applied:

  manila:
    enabled: false
    template:
      manilaAPI: {}
      manilaScheduler: {}
      manilaShares: {}

This fails with because the manila databaseInstance parameter has omitempty specified:

$ oc apply -f ./test_deployment.yaml
The OpenStackControlPlane "openstack" is invalid:
* spec.manila.template.databaseInstance: Required value
* <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation

This aligns the databaseInstance parameter and removes the omitempty like it is speficied in all other service operators.

Depends-On: openstack-k8s-operators/openstack-operator#1610

Jira: OSPRH-12935

For adoption testing a ctlplane with disabled manila gets applied:

~~~
  manila:
    enabled: false
    template:
      manilaAPI: {}
      manilaScheduler: {}
      manilaShares: {}
~~~

This fails with because the manila databaseInstance parameter has
omitempty specified:

~~~
$ oc apply -f ./test_deployment.yaml
The OpenStackControlPlane "openstack" is invalid:
* spec.manila.template.databaseInstance: Required value
* <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation
~~~

This aligns the databaseInstance parameter and removes the omitempty
like it is speficied in all other service operators.

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
@stuggi

stuggi commented Sep 19, 2025

Copy link
Copy Markdown
Contributor Author

@stuggi stuggi requested a review from fmount September 19, 2025 10:05

@fmount fmount left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci

openshift-ci Bot commented Sep 19, 2025

Copy link
Copy Markdown
Contributor

[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

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

@fmount

fmount commented Sep 19, 2025

Copy link
Copy Markdown
Collaborator

@stuggi I think we can override precommit-check because we know what we're doing here.

 gs --existing-crd-filename=/tmp/tmp.Hwdyfa8zhb/config/crd/bases/manila.openstack.org_manilas.yaml --new-crd-filename=config/crd/bases/manila.openstack.org_manilas.yaml
ERROR: "NoNewRequiredFields": crd/manilas.manila.openstack.org version/v1beta1 field/^.spec.databaseInstance is new and may not be required 

@stuggi

stuggi commented Sep 19, 2025

Copy link
Copy Markdown
Contributor Author

@stuggi I think we can override precommit-check because we know what we're doing here.

 gs --existing-crd-filename=/tmp/tmp.Hwdyfa8zhb/config/crd/bases/manila.openstack.org_manilas.yaml --new-crd-filename=config/crd/bases/manila.openstack.org_manilas.yaml
ERROR: "NoNewRequiredFields": crd/manilas.manila.openstack.org version/v1beta1 field/^.spec.databaseInstance is new and may not be required 

yes I'll do that when the other tests passed.

@stuggi

stuggi commented Sep 19, 2025

Copy link
Copy Markdown
Contributor Author

/test manila-operator-build-deploy-kuttl

@stuggi

stuggi commented Sep 19, 2025

Copy link
Copy Markdown
Contributor Author

we need an openstack-operator bump to resolve the kuttl error ... openstack-k8s-operators/openstack-operator#1610

@stuggi

stuggi commented Sep 19, 2025

Copy link
Copy Markdown
Contributor Author

lets see if the depends-on works

@stuggi

stuggi commented Sep 19, 2025

Copy link
Copy Markdown
Contributor Author

/test manila-operator-build-deploy-kuttl

@stuggi

stuggi commented Sep 19, 2025

Copy link
Copy Markdown
Contributor Author

/override ci/prow/precommit-check

@openshift-ci

openshift-ci Bot commented Sep 19, 2025

Copy link
Copy Markdown
Contributor

@stuggi: Overrode contexts on behalf of stuggi: ci/prow/precommit-check

Details

In response to this:

/override ci/prow/precommit-check

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot Bot merged commit 9987745 into openstack-k8s-operators:main Sep 19, 2025
9 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