review: comment budget and named func types in pkg/scale and controllers - #12
Merged
Conversation
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.
Two review-only commits. Behavior is unchanged; the claim path is untouched (no allocation, lock, or control-flow change).
review: comment budget — godoc on interface-implementing methods
Drops godoc that paraphrases the interface the method implements, and condenses the blocks that had grown into justification narrative.
Deleted (the interface documents the contract, and a compile-time check pins the implementation):
pkg/scale/sandboxstore_lifecycle.go— all sevenscatterGatherStorelifecycle methods;SandboxStore/SandboxLifecycleinsandboxstore.goalready document them.pkg/scale/sandboxstore_impl.go—StaticInventorySource.Apply/ListNodes/NodeInventory/NodeCapacityandClientInventorySource.ListNodes/NodeInventory/NodeCapacity.pkg/scale/claimgateway_impl.go—ReviewAuthorizer.Authorize.pkg/scale/warmpool/driver.go—Driver.Reconcile; the requeue-keeps-status-fresh fact is already stated where the predicate is wired inSetupWithManager.pkg/scale/apiserver/lifecycle_storage.go—GroupVersionKindandCreate.pkg/scale/apiserver/storage.go—CreateandDelete.Condensed:
nodeClaimGateway.Release— the eleven-line contract block becomes three lines stating the invariant.sandboxREST.Delete— the delete-authorization invariant survives as one line inside the method body.CacheByObject,checkOwnership,v1alpha1State— one line each.Comment lines: 61 removed, 6 added.
review: named func types
controllers/sandbox_controller.gospelledfunc(string) boolfour times andfunc(string)three times acrossfilterSystemKeys,propagateKeys, andprunePropagated. Both are nowkeyPredicateandkeyCallback.pkg/scale/sandboxstore_impl.gospelledfunc(inv *NodeInventory, i int) boolinfindEntryandmatchOnNode. Both now takeinventoryMatch.No comment lines added or removed.
Gates
Run from the worktree root with
GOWORK=off.