Skip to content

OSAC-1471, OSAC-4341: rename NetworkAttachment to ComputeNetworkAttachment - #479

Queued
ori-amizur wants to merge 2 commits into
osac-project:mainfrom
ori-amizur:OSAC-1471
Queued

OSAC-1471, OSAC-4341: rename NetworkAttachment to ComputeNetworkAttachment#479
ori-amizur wants to merge 2 commits into
osac-project:mainfrom
ori-amizur:OSAC-1471

Conversation

@ori-amizur

@ori-amizur ori-amizur commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Renames the ComputeInstanceSpec.network_attachments (field 14) message type from the generic NetworkAttachment to ComputeNetworkAttachment in both private and public fulfillment-service protos, matching the resource-prefixed naming already used by ClusterNetworkAttachment and BareMetalNetworkAttachment. Field number and field name are unchanged, so this is wire/JSON compatible with no database migration required.

Also renames osac-operator's own hand-written ComputeInstance CRD Go type of the same name (companion ticket OSAC-4341), matching the operator's already-resource-prefixed ClusterNetworkAttachment CRD type. JSON tags are unchanged, so this is a Go/CRD-schema-internal rename only.

Updates every production and test reference to the old type names in fulfillment-service and osac-operator, regenerates the vendored proto clients in osac-operator and osac-metering that are built from fulfillment-service's private proto, and regenerates osac-operator's CRD manifests and Helm chart via make manifests generate / make helm-crds.

Assisted-by: Claude Code noreply@anthropic.com

Summary by CodeRabbit

  • Refactor

    • Renamed network attachments to ComputeNetworkAttachment across ComputeInstance APIs and configuration.
    • Updated network attachment references in ComputeInstance specifications, validation, reconciliation, and server workflows.
    • Preserved existing subnet, security group, immutability, and validation behavior.
  • Documentation

    • Updated ComputeInstance schema and CRD descriptions to reflect the new network attachment name.

@openshift-ci-robot

openshift-ci-robot commented Aug 24, 2026

Copy link
Copy Markdown

@ori-amizur: This pull request references OSAC-1471 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.1.0" version, but no target version was set.

This pull request references OSAC-4341 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.1.0" version, but no target version was set.

Details

In response to this:

Renames the ComputeInstanceSpec.network_attachments (field 14) message type from the generic NetworkAttachment to ComputeNetworkAttachment in both private and public fulfillment-service protos, matching the resource-prefixed naming already used by ClusterNetworkAttachment and BareMetalNetworkAttachment. Field number and field name are unchanged, so this is wire/JSON compatible with no database migration required.

Also renames osac-operator's own hand-written ComputeInstance CRD Go type of the same name (companion ticket OSAC-4341), matching the operator's already-resource-prefixed ClusterNetworkAttachment CRD type. JSON tags are unchanged, so this is a Go/CRD-schema-internal rename only.

Updates every production and test reference to the old type names in fulfillment-service and osac-operator, regenerates the vendored proto clients in osac-operator and osac-metering that are built from fulfillment-service's private proto, and regenerates osac-operator's CRD manifests and Helm chart via make manifests generate / make helm-crds.

Assisted-by: Claude Code noreply@anthropic.com

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.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bd25de1d-5c26-4f80-b771-3b20be40af46

📥 Commits

Reviewing files that changed from the base of the PR and between 2734fc0 and fb2c1c5.

⛔ Files ignored due to path filters (12)
  • fulfillment-service/internal/api/osac/tests/v1/reference_test_types.pb.go is excluded by !**/*.pb.go
  • fulfillment-service/internal/api/osac/tests/v1/reference_test_types_protoopaque.pb.go is excluded by !**/*.pb.go
  • osac-operator/internal/api/osac/private/v1/baremetal_instance_type.pb.go is excluded by !**/*.pb.go
  • osac-operator/internal/api/osac/private/v1/baremetal_instance_type_protoopaque.pb.go is excluded by !**/*.pb.go
  • osac-operator/internal/api/osac/private/v1/cluster_template_type.pb.go is excluded by !**/*.pb.go
  • osac-operator/internal/api/osac/private/v1/cluster_template_type_protoopaque.pb.go is excluded by !**/*.pb.go
  • osac-operator/internal/api/osac/private/v1/cluster_type.pb.go is excluded by !**/*.pb.go
  • osac-operator/internal/api/osac/private/v1/cluster_type_protoopaque.pb.go is excluded by !**/*.pb.go
  • osac-operator/internal/api/osac/private/v1/instance_type_type.pb.go is excluded by !**/*.pb.go
  • osac-operator/internal/api/osac/private/v1/instance_type_type_protoopaque.pb.go is excluded by !**/*.pb.go
  • osac-operator/internal/api/osac/private/v1/secret_type.pb.go is excluded by !**/*.pb.go
  • osac-operator/internal/api/osac/private/v1/secret_type_protoopaque.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (2)
  • fulfillment-service/docs/API.md
  • fulfillment-service/proto/tests/osac/tests/v1/reference_test_types.proto

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The PR renames NetworkAttachment to ComputeNetworkAttachment across protobuf APIs, Kubernetes types, fulfillment service code, operator controllers, CRD documentation, generated deepcopy code, and tests. Field numbering, attachment fields, validation rules, and test behavior remain unchanged.

Changes

Compute network attachment rename

Layer / File(s) Summary
API contracts and generated support
fulfillment-service/proto/..., osac-operator/api/v1alpha1/..., osac-operator/config/..., osac-operator/charts/...
The attachment type and related ComputeInstanceSpec fields now use ComputeNetworkAttachment. Generated deepcopy methods, CRD descriptions, and API tests match the renamed type.
Fulfillment service propagation
fulfillment-service/internal/..., fulfillment-service/it/...
CLI parsing, validation, reconciliation, server defaults, fixtures, subnet tests, and integration tests construct the renamed attachment type.
Operator controller validation coverage
osac-operator/internal/controller/...
Controller and validation fixtures use ComputeNetworkAttachment for subnet resolution, reconciliation, mutation, replacement, and item-count scenarios.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to fb2c1

This PR renames network-attachment types while preserving wire fields, JSON tags, and generated artifacts, so no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: jhernand, vladikr

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the primary change: renaming NetworkAttachment to ComputeNetworkAttachment.
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 0 files. (2 skipped: 2 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed The PR diff only renames network-attachment types and updates generated references; scans found no hardcoded credential assignments, vendor tokens, private keys, embedded-credential URLs, or base64...
No-Weak-Crypto ✅ Passed The origin/main...HEAD diff contains no added MD5, SHA1, DES, 3DES, RC4, Blowfish, ECB, crypto API, or constant-time comparison usage; changes are type and documentation renames.
No-Injection-Vectors ✅ Passed The full PR diff contains type-name, comment, proto, and generated-client changes only; added-line and structural searches found no SQL concatenation, shell, eval/exec, pickle, unsafe YAML, os.syst...
Container-Privileges ✅ Passed The base-to-HEAD diff adds no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation, or root settings; changed YAML only updates CRD descriptions.
No-Sensitive-Data-In-Logs ✅ Passed Diff scan found no added logging calls; changed hunks only rename attachment types, while existing logs keep the same subnet and security-group IDs.
Ai-Attribution ✅ Passed The PR and both changed commits disclose Claude Code with Assisted-by trailers; neither changed commit uses an AI Co-Authored-By trailer.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 24, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:35 PM UTC · Completed 1:56 PM UTC

Commit: 2734fc0 · View workflow run →

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 24, 2026

Copy link
Copy Markdown

Review

Findings

Medium

  • [breaking-api] fulfillment-service/proto/public/osac/public/v1/compute_instance_type.proto:45 — The public proto renames NetworkAttachment to ComputeNetworkAttachment. While wire-compatible (field numbers and field names are preserved, no google.protobuf.Any wrapping), external repositories importing generated Go types — notably osac-test-infra (E2E tests) — will see compile-time breakage when they next regenerate or vendor their proto clients. osac-ui (React/TypeScript) likely consumes REST/JSON using field names (network_attachments) which are unchanged, so it is probably unaffected.
    Remediation: Coordinate with osac-test-infra maintainers to land a corresponding PR updating references from NetworkAttachment to ComputeNetworkAttachment before or alongside this merge.

Low

  • [stale-reference] osac-operator/api/v1alpha1/computeinstance_types_test.go:271 — The Describe block title still reads "NetworkAttachment immutability validation" after the type was renamed to ComputeNetworkAttachment. String-only issue with no compilation impact, but will confuse anyone searching for test coverage of the renamed type.
    Remediation: Rename the string to "ComputeNetworkAttachment immutability validation".

  • [stale-reference] osac-operator/internal/controller/computeinstance_validation_test.go:93 — The Describe block title still reads "NetworkAttachment immutability" after the type was renamed. Same discoverability issue.
    Remediation: Rename the string to "ComputeNetworkAttachment immutability".

Previous run

Review

Findings

Medium

  • [stale-doc] fulfillment-service/docs/API.md:594 — Line 594 references the old proto message name NetworkAttachment in the explanation of local references: "a NetworkAttachment referencing a Subnet and SecurityGroup." The PR renames this type to ComputeNetworkAttachment, making this documentation reference stale.
    Remediation: Replace NetworkAttachment with ComputeNetworkAttachment on line 594.

  • [go-source-breaking-change] fulfillment-service/internal/api/osac/public/v1/compute_instance_type.pb.go — The public proto is published to buf.build/osac-project/public-api. External consumers (osac-test-infra Python gRPC stubs, osac-ui TypeScript stubs) that generate client code from this proto will need to update references from NetworkAttachment to ComputeNetworkAttachment when regenerating against the new schema.
    Remediation: Ensure osac-test-infra and osac-ui regenerate their proto stubs and update references after this PR merges.

Low

  • [stale-reference] fulfillment-service/proto/tests/osac/tests/v1/reference_test_types.proto:40 — Comment references the old proto message name: // Nested message containing reference fields (mirrors NetworkAttachment).
    Remediation: Update to reference ComputeNetworkAttachment.

  • [protobuf-breaking-change] fulfillment-service/proto/public/osac/public/v1/compute_instance_type.proto:45 — The fully-qualified protobuf name changes from osac.public.v1.NetworkAttachment to osac.public.v1.ComputeNetworkAttachment. Wire/JSON compatibility is preserved (field numbers unchanged). buf breaking is configured but not enforced in CI.

  • [protobuf-breaking-change] fulfillment-service/proto/private/osac/private/v1/compute_instance_type.proto:41 — Same FQN change in the private proto. All in-repo consumers (osac-operator, osac-metering) are updated in this PR.

  • [go-source-breaking-change] osac-operator/api/v1alpha1/computeinstance_types.go:95 — Exported Go type v1alpha1.NetworkAttachment renamed to v1alpha1.ComputeNetworkAttachment. All in-repo consumers updated. CRD YAML schema unaffected (JSON tags unchanged).


Labels: PR is a pure type-rename refactor across fulfillment-service, osac-operator, and osac-metering

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 24, 2026

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Started 2:46 PM UTC · Ended 2:59 PM UTC

Commit: 1c3a6da · View workflow run →

…hment

Renames the ComputeInstanceSpec.network_attachments (field 14) message
type from the generic NetworkAttachment to ComputeNetworkAttachment in
both private and public fulfillment-service protos, matching the
resource-prefixed naming already used by ClusterNetworkAttachment and
BareMetalNetworkAttachment. Field number and field name are unchanged,
so this is wire/JSON compatible with no database migration required.

Also renames osac-operator's own hand-written ComputeInstance CRD Go
type of the same name (companion ticket OSAC-4341), matching the
operator's already-resource-prefixed ClusterNetworkAttachment CRD type.
JSON tags are unchanged, so this is a Go/CRD-schema-internal rename
only.

Updates every production and test reference to the old type names in
fulfillment-service and osac-operator, regenerates the vendored proto
clients in osac-operator and osac-metering that are built from
fulfillment-service's private proto, and regenerates osac-operator's
CRD manifests and Helm chart via make manifests generate / make
helm-crds.

Also regenerates the rest of osac-operator's vendored proto client
(baremetal_instance_type, cluster_template_type, cluster_type,
instance_type_type, secret_type, and their protoopaque variants), which
had drifted stale relative to fulfillment-service's current proto for
reasons unrelated to this change. Touching any osac-operator file makes
CI's "Check generated code" job re-verify the entire vendored tree, not
just the files this rename cares about, so the pre-existing drift had
to be resolved here too.

Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Ori Amizur <oamizur@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 24, 2026

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Started 3:00 PM UTC · Ended 3:05 PM UTC

Commit: 8553476 · View workflow run →

Two prose/comment references to the old NetworkAttachment name were
missed by the initial rename (caught by automated PR review):
docs/API.md's local-reference example, and a test-only proto message's
doc comment (regenerated into the corresponding Go files).

Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Ori Amizur <oamizur@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 24, 2026

Copy link
Copy Markdown

🤖 Review · ❌ Terminated · Started 3:06 PM UTC · Ended 3:21 PM UTC

Commit: fb2c1c5 · View workflow run →

@openshift-ci

openshift-ci Bot commented Aug 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danmanor, ori-amizur

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:
  • OWNERS [danmanor,ori-amizur]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.


Note: The following inline comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • fulfillment-service/proto/public/osac/public/v1/compute_instance_type.proto:45: [medium] breaking-api

The public proto renames NetworkAttachment to ComputeNetworkAttachment. While wire-compatible (field numbers and field names preserved), external repositories importing generated Go types (notably osac-test-infra) will see compile-time breakage when they next regenerate or vendor their proto clients. osac-ui (React/TypeScript) likely consumes REST/JSON using field names (network_attachments) which are unchanged and is probably unaffected.

Suggested fix: Coordinate with osac-test-infra maintainers to land a corresponding PR updating references from NetworkAttachment to ComputeNetworkAttachment before or alongside this merge.

  • osac-operator/api/v1alpha1/computeinstance_types_test.go (file-level): Line 271 · [low] stale-reference

The Describe block title still reads "NetworkAttachment immutability validation" after the type was renamed to ComputeNetworkAttachment. String-only issue with no compilation impact, but will confuse anyone searching for test coverage of the renamed type.

Suggested fix: Rename the string to "ComputeNetworkAttachment immutability validation".

  • osac-operator/internal/controller/computeinstance_validation_test.go (file-level): Line 93 · [low] stale-reference

The Describe block title still reads "NetworkAttachment immutability" after the type was renamed to ComputeNetworkAttachment. Same discoverability issue.

Suggested fix: Rename the string to "ComputeNetworkAttachment immutability".

@fullsend-ai-review

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 3:06 PM UTC · Completed 3:21 PM UTC

Commit: fb2c1c5 · View workflow run →

@omer-vishlitzky
omer-vishlitzky added this pull request to the merge queue Aug 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 24, 2026
@omer-vishlitzky
omer-vishlitzky added this pull request to the merge queue Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved jira/valid-reference lgtm refactoring Refactor existing code requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants