Unify vGPU retention wrapping and dedupe test fixtures - #466
Merged
yummybomb merged 1 commit intoAug 28, 2026
Merged
Conversation
Contributor
Author
|
Closing because this cleanup commit was pushed directly onto #321. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cleanup pass on the vendor VFIO vGPU lifecycle layer (#321), no behavior change:
VGPUCleanupPendingErrorin two places instead of going throughvgpuRetentionlike create does. The branch now records retention viamarkRetainedand lets the existing deferredwrapPendingproduce the error, so the pending-error construction and the retained/unretained metric each live in one place. Error text,Retainedflag, metric values, and wrapping order are unchanged.deferWrapPending. It was a one-line adapter aroundwrapPending; the ordering constraint it documented belongs at the two call sites, which now carry it.VGPUDeviceliteral appeared three times invgpu_test.go; extractedtestVendorVFIODevice.Reviewed the rest of the diff for dead branches and redundant tests and deliberately left it alone: the per-callsite retention-stub rejection tests match the four independent guards, the reconcile tests each cover a distinct fail-closed path, and the
interface{ StartVGPUReconciler }assertion incmd/api/main.gofollows the file's existing idiom for optional manager methods.Testing
go build ./...,go vet ./...cleango test -racepasses forlib/devices,lib/hypervisor/qemu, and thelib/instancesvGPU/retention/reconcile/lifecycle suitescmd/api/apiandlib/instancesintegration failures in this environment are identical on the unmodified base branch (network/hypervisor privileges), per-test diff verified