Skip to content

Conversation

@vr4manta
Copy link
Contributor

@vr4manta vr4manta commented Jan 8, 2026

SPLAT-2603

Changes

  • Modified the AWS dedicated host validation pattern to include older deprecated host id pattern of 8 alphanumeric

Notes

CodeRabbit in a separate PR had found that AWS has two patterns for this. It seems this pattern for 8 alphanumeric is an older deprecated ID format that was changed in 2018. We are updating our logic just in case some customer still owns one of these older instances and wants to try to use it with OCP.

@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 openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 8, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 8, 2026

@vr4manta: This pull request references SPLAT-2603 which is a valid jira issue.

Details

In response to this:

SPLAT-2603

Changes

  • Modified the AWS dedicated host validation pattern to include older deprecated host id pattern of 8 alphanumeric

Notes

CodeRabbit in a separate PR had found that AWS has two patterns for this. It seems this pattern for 8 alphanumeric is an older deprecated ID format that was changed in 2018. We are updating our logic just in case some customer still owns one of these older instances and wants to try to use it with OCP.

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

openshift-ci bot commented Jan 8, 2026

Hello @vr4manta! 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.

@coderabbitai
Copy link

coderabbitai bot commented Jan 8, 2026

📝 Walkthrough

Walkthrough

This pull request updates the DedicatedHost ID validation across multiple files to support both legacy 8-hexadecimal and new 17-hexadecimal character formats following the "h-" prefix. The changes modify type definitions, Swagger documentation, and OpenAPI schema specifications to reflect the expanded length constraints of 10 or 19 characters. Additionally, the pull request removes the complete schema definition for GCPServiceEndpoint from the OpenAPI specification.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding support for legacy AWS dedicated hosts, which matches the primary objective of the PR.
Description check ✅ Passed The description is directly related to the changeset, explaining the modification to AWS dedicated host validation and the rationale for supporting legacy 8-character host ID formats.

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

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 6d35063 and d3a75eb.

📒 Files selected for processing (4)
  • machine/v1beta1/types_awsprovider.go
  • machine/v1beta1/zz_generated.swagger_doc_generated.go
  • openapi/generated_openapi/zz_generated.openapi.go
  • openapi/openapi.json
🔇 Additional comments (4)
openapi/openapi.json (1)

23622-23625: LGTM! Description accurately reflects the updated validation pattern.

The description correctly specifies:

  • Format: h- prefix followed by 8 or 17 lowercase hexadecimal characters
  • Total length: 10 or 19 characters (math checks out: 2 + 8 = 10, 2 + 17 = 19)
  • Legacy context for the 8-character format

This aligns with the PR objective of supporting older AWS dedicated hosts that use the deprecated 8-character ID format.

Note: The AI-generated summary claims this file removes the GCPServiceEndpoint schema declaration, but GCPServiceEndpoint does not exist in openapi.json. It does exist in config/v1/types_infrastructure.go. The AI summary appears to have conflated unrelated files or made an unsupported claim. This change is unrelated to the AWS dedicated host feature and should be clarified.

openapi/generated_openapi/zz_generated.openapi.go (1)

40974-40979: Description is accurate; validation constraints confirmed in source file.

The DedicatedHost.id field in machine/v1beta1/types_awsprovider.go has proper validation in place:

  • XValidation rule: ^h-([0-9a-f]{8}|[0-9a-f]{17})$ enforces the format
  • MinLength=10 and MaxLength=19 constraints enforce the length
  • Description accurately documents both legacy (10-char) and new (19-char) formats

The generated OpenAPI description mirrors the source documentation and is correct.

machine/v1beta1/zz_generated.swagger_doc_generated.go (1)

97-97: Swagger documentation correctly updated to reflect both host ID formats.

The documentation string accurately describes the validation rules and correctly matches the source comments in types_awsprovider.go. The file was properly regenerated using the established tooling (hack/update-swagger-docs.sh), as confirmed by the Makefile target and file headers. Git history shows this file was modified as part of the commit for legacy AWS dedicated hosts support.

machine/v1beta1/types_awsprovider.go (1)

466-473: Validation logic correctly supports both legacy and new host ID formats.

The regex pattern ^h-([0-9a-f]{8}|[0-9a-f]{17})$, combined with MinLength=10 and MaxLength=19 constraints, correctly validates both the 10-character legacy format (h-[8 hex]) and the 19-character new format (h-[17 hex]). AWS EC2 still accepts the legacy 8-character host ID format despite the 2018 deprecation. No conflicting DedicatedHost ID validation logic exists elsewhere in the codebase.

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.

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 8, 2026
@openshift-ci openshift-ci bot requested review from JoelSpeed and mandre January 8, 2026 20:04
@JoelSpeed
Copy link
Contributor

/lgtm
/verified bypass

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 9, 2026
@openshift-ci-robot
Copy link

@JoelSpeed: The verified label has been added.

Details

In response to this:

/lgtm
/verified bypass

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 openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 9, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 9, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 9, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 9, 2026

@vr4manta: all tests passed!

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 3920bba into openshift:master Jan 9, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants