Skip to content

Conversation

@2uasimojo
Copy link
Member

@2uasimojo 2uasimojo commented Jan 19, 2026

User description

The comment for the config/v1/Infrastructure.Spec.PlatformSpec.Type was outdated with respect to the consts defined for the PlatformType typedef. Update.


PR Type

Documentation


Description

  • Update PlatformType comment to reflect current platform constants

  • Add missing "IBMCloud" and "External" platform types

  • Improve comment formatting and readability


Diagram Walkthrough

flowchart LR
  A["PlatformType Comment"] -- "Add IBMCloud, External" --> B["Updated Platforms List"]
  A -- "Improve formatting" --> C["Better Readability"]
  B --> D["Accurate Documentation"]
  C --> D
Loading

File Walkthrough

Relevant files
Documentation
types_infrastructure.go
Update PlatformType comment with missing platforms             

config/v1/types_infrastructure.go

  • Updated PlatformSpec.Type field comment to include "IBMCloud" and
    "External" platforms
  • Removed outdated platform references and reorganized the list
  • Reformatted comment text for improved line wrapping and readability
  • Clarified component support behavior for unrecognized platforms
+4/-3     

@openshift-ci-robot
Copy link

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-robot
Copy link

@2uasimojo: This pull request explicitly references no jira issue.

Details

In response to this:

The comment for the config/v1/Infrastructure.Spec.PlatformSpec.Type was outdated with respect to the consts defined for the PlatformType typedef. Update.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 19, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

Documentation for the PlatformSpec type discriminator was updated to add "IBMCloud" and "External" to the list of allowed platform values. The change touches the source comment, the generated Swagger doc string, and the generated OpenAPI schema description. No Go type signatures, control flow, or other code logic were modified.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: updating the outdated PlatformType comment documentation to include missing platform types.
Description check ✅ Passed The description clearly relates to the changeset, detailing the purpose of updating the PlatformType comment and listing specific improvements like adding IBMCloud and External platforms.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

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 and usage tips.

@qodo-code-review
Copy link

qodo-code-review bot commented Jan 19, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 19, 2026

Hello @2uasimojo! 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 Jan 19, 2026
@qodo-code-review
Copy link

qodo-code-review bot commented Jan 19, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Enforce enum field validation

Add a +kubebuilder:validation:Enum marker to the PlatformType field to enforce
CRD schema validation for the supported platform types.

config/v1/types_infrastructure.go [310-311]

 // +unionDiscriminator
+// +kubebuilder:validation:Enum=AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;VSphere;oVirt;IBMCloud;KubeVirt;EquinixMetal;PowerVS;AlibabaCloud;Nutanix;External;None
 Type PlatformType `json:"type"`
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly proposes to add a +kubebuilder:validation:Enum marker, which improves API robustness by enforcing the allowed platform types at the CRD validation level, rather than just documenting them in a comment.

Medium
  • Update

@2uasimojo
Copy link
Member Author

/assign @JoelSpeed

So:

  • I put these in the order of the consts...
  • ...except "None" which seemed to have a special place at the end.
  • Otherwise I didn't try to overthink it. Notably, I left Alibaba, despite it being obsolete.

@2uasimojo
Copy link
Member Author

PR Code Suggestions ✨

Explore these optional code suggestions:

Category **Suggestion                                                                                                                                    ** Impact
Possible issue
Enforce enum field validation
Add a +kubebuilder:validation:Enum marker to the PlatformType field to enforce CRD schema validation for the supported platform types.

config/v1/types_infrastructure.go [310-311]

 // +unionDiscriminator
+// +kubebuilder:validation:Enum=AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;VSphere;oVirt;IBMCloud;KubeVirt;EquinixMetal;PowerVS;AlibabaCloud;Nutanix;External;None
 Type PlatformType `json:"type"`
  • Apply / Chat

Suggestion importance[1-10]: 7
__

Why: The suggestion correctly proposes to add a +kubebuilder:validation:Enum marker, which improves API robustness by enforcing the allowed platform types at the CRD validation level, rather than just documenting them in a comment.

Medium

  • More

IIUC we don't use enums because it can break backward compatibility.

The comment for the config/v1/Infrastructure.Spec.PlatformSpec.Type was
outdated with respect to the consts defined for the PlatformType
typedef. Update.
@2uasimojo 2uasimojo force-pushed the infra-platformtype-comment branch from 19c87dc to ef70680 Compare January 19, 2026 20:02
@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 19, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 19, 2026

[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 ask for approval from joelspeed. 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

@2uasimojo
Copy link
Member Author

/test verify

@qodo-code-review
Copy link

qodo-code-review bot commented Jan 19, 2026

PR-Agent: could not fine a component named verify in a supported language in this PR.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 19, 2026

@2uasimojo: 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/verify ef70680 link true /test verify

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

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. Review effort 1/5 size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants