OSAC-3276: fix volume reconciler test — drop obsolete PVCRef assertion - #366
OSAC-3276: fix volume reconciler test — drop obsolete PVCRef assertion#366danielerez wants to merge 1 commit into
Conversation
The volume reconciler unit test asserted `spec.PVCRef` on the CRD
VolumeSpec, but that field no longer exists, so the `volume` package
fails to compile and both "Run unit tests" and "Check Go and proto
code" are red on main:
internal/controllers/volume/volume_reconciler_function_test.go:103:15:
spec.PVCRef undefined (type v1alpha1.VolumeSpec has no field or
method PVCRef)
Root cause is a semantic merge conflict between two PRs, both authored
by @akshaynadkarni:
- osac-project#341 (OSAC-3274) removed pvcRef/pvRef from VolumeSpec, merged first
(2026-08-17).
- osac-project#339 (OSAC-3276) added the reconciler test referencing spec.PVCRef,
merged second (2026-08-18) off a branch that predated osac-project#341 and was
not re-validated against the updated main.
Each PR was green in isolation; combined on main they do not compile.
Remove the stale assertion to restore the build. PVC/PV tracking is
planned for a future VolumeAttachment resource (OSAC-3278), not the
Volume itself, so there is nothing to re-point the assertion at.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@danielerez: This pull request references OSAC-3276 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. DetailsIn response to this:
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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danielerez The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Repository: osac-project/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
|
🤖 Finished Review · ✅ Success · Started 3:28 PM UTC · Completed 3:36 PM UTC Commit: |
|
Looks good to me Labels: PR fixes a compilation error caused by a semantic merge conflict (stale test assertion references a removed struct field) Previous runLooks good to me |
|
🤖 Finished Review · ✅ Success · Started 4:07 PM UTC · Completed 4:16 PM UTC Commit: |
Pull request was closed
Problem
mainis currently red on Run unit tests and Check Go and proto code. Thevolumepackage fails tocompile:
internal/controllers/volume/volume_reconciler_function_test.go:103:15:
spec.PVCRef undefined (type "…/osac-operator/api/v1alpha1".VolumeSpec
has no field or method PVCRef)
Root cause
A semantic merge conflict between two PRs (both by @akshaynadkarni), each green in isolation but incompatible
once both landed:
pvcRef/pvReffromVolumeSpec— merged first (2026-08-17).spec.PVCRef— merged second (2026-08-18), off abranch that predated OSAC-3274: remove pvcRef and pvRef from Volume #341 and was not re-validated against the updated
main.Fix
Remove the stale
Expect(spec.PVCRef).To(BeNil())assertion.PVCRefno longer exists onVolumeSpec; PVC/PVtracking is planned for a future
VolumeAttachmentresource (OSAC-3278), not theVolumeitself, so there isnothing to re-point the assertion at.
go vet ./internal/controllers/volume/passes;gofmtclean