Skip to content

fix(storage): generate expected JSON when using current size#2737

Merged
joseivanlopez merged 2 commits intoagama-project:SLE-16from
joseivanlopez:bsc1249591
Sep 16, 2025
Merged

fix(storage): generate expected JSON when using current size#2737
joseivanlopez merged 2 commits intoagama-project:SLE-16from
joseivanlopez:bsc1249591

Conversation

@joseivanlopez
Copy link
Copy Markdown
Contributor

@joseivanlopez joseivanlopez commented Sep 15, 2025

Problem

The storage config is not properly exported to JSON when the size is configured to use the current size of the device, see https://github.com/agama-project/agama/blob/master/doc/storage_proposal_from_profile.md#using-current.

As side effect, devices marked to be shrunk in the UI were actually configured to shrink and grow at the same time. The proposal currently fails with such a config.

The problem only affects to the proposal calculated using the UI and it started to fail since this PR #2622. Although the real source of the problem (wrong exported JSON) has been always there.

Solution

Generate the correct JSON when using the current size of a device.

Testing

  • Unit tests adapted
  • Tested manually

@joseivanlopez joseivanlopez changed the base branch from master to SLE-16 September 15, 2025 13:59
@joseivanlopez joseivanlopez changed the title fix(storage): generate expected JSON when size is not configured fix(storage): generate expected JSON when using current size Sep 15, 2025
@joseivanlopez joseivanlopez marked this pull request as ready for review September 15, 2025 14:18
Copy link
Copy Markdown
Contributor

@ancorgs ancorgs left a comment

Choose a reason for hiding this comment

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

If this was tested manually, then LGTM.

@joseivanlopez joseivanlopez merged commit 1199827 into agama-project:SLE-16 Sep 16, 2025
5 checks passed
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.

2 participants