Skip to content

fix(table): fix stack list silent crash on null resource_control#4

Open
FAZuH wants to merge 1 commit into
wahl-dev:mainfrom
FAZuH:fix/stack-list-display
Open

fix(table): fix stack list silent crash on null resource_control#4
FAZuH wants to merge 1 commit into
wahl-dev:mainfrom
FAZuH:fix/stack-list-display

Conversation

@FAZuH

@FAZuH FAZuH commented Jun 2, 2026

Copy link
Copy Markdown

wrpt stack list silently fails and results in empty output if there exists a stack with null StackList::resource_control.

This PR:

  • Changes the type from ResourceControl to Option<ResourceControl> so the command does not fail silently.
  • Parses serde_json::Value::Null into an empty string to prevent the value showing as null.
  • Adds an unit test to verify that a stack with "ResourceControl": null in the API response correctly deserializes to StackList with resource_control: None rather than crashing.
image

Note that Stack in src/commands/stacks/models/deploy.rs does not need any changes since the resource_control is already Option<ResourceControl>

󰣇 ~/Projects/wrpt   HEAD(5080bbc)   $ ❮ rg 'resource_control: '                                                                                                                                                             rs    22:10
src/commands/stacks/models/list.rs
23:    pub(crate) resource_control: ResourceControl,

src/commands/stacks/models/deploy.rs
60:    pub(crate) resource_control: Option<ResourceControl>,

@FAZuH FAZuH force-pushed the fix/stack-list-display branch from aab792c to 8eb4c33 Compare June 2, 2026 19:30
@FAZuH FAZuH changed the title fix(table): fix stack list deserialization on null resource_control fix(table): fix stack list silent crash on null resource_control Jun 3, 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