Skip to content

feat(tui): Migrate compute.aggregate to generated dispatch - #1904

Open
gtema wants to merge 1 commit into
mainfrom
tui-table-view-dispatch
Open

feat(tui): Migrate compute.aggregate to generated dispatch#1904
gtema wants to merge 1 commit into
mainfrom
tui-table-view-dispatch

Conversation

@gtema

@gtema gtema commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Adds deserialize_items to GeneratedResourceBehaviour (matching the
existing ResourceBehaviour default) as the override point for
per-resource microversion dispatch, and scaffolds
components/compute/generated.rs so compute resources can start
adopting the Generated companion pattern already used by network.

compute.aggregate is the first migrated: its list response varies
across 2.1/2.41 (an added uuid field), so its generated companion
now carries a canonical AggregateItem struct and dispatches on the
negotiated microversion instead of hardcoding one response type.
aggregates.rs forwards all mechanical methods to it; title drops the
redundant "Compute" prefix ("Compute Aggregates" -> "Aggregates"),
matching network's convention.

flavor/hypervisor/server are not migrated here: each has a genuine
breaking field-type change somewhere in its real microversion history
(flavor.swap i64->i32 at 2.102, hypervisor.id i32->String at 2.53,
server.os_ext_srv_attr_hostname Option->String at 2.90), so
the generator correctly refuses to generate dispatch for them until a
hand-written conversion exists.

Signed-off-by: Artem Goncharov artem.goncharov@gmail.com

Adds deserialize_items to GeneratedResourceBehaviour (matching the
existing ResourceBehaviour default) as the override point for
per-resource microversion dispatch, and scaffolds
components/compute/generated.rs so compute resources can start
adopting the Generated companion pattern already used by network.

compute.aggregate is the first migrated: its list response varies
across 2.1/2.41 (an added `uuid` field), so its generated companion
now carries a canonical AggregateItem struct and dispatches on the
negotiated microversion instead of hardcoding one response type.
aggregates.rs forwards all mechanical methods to it; title drops the
redundant "Compute" prefix ("Compute Aggregates" -> "Aggregates"),
matching network's convention.

flavor/hypervisor/server are not migrated here: each has a genuine
breaking field-type change somewhere in its real microversion history
(flavor.swap i64->i32 at 2.102, hypervisor.id i32->String at 2.53,
server.os_ext_srv_attr_hostname Option<String>->String at 2.90), so
the generator correctly refuses to generate dispatch for them until a
hand-written conversion exists.

Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
@gtema
gtema force-pushed the tui-table-view-dispatch branch from fafc368 to f035651 Compare July 30, 2026 16:22
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.

1 participant