feat(cli): resolve a workload into the describe view - #325
Draft
rogirun wants to merge 1 commit into
Draft
Conversation
rogirun
force-pushed
the
feat/cli-describe-pod-attribution
branch
from
September 6, 2026 12:27
7fb7e92 to
1367acb
Compare
rogirun
force-pushed
the
feat/cli-describe-view
branch
from
September 6, 2026 12:59
c300c49 to
7bb0144
Compare
rogirun
force-pushed
the
feat/cli-describe-view
branch
from
September 7, 2026 10:43
7bb0144 to
b7ee02d
Compare
Every describe section - header, tree, phase, resources - has to agree, and a
machine consumer has to read the same picture a human does. One struct is what
guarantees that, so DescribeView carries the whole workload and each rendering
is a projection of it.
Values are typed: replicas are {desired, current, ready} numbers rather than a
"3/4" a consumer re-parses and that breaks silently when the rendering changes.
An unscheduled pod has a null node, not an empty string standing in for one.
ResolveDescribe builds the spec-only tree, then narrows the pods handed to it
top-down through the definition's own PodSelector: ComponentTypeSelector picks
the role, ComponentInstanceSelector and ReplicaSelector split a multi-instance
component into one child per instance. Passing no pods yields the same struct
with every live field empty, which is what file mode will render.
Requested resources come from the spec times the desired scale, so they do not
move when a replica is missing; cpu is millicores and memory bytes, so a
consumer sums integers. tree.Build drops the root, so a root-hosted pod
template (Deployment, Job, StatefulSet, Pod) is rebuilt from the root component
and goes through the same path. An intermediate component the workload never
populates, such as a Deployment's ReplicaSet, is collapsed rather than rendered
as an empty row.
Refs #206
Signed-off-by: Roee Gil <roee.gil@run.ai>
rogirun
force-pushed
the
feat/cli-describe-view
branch
from
September 7, 2026 12:20
b7ee02d to
5dcd00c
Compare
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 does this PR do?
Adds DescribeView, the single struct every describe section renders from. Values are typed: replicas are {desired, current, ready} numbers rather than a "3/4" a consumer re-parses. Pods are narrowed top-down through the definition's own selectors. Passing no pods yields the same struct with live fields empty, which is what file mode renders.
Part of a seven-PR stack implementing
kli describe(#206). Targetsfeat/cli-describe-pod-attribution, which must merge first.Related issue(s)
Refs #206
Checklist
git commit -s)make check)🤖 Generated with Claude Code