Skip to content

fix(plan): show each item of a changed list property - #87

Open
GClunies wants to merge 1 commit into
datacoves:mainfrom
GClunies:fix/plan-show-list-items
Open

GClunies wants to merge 1 commit into
datacoves:mainfrom
GClunies:fix/plan-show-list-items

Conversation

@GClunies

@GClunies GClunies commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What

snowcap plan now shows a changed list property one item per row, with the before and after values side by side. A dict item shows as key: value pairs. A non-list value renders as before.

Why

The plan rendered a changed list as one table cell. Past 60 characters, the cell collapsed to <1 line, N chars>. The reviewer could see that something changed but not what changed. A one-word change to a resource monitor trigger (#86) looked like this:

│ triggers │ <1 line, 157 chars> │ <1 line, 158 chars> │

With this change:

│ triggers │ threshold: 50, action: NOTIFY  │ threshold: 50, action: NOTIFY   │
│          │ threshold: 75, action: NOTIFY  │ threshold: 75, action: NOTIFY   │
│          │ threshold: 90, action: NOTIFY  │ threshold: 90, action: NOTIFY   │
│          │ threshold: 100, action: NOTIFY │ threshold: 100, action: SUSPEND │

This applies to every list property, for example allowed_ip_list on network policies and indexes on hybrid tables. Each item shows in full. Only a multiline item still collapses, because the table cannot show a newline.

Items pair by position. If an item is inserted mid-list, the rows after it differ too. This keeps the change small. Lists that Snowcap already sorts (for example resource monitor triggers in #86) line up item by item.

Tested

Check Result
tests/test_blueprint.py::test_plan_text_shows_each_item_of_a_changed_list (network policy IPs; hybrid table indexes with an item longer than 60 chars) fails before, passes after
Unit suite pytest tests --ignore=tests/integration 2229 passed
make lint clean
snowcap plan against a live account with one changed ACCOUNT_RM trigger (on top of #86) output shown above

A changed list (resource monitor triggers, network policy IPs, hybrid
table indexes) rendered as one table cell. Past 60 characters the cell
collapsed to '<1 line, N chars>', so the plan hid what changed. Show one
item per row, before and after side by side, with dict items as
key: value pairs.

This branch has not been deployed

No deployments
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