fix(replication): let RemoteDefaultExports suppress remote default exports (#55) - #93
Merged
Merged
Conversation
…ports (#55) New-PfbFileSystemReplicaLink exposed -RemoteDefaultExports as a [switch], so it could only ever request remote_default_exports=true. When omitted the array applied its own default (create the exports), and there was no way to send false. Result: every replicated file system came up with default NFS/SMB exports that had to be deleted by hand on the remote array. Change the parameter to [Nullable[bool]] (matching the module's existing tri-state idiom, e.g. New-PfbFileSystem -SnapshotDirectoryEnabled) and send remote_default_exports only when the caller bound it, guarding on presence not truthiness so false reaches the wire: - omitted -> array default (unchanged behavior) - $true -> remote_default_exports=true - $false -> remote_default_exports=false (previously impossible) Adds Tests/New-PfbFileSystemReplicaLink.Tests.ps1 (the cmdlet had none), asserting the wire value for all three states plus the parameter type. Breaking change: the bare -RemoteDefaultExports switch form now requires a value (-RemoteDefaultExports $true). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Merged
dmann000
added a commit
that referenced
this pull request
Aug 4, 2026
Bumps ModuleVersion 2.2.0 -> 2.3.0, adds the 2.3.0 CHANGELOG entry, and refreshes the manifest ReleaseNotes highlight. This is the release-gating PR and should merge LAST, after the three reviewed-ready PRs it documents: #91 (array-connection remote_names / #64), #92 (HTTP status in errors), and #93 (RemoteDefaultExports suppression / #55). Includes two disclosed breaking changes (see CHANGELOG "Changed"): the Update-PfbArrayConnection -Name/-RemoteName alias collision, and New-PfbFileSystemReplicaLink -RemoteDefaultExports becoming [Nullable[bool]]. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
New-PfbFileSystemReplicaLink -RemoteDefaultExportswas a[switch], so it could only ever sendremote_default_exports=true. Omitting it sent nothing, letting the array apply its own default (create the exports). There was no way to sendfalse.Consequence, hit on every share during an active field migration: each replicated file system came up with default NFS/SMB exports on the remote array that had to be deleted by hand.
Fix
-RemoteDefaultExportsbecomes[Nullable[bool]], matching the module's existing tri-state idiom (e.g.New-PfbFileSystem -SnapshotDirectoryEnabled,-Writable).$PSBoundParameters.ContainsKey) not truthiness, so$falsereaches the wire:$true→remote_default_exports=true$false→remote_default_exports=false(previously impossible)Tests
Adds
Tests/New-PfbFileSystemReplicaLink.Tests.ps1— the cmdlet had no test file. Asserts the wire value for all three states, the required selectors, and that the parameter is a nullable bool rather than a switch. Green on Pester 6.0.1 (6/6).Breaking change
The bare
-RemoteDefaultExportsswitch form now requires a value: use-RemoteDefaultExports $true. Worth a CHANGELOG "breaking" note when the release is cut.Scope
This is the replica-link half of #55, which is verified and safe. The create-side half (suppressing the
array_serverdefault exports onNew-PfbFileSystem) is intentionally not included here: neitherdefault_exportsnorremote_default_exportsis modeled in the committed capability map, and the raw spec is not committed, so the exact create-side wire shape (empty array vs bool vs query key) can't be confirmed from repo artifacts. The field user is compiling written API notes with the exact observation; that half stays tracked in #55 to land once the wire format is confirmed, rather than guessed.Refs #55.