Skip to content

fix(cli): only set default_stream_config when stream config args provided#164

Merged
infiniteregrets merged 6 commits intomainfrom
m/fix-127
Feb 5, 2026
Merged

fix(cli): only set default_stream_config when stream config args provided#164
infiniteregrets merged 6 commits intomainfrom
m/fix-127

Conversation

@infiniteregrets
Copy link
Copy Markdown
Member

@infiniteregrets infiniteregrets commented Feb 5, 2026

closes #127

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 5, 2026

Greptile Overview

Greptile Summary

This PR changes the CLI basin reconfiguration flow so default_stream_config is only sent when the user actually provides at least one stream-config option (storage class / retention policy / timestamping / delete-on-empty). This prevents unintentionally overwriting the basin’s default stream config when the user is only toggling other basin settings.

The change is localized to cli/src/ops.rs in reconfigure_basin, where the CLI builds an s2_sdk::types::BasinReconfiguration and then calls S2::reconfigure_basin with the assembled input.

Confidence Score: 4/5

  • This PR is likely safe to merge with low behavioral risk.
  • The change is small and localized, and it aligns behavior with user intent by avoiding unintended default stream config updates. Main remaining concern is maintainability: the guard condition can become incorrect if default_stream_config gains new fields, causing silent no-ops.
  • cli/src/ops.rs

Important Files Changed

Filename Overview
cli/src/ops.rs Updates basin reconfiguration to only include default_stream_config when at least one stream-config field is explicitly set.

Sequence Diagram

sequenceDiagram
    participant CLI as cli (reconfigure_basin)
    participant SDK as s2_sdk::types::BasinReconfiguration
    participant S2 as s2_sdk::S2

    CLI->>SDK: BasinReconfiguration::new()
    alt any default_stream_config field set
        CLI->>SDK: with_default_stream_config(args.default_stream_config.into())
    end
    opt create_stream_on_append provided
        CLI->>SDK: with_create_stream_on_append(val)
    end
    opt create_stream_on_read provided
        CLI->>SDK: with_create_stream_on_read(val)
    end
    CLI->>S2: reconfigure_basin(ReconfigureBasinInput::new(basin, reconfig))
    S2-->>CLI: BasinConfig
    CLI-->>CLI: convert into cli::types::BasinConfig

Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@infiniteregrets infiniteregrets merged commit 3532ae2 into main Feb 5, 2026
6 checks passed
@infiniteregrets infiniteregrets deleted the m/fix-127 branch February 5, 2026 15:51
@github-actions github-actions bot mentioned this pull request Feb 5, 2026
quettabit pushed a commit that referenced this pull request Feb 5, 2026
## 🤖 New release

* `s2-lite`: 0.27.3 -> 0.27.4 (✓ API compatible changes)
* `s2-cli`: 0.27.3 -> 0.27.4

<details><summary><i><b>Changelog</b></i></summary><p>

## `s2-lite`

<blockquote>

## [0.27.4] - 2026-02-05

### Miscellaneous Tasks

- Install aws-lc-rs as default crypto provider for rustls
([#171](#171))

<!-- generated by git-cliff -->
</blockquote>

## `s2-cli`

<blockquote>

## [0.27.4] - 2026-02-05

### Bug Fixes

- Only set default_stream_config when stream config args provided
([#164](#164))

### Miscellaneous Tasks

- Install aws-lc-rs as default crypto provider for rustls
([#171](#171))

<!-- generated by git-cliff -->
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

[Detail Bug] reconfigure-basin clears default stream config when only toggling create_stream_on_* flags

1 participant