Skip to content

fix(config): align --disk-size flag name with production CLI#96

Merged
mrhillsman merged 1 commit into
mainfrom
fix/disk-size-flag-mismatch
May 26, 2026
Merged

fix(config): align --disk-size flag name with production CLI#96
mrhillsman merged 1 commit into
mainfrom
fix/disk-size-flag-mismatch

Conversation

@mrhillsman

Copy link
Copy Markdown
Contributor

BindFlags registered data-disk-size but production main.go registers disk-size, causing the flag to be silently ignored. Rename the flag to disk-size and map it explicitly to the data-disk-size Viper key, matching the pattern used by --no-wait ? wait-for-ready.

add failing tests for --disk-size flag binding

virtwork registers --disk-size but LoadConfig binds data-disk-size, causing the flag to be silently ignored. These tests verify the full priority chain for the disk-size flag.

Fixes #95

@exe-prow-github-app
exe-prow-github-app Bot requested a review from OchiengEd May 26, 2026 00:25
@exe-prow-github-app

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrhillsman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@exe-prow-github-app exe-prow-github-app Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2026
@mrhillsman
mrhillsman removed the request for review from OchiengEd May 26, 2026 00:25
@mrhillsman
mrhillsman force-pushed the fix/disk-size-flag-mismatch branch from e1507bd to efad0c3 Compare May 26, 2026 00:43
The CLI registered --disk-size but the Viper key was data-disk-size,
causing the flag to be silently ignored. Rename the Viper key to
disk-size so flag name, Viper key, and YAML key all match, allowing
bindFlagIfSet to work directly.

Breaking: env var changes from VIRTWORK_DATA_DISK_SIZE to
VIRTWORK_DISK_SIZE; YAML key changes from data-disk-size to disk-size.

Fixes #95

Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
@mrhillsman
mrhillsman force-pushed the fix/disk-size-flag-mismatch branch from efad0c3 to 906b507 Compare May 26, 2026 00:51
@mrhillsman
mrhillsman merged commit 6cc2a12 into main May 26, 2026
3 of 4 checks passed
@mrhillsman
mrhillsman deleted the fix/disk-size-flag-mismatch branch May 28, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: --disk-size flag silently ignored — name mismatch with config binding

1 participant