Skip to content

OSAC-496: Remove subnet/tenant fallback dead code#297

Closed
tchughesiv wants to merge 1 commit into
osac-project:mainfrom
tchughesiv:OSAC-496-remove-fallback-dead-code
Closed

OSAC-496: Remove subnet/tenant fallback dead code#297
tchughesiv wants to merge 1 commit into
osac-project:mainfrom
tchughesiv:OSAC-496-remove-fallback-dead-code

Conversation

@tchughesiv

@tchughesiv tchughesiv commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

OSAC-496: Remove subnet/tenant fallback dead code (osac-operator)

Jira: https://redhat.atlassian.net/browse/OSAC-496
Companion PR: osac-project/fulfillment-service#704

Summary

Removes dead fallback paths in the ComputeInstance controller after subnet became mandatory. Empty primary subnet reference is a permanent reconciliation error. VM lookup always uses the subnet target namespace — no fallback to tenant namespace.

Changes

  • Added errSubnetRequired sentinel; resolveSubnetTargetNamespace() errors on empty subnet ref
  • Removed tenant-namespace fallback in handleUpdate()
  • Updated controller tests; newTestComputeInstanceSpec includes default subnet attachment

Testing

  • Unit/envtest: make test — pass
  • Smoke: make test-smoke — pass
  • Lint: make lint — pass

Acceptance Criteria

  • No implicit fallback to tenant namespace in osac-operator
  • Empty SubnetRef treated as an error in the operator
  • All tests pass

Notes

Legacy ComputeInstances without networkAttachments[0].subnetRef will fail reconciliation permanently (intentional per OSAC-496).

@openshift-ci-robot

openshift-ci-robot commented Jun 15, 2026

Copy link
Copy Markdown

@tchughesiv: This pull request references OSAC-496 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.0.0" version, but no target version was set.

Details

In response to this:

OSAC-496: Remove subnet/tenant fallback dead code (osac-operator)

Jira: https://redhat.atlassian.net/browse/OSAC-496
Companion PR: fulfillment-service (same Jira)

Summary

Removes dead fallback paths in the ComputeInstance controller after subnet became mandatory. Empty primary subnet reference is a permanent reconciliation error. VM lookup always uses the subnet target namespace — no fallback to tenant namespace.

Changes

  • Added errSubnetRequired sentinel; resolveSubnetTargetNamespace() errors on empty subnet ref
  • Removed tenant-namespace fallback in handleUpdate()
  • Updated controller tests; newTestComputeInstanceSpec includes default subnet attachment

Testing

  • Unit/envtest: make test — 439 specs pass (includes envtest reconcile paths)
  • Lint: make lint — 0 issues

Acceptance Criteria

  • No implicit fallback to tenant namespace in osac-operator
  • Empty SubnetRef treated as an error in the operator
  • All tests pass

Notes

Legacy ComputeInstances without networkAttachments[0].subnetRef will fail reconciliation permanently (intentional per OSAC-496).

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 commented Jun 15, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@tchughesiv, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 58 minutes and 16 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 852163d5-a46d-4497-9cf0-ef6a15712ac0

📥 Commits

Reviewing files that changed from the base of the PR and between acb50ad and f1c8b0b.

📒 Files selected for processing (3)
  • internal/controller/computeinstance_controller.go
  • internal/controller/computeinstance_controller_test.go
  • internal/controller/suite_test.go
✨ Finishing Touches
🧪 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 and usage tips.

@openshift-ci

openshift-ci Bot commented Jun 15, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tchughesiv
Once this PR has been reviewed and has the lgtm label, please assign larsks 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

Treat empty primary subnet reference as a permanent reconciliation error
and resolve VM lookup only from the subnet target namespace.
@tchughesiv tchughesiv force-pushed the OSAC-496-remove-fallback-dead-code branch from 55f47a0 to f1c8b0b Compare June 15, 2026 17:50
@tchughesiv tchughesiv marked this pull request as ready for review June 15, 2026 17:52
@openshift-ci openshift-ci Bot requested review from danmanor and eliorerz June 15, 2026 17:52
@tchughesiv

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@tchughesiv

tchughesiv commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

awaiting tenancy decisions via OSAC-1546

@tchughesiv tchughesiv closed this Jun 16, 2026
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