review: judge lenses over the cli - #134
Merged
Merged
Conversation
The build progress index is the map's size; cache and remove hold the RPC options directly; the lambda stdin flag lives in the deploy options only.
The node status command beats once before its ticker; pod flags drop their zero-value defaults and pod nodes rejects a missing name; the pod resource filter is parsed once, before the RPC, and applied as a predicate inside describe, so every node's percentages are computed once for any output format; SplitFiles rejects a malformed spec instead of dropping it; the ParseRAMInHuman wrapper is gone; the force flag is built once; copy opens its destination with O_EXCL; sendlarge logs once; ramOption returns on the shortcut first; describe collapses the two channel drainers into describeChOr and the four ratio blocks into ratio/sumParams; CPUs render without trailing zeros; the spec yaml tags carry only names.
The path is the user's --dir joined with the workload's file name, the same path WriteFile took before the O_EXCL open replaced it.
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.
What
A judgment-lens pass (reuse, simplification, efficiency, altitude, interface, over-design, dead) over every production file of the cli, read in full. Two commits, one per wave; every change is listed in the commit bodies. Highlights:
cmd/pod/resource.goanddescribe: the--filterexpression is parsed once, before the RPC, and applied as a predicate inside describe, so every node's percentages are computed once for any output format; the two channel drainers collapse intodescribeChOr, the four ratio blocks intoratioandsumParams.cmd/node/status.go: the periodic mode beats once before its ticker instead of waiting a full interval for the first report.cmd/utils/file.go:SplitFilesrejects a malformedsrc:dstspec instead of silently dropping it.cmd/image: the build progress index is the map's size; cache and remove hold the RPC options directly.cmd/workload: the force flag is built once;copyopens its destination withO_EXCLinstead of stat-then-write;sendlargelogs its error once; the lambda stdin flag lives in the deploy options only.ParseRAMInHumanwrapper, the--cpu/--memoryshortcut defaults thatIsSetnever saw, zero-value flag fields, thefiltergoroutine.Lines
Production −103 net; tests −55 net (the cli-side re-test of core's
ParseRAMInHumanis gone; a filter test moved into describe).Evidence
Gate on the branch: build, vet, full tests,
make lint,make fmt-checkandaslon both GOOS green; comment delta +0 −2.