Skip to content

kueue: Type Workload topology assignment and show it in the Admission table - #1298

Open
xonas1101 wants to merge 2 commits into
headlamp-k8s:mainfrom
xonas1101:fix/kueue-workload-topology-assignment-type
Open

xonas1101 wants to merge 2 commits into
headlamp-k8s:mainfrom
xonas1101:fix/kueue-workload-topology-assignment-type

Conversation

@xonas1101

Copy link
Copy Markdown

Fixes #1297

status.admission.podSetAssignments[].topologyAssignment was typed as unknown in src/resources/workload.ts and never rendered, even though the plugin already fetches it on the Workload detail page.

Changes:

  • Added TopologyAssignment and TopologyDomainAssignment interfaces matching Kueue's v1beta2 API, replacing the unknown type
  • Added a renderTopologyAssignment formatter that renders levels and domains as readable text instead of a raw object
  • Added a "Topology Assignment" column to the Admission table on the Workload detail page
  • Added a unit test for the new formatter

Ran locally: build, tsc, lint, format --check, and test all pass.

… table

status.admission.podSetAssignments[].topologyAssignment was typed as
unknown and never rendered, even though the plugin already fetches it.
Add proper TopologyAssignment/TopologyDomainAssignment interfaces, a
formatter, and a Topology Assignment column on the Workload detail
page's Admission table.

Fixes headlamp-k8s#1297

Signed-off-by: Aarush <aarushsingh1305@gmail.com>
Copilot AI lite review requested due to automatic review settings September 15, 2026 09:39
@xonas1101

Copy link
Copy Markdown
Author

/cc @kannon92 @illume @helayoty

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The topology assignment model does not match v1beta2, leaving the new column empty for real v1beta2 assignments.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR types Kueue topology assignments and displays them in the Workload Admission table.

Changes:

  • Adds topology assignment interfaces.
  • Adds readable topology formatting and tests.
  • Adds the Topology Assignment table column.

Review finding: The model uses the v1beta1 domains shape instead of v1beta2 slices, so real v1beta2 assignments will render as empty. The types and formatter should support the correct version(s). (Moderate, 2 votes.)

File summaries
File Summary
kueue/src/resources/workloadFormatters.ts Formats topology assignment details.
kueue/src/resources/workloadFormatters.test.ts Tests topology formatting.
kueue/src/resources/workload.ts Defines topology assignment types.
kueue/src/components/workloads/Detail.tsx Displays topology assignments in the Admission table.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread kueue/src/resources/workload.ts Outdated
Workload fetches v1beta2 first, and v1beta2's TopologyAssignment is a
list of slices (domainCount, valuesPerLevel, podCounts) rather than a
flat list of domains. The previous model matched v1beta1 and would
have rendered empty on real v1beta2 clusters. Expand slices into
per-domain values and counts for display.

Signed-off-by: Aarush <aarushsingh1305@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kueue: Workload topology assignment is typed as unknown and not shown

2 participants