Skip to content

feat: Generate mode/action/app wiring per resource - #1897

Merged
gtema merged 1 commit into
mainfrom
codegenerator_998982
Jul 29, 2026
Merged

feat: Generate mode/action/app wiring per resource#1897
gtema merged 1 commit into
mainfrom
codegenerator_998982

Conversation

@gtema

@gtema gtema commented Jul 29, 2026

Copy link
Copy Markdown
Owner

mode.rs/action.rs/app.rs stayed 100% hand-synced across ~30 TUI
resources with no cross-check, and cloud_worker generation never
touched them. These files are also shared across all services and
hand-edited, so a full-file overwrite would destroy other
resources' content.

Add RustTuiViewGenerator, driven by a new opt-in
extensions.rust-tui-view metadata block per resource, patching
only that resource's marker-delimited region via the new
BaseGenerator._patch_marker_region/generate_view helpers.
Resources without the extension are left untouched, so migration
is incremental. Piloted and rolled out for all of network's
migrated resources; regenerated files matched the hand-written
originals byte-for-byte (mode.rs/action.rs) or by an expected
rustfmt line-wrap (app.rs), and reruns are idempotent.

CI: rust-tui-view reads existing files to find markers, unlike every
other target which only writes new ones, so the generation step needs
the target repo's current content before it runs, not after. Add a
pre-step in playbooks/rust/all.yaml seeding wrk/rust/openstack_tui from
a scratch checkout, and wire rust-tui-view into network's target list in
zuul.d/rust.yaml (the only service with opted-in resources so far).

Changes are triggered by https://review.opendev.org/c/openstack/codegenerator/+/998982

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

mode.rs/action.rs/app.rs stayed 100% hand-synced across ~30 TUI
resources with no cross-check, and cloud_worker generation never
touched them. These files are also shared across all services and
hand-edited, so a full-file overwrite would destroy other
resources' content.

Add RustTuiViewGenerator, driven by a new opt-in
extensions.rust-tui-view metadata block per resource, patching
only that resource's marker-delimited region via the new
BaseGenerator._patch_marker_region/generate_view helpers.
Resources without the extension are left untouched, so migration
is incremental. Piloted and rolled out for all of network's
migrated resources; regenerated files matched the hand-written
originals byte-for-byte (mode.rs/action.rs) or by an expected
rustfmt line-wrap (app.rs), and reruns are idempotent.

CI: rust-tui-view reads existing files to find markers, unlike every
other target which only writes new ones, so the generation step needs
the target repo's current content before it runs, not after. Add a
pre-step in playbooks/rust/all.yaml seeding wrk/rust/openstack_tui from
a scratch checkout, and wire rust-tui-view into network's target list in
zuul.d/rust.yaml (the only service with opted-in resources so far).

Changes are triggered by https://review.opendev.org/c/openstack/codegenerator/+/998982

Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
@gtema
gtema merged commit 276a3c2 into main Jul 29, 2026
19 checks passed
@gtema
gtema deleted the codegenerator_998982 branch July 29, 2026 11:37
@gtema-release-plz gtema-release-plz Bot mentioned this pull request Jul 29, 2026
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