Skip to content

feat(inkless:config): disallow setting diskless.enable if diskless storage system is disabled#520

Merged
giuseppelillo merged 1 commit intomainfrom
giuseppelillo/no-diskless-if-system-disabled
Mar 3, 2026
Merged

feat(inkless:config): disallow setting diskless.enable if diskless storage system is disabled#520
giuseppelillo merged 1 commit intomainfrom
giuseppelillo/no-diskless-if-system-disabled

Conversation

@giuseppelillo
Copy link
Copy Markdown
Contributor

No description provided.

@giuseppelillo giuseppelillo force-pushed the giuseppelillo/no-diskless-if-system-disabled branch from 0d3c679 to 393767e Compare February 27, 2026 15:56
Comment on lines -526 to -528
// Only one between diskless.enable and remote.storage.enable can be set, no matter the value.
final boolean hasExplicitDiskless = isDisklessExplicitlySet || wasDisklessExplicitlySet;
final boolean hasExplicitRemoteStorage = isRemoteStorageExplicitlySet || wasRemoteStorageExplicitlySet;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Extracted to specific methods because validateDiskless was exceeding the limit on cyclomatic complexity.

Copy link
Copy Markdown
Contributor

@jeqo jeqo left a comment

Choose a reason for hiding this comment

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

LGTM.

Properties props,
Map<?, ?> configuredProps,
boolean isRemoteLogStorageSystemEnabled,
boolean isDisklessAllowFromClassicEnabled,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: dead argument. Can be fixed in a follow-up.

@giuseppelillo giuseppelillo merged commit 3b80522 into main Mar 3, 2026
6 checks passed
@giuseppelillo giuseppelillo deleted the giuseppelillo/no-diskless-if-system-disabled branch March 3, 2026 14:35
giuseppelillo added a commit that referenced this pull request Mar 3, 2026
giuseppelillo added a commit that referenced this pull request Mar 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.

2 participants