Skip to content

feat(cli): --spill-dir and --spill-threshold-bytes flags (STN-11 #2345) - #4423

Merged
oferchen merged 1 commit into
masterfrom
feature/stn-11-cli-flags
May 18, 2026
Merged

oferchen merged 1 commit into
masterfrom
feature/stn-11-cli-flags

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Two new CLI flags under "Advanced (spill)":
    • --spill-dir <PATH> overrides OC_RSYNC_SPILL_DIR and SpillPolicy::dir.
    • --spill-threshold-bytes <BYTES> overrides OC_RSYNC_SPILL_THRESHOLD_BYTES and SpillPolicy::threshold_bytes.
  • Precedence: CLI > env > defaults, cemented by SpillPolicy::apply_cli_overrides which runs after the env-var loader.
  • Help-grouped so it does not clutter the main help screen.

Test plan

  • cargo fmt --all clean
  • CLI > env > default precedence verified

Closes #2345.

@github-actions github-actions Bot added the enhancement New feature or request label May 18, 2026
@oferchen
oferchen force-pushed the feature/stn-11-cli-flags branch from 5afe292 to c61f77d Compare May 18, 2026 00:56
Adds two opt-in CLI overrides for the reorder-buffer SpillPolicy under
the "Advanced (spill)" help heading:

- --spill-dir <PATH> overrides OC_RSYNC_SPILL_DIR and
  SpillPolicy::dir.
- --spill-threshold-bytes <BYTES> overrides
  OC_RSYNC_SPILL_THRESHOLD_BYTES and SpillPolicy::threshold_bytes.
  Accepts a positive integer with an optional K/M/G/T/P/E suffix
  (base 1024); 0 is rejected.

Precedence is CLI > env > defaults, cemented by the new
SpillPolicy::apply_cli_overrides method which is invoked after the
env-var loader. Flags are wired through ParsedArgs ->
ConfigInputs -> ClientConfigBuilder -> ClientConfig with
matching accessors and round-trip tests.

Closes #2345.
@oferchen
oferchen force-pushed the feature/stn-11-cli-flags branch from c61f77d to 311f064 Compare May 18, 2026 01:13
@oferchen
oferchen merged commit 7bfe2d0 into master May 18, 2026
4 of 15 checks passed
oferchen added a commit that referenced this pull request May 18, 2026
… (#4423)

Adds two opt-in CLI overrides for the reorder-buffer SpillPolicy under
the "Advanced (spill)" help heading:

- --spill-dir <PATH> overrides OC_RSYNC_SPILL_DIR and
  SpillPolicy::dir.
- --spill-threshold-bytes <BYTES> overrides
  OC_RSYNC_SPILL_THRESHOLD_BYTES and SpillPolicy::threshold_bytes.
  Accepts a positive integer with an optional K/M/G/T/P/E suffix
  (base 1024); 0 is rejected.

Precedence is CLI > env > defaults, cemented by the new
SpillPolicy::apply_cli_overrides method which is invoked after the
env-var loader. Flags are wired through ParsedArgs ->
ConfigInputs -> ClientConfigBuilder -> ClientConfig with
matching accessors and round-trip tests.

Closes #2345.
oferchen added a commit that referenced this pull request May 18, 2026
… (#4423)

Adds two opt-in CLI overrides for the reorder-buffer SpillPolicy under
the "Advanced (spill)" help heading:

- --spill-dir <PATH> overrides OC_RSYNC_SPILL_DIR and
  SpillPolicy::dir.
- --spill-threshold-bytes <BYTES> overrides
  OC_RSYNC_SPILL_THRESHOLD_BYTES and SpillPolicy::threshold_bytes.
  Accepts a positive integer with an optional K/M/G/T/P/E suffix
  (base 1024); 0 is rejected.

Precedence is CLI > env > defaults, cemented by the new
SpillPolicy::apply_cli_overrides method which is invoked after the
env-var loader. Flags are wired through ParsedArgs ->
ConfigInputs -> ClientConfigBuilder -> ClientConfig with
matching accessors and round-trip tests.

Closes #2345.
@oferchen
oferchen deleted the feature/stn-11-cli-flags branch May 19, 2026 15:10
oferchen added a commit that referenced this pull request Aug 24, 2026
… (#4423)

Adds two opt-in CLI overrides for the reorder-buffer SpillPolicy under
the "Advanced (spill)" help heading:

- --spill-dir <PATH> overrides OC_RSYNC_SPILL_DIR and
  SpillPolicy::dir.
- --spill-threshold-bytes <BYTES> overrides
  OC_RSYNC_SPILL_THRESHOLD_BYTES and SpillPolicy::threshold_bytes.
  Accepts a positive integer with an optional K/M/G/T/P/E suffix
  (base 1024); 0 is rejected.

Precedence is CLI > env > defaults, cemented by the new
SpillPolicy::apply_cli_overrides method which is invoked after the
env-var loader. Flags are wired through ParsedArgs ->
ConfigInputs -> ClientConfigBuilder -> ClientConfig with
matching accessors and round-trip tests.

Closes #2345.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant