Skip to content

Fix validation pattern for machine/vsphereprovider - #3033

Open
Jakob-Naucke wants to merge 1 commit into
openshift:masterfrom
Jakob-Naucke:vsphere-machine-tagids-pattern
Open

Fix validation pattern for machine/vsphereprovider#3033
Jakob-Naucke wants to merge 1 commit into
openshift:masterfrom
Jakob-Naucke:vsphere-machine-tagids-pattern

Conversation

@Jakob-Naucke

Copy link
Copy Markdown
Member

kubebuilder validation pattern for the tagIDs field in the vSphere machine provider spec is specified as if it was a string, but it should specify for an array.

Fixes: #2978

kubebuilder validation pattern for the tagIDs field in the vSphere
machine provider spec is specified as if it was a string, but it
should specify for an array.

Fixes: openshift#2978
Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci

openshift-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Hello @Jakob-Naucke! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 10, 2026
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: 3a06f104-aa68-4c8e-bfb8-cd2edaddace8

📥 Commits

Reviewing files that changed from the base of the PR and between 6733660 and 4367ed0.

📒 Files selected for processing (1)
  • machine/v1beta1/types_vsphereprovider.go

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The change updates the TagIDs []string kubebuilder marker in VSphereMachineProviderSpec. The URN pattern now applies to each slice element instead of the array. This also resolves the controller-gen error caused by applying a pattern to an array type.

Suggested reviewers: vr4manta

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 4367e

TagIDs validation now applies to each URN string and avoids CRD generation failure; the change presents no material merge risk.

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: correcting the validation pattern for the vSphere provider machine specification.
Description check ✅ Passed The description directly explains the array validation issue and links it to issue #2978.
Linked Issues check ✅ Passed The change updates the marker to apply the URN pattern to each tagIDs array item, which directly satisfies issue #2978 and prevents controller-gen from rejecting the API.
Out of Scope Changes check ✅ Passed The pull request changes only the validation marker required for the linked issue. No unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Stable And Deterministic Test Names ✅ Passed PASS: The pull request changes only one validation marker in machine/v1beta1/types_vsphereprovider.go. The diff adds no Ginkgo test declarations or test-title expressions. Therefore, it introduces no …
Test Structure And Quality ✅ Passed PASS: The pull request changes only one validation marker in machine/v1beta1/types_vsphereprovider.go. The diff contains no Ginkgo test code, It blocks, cluster operations, waits, setup, cleanup, or a…
Microshift Test Compatibility ✅ Passed The pull request changes only one validation marker in machine/v1beta1/types_vsphereprovider.go. It adds no Ginkgo e2e tests or other test constructs. Therefore, the MicroShift test compatibility chec…
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS. The pull request changes only one kubebuilder validation marker in machine/v1beta1/types_vsphereprovider.go. The authoritative diff adds no Ginkgo tests or other test changes, so the SNO compa…
Topology-Aware Scheduling Compatibility ✅ Passed The pull request changes only one validation marker in machine/v1beta1/types_vsphereprovider.go. It changes the TagIDs schema pattern from a slice-level marker to an item-level marker. It does not…
Ote Binary Stdout Contract ✅ Passed PASS. The pull request changes only a kubebuilder validation marker on the TagIDs field in machine/v1beta1/types_vsphereprovider.go. The changed file contains API type declarations and no main, …
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS. The pull request changes only one validation marker in machine/v1beta1/types_vsphereprovider.go. The reviewed diff adds no Ginkgo e2e tests or other test code, so the IPv4 and external-connect…
No-Weak-Crypto ✅ Passed PASS: The pull request changes one line in machine/v1beta1/types_vsphereprovider.go. It only changes a kubebuilder validation marker from Pattern to items:Pattern for the TagIDs string array. …
Container-Privileges ✅ Passed PASS. The pull request changes only one comment marker in machine/v1beta1/types_vsphereprovider.go. The change updates the TagIDs validation marker from Pattern to items:Pattern. No container …
No-Sensitive-Data-In-Logs ✅ Passed PASS. The pull request changes only one kubebuilder validation comment in machine/v1beta1/types_vsphereprovider.go. The added line changes Pattern to items:Pattern for TagIDs; it adds no loggi…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Some tools did not complete. Review the errors below.

🔧 golangci-lint (2.13.2)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from JoelSpeed and mandre September 10, 2026 13:08
@openshift-ci

openshift-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign everettraven for approval. For more information see the Code Review Process.

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

@openshift-ci

openshift-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@Jakob-Naucke: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images 4367ed0 link true /test images

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Machine API vSphereProvider contains an incorrect validation rule

1 participant