mirror of
https://github.com/s2-streamstore/s2.git
synced 2026-09-27 18:19:36 +00:00
Expose available storage classes and the configured default in location
responses. Use `CompactString` for class names throughout the SDK, API,
common types, CLI, and resource specs, allowing future names to pass
through without a client release. Docs and the locations API describe
the available choices. The CLI displays available classes and the
configured default in `list-locations`, `get-default-location`, and
`set-default-location`; responses from older servers retain the previous
output when those fields are absent.
Remove OSS storage-class enums and the shared Express fallback. Omitted
classes stay unspecified until the server resolves them: cloud uses the
location default for basins and basin defaults for streams. CLI
apply/diff preserves unknown names. Dry-run reads the location default
once when needed and compares streams using the desired basin defaults.
If discovery is unavailable, it marks storage-class resolution as
uncertain instead of reporting a false change or no-op. Actual apply
leaves omitted classes for the server to resolve. Lite retains Express
as its own fallback when both the stream and basin omit a class,
including when reading older metadata. Explicit class names and basin
inheritance are preserved.
BREAKING CHANGE: remove `StorageClass` from `s2_sdk::types`,
`s2_api::v1::config`, `s2_common::config`, and `s2_resource_spec`.
Replace `.with_storage_class(StorageClass::Express)` with
`.with_storage_class("express")`, and enum matches with string
comparisons. Fields use `CompactString` with their existing
optional/patch wrappers; `s2_common::config::StreamConfig.storage_class`
is now `Option<CompactString>`. Omitted/null patch semantics are
preserved.
Validation: formatting, workspace Clippy with all features/targets, and
903 existing workspace tests passed. All 146 applicable integration
tests from unchanged Python SDK main passed against the local Lite
build. Temporary API checks verified the Express fallback, basin
inheritance, unknown class names, and null resets. Temporary CLI checks
verified all three location commands with future class names and
populated, empty, missing, and null discovery fields. Temporary dry-run
checks covered unchanged and changed defaults, future names, desired
basin inheritance, explicit overrides, unavailable discovery, error
propagation, and one lookup across multiple basins. A local Lite
create/preview/reapply check confirmed an uncertain preview and an
unchanged reapply. The generated CLI schema still matches. Existing Rust
tests were adapted; no new tests were added.
Related: [cloud](https://github.com/s2-streamstore/s2-cloud/pull/1836),
[specs](https://github.com/s2-streamstore/s2-specs/pull/24). Deploy [the
docs redirect](https://github.com/s2-streamstore/docs/pull/361) before
publishing the `/docs/storage-classes` links.
|
History
|
|
|---|---|---|
| .. | ||
| src | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
s2-sim
Deterministic simulation plumbing for s2-lite.
Basic smoke test:
just sim smoke --seed 12345
Meta-test, which compares the output of two runs of a selected sim and compares logging output. Helpful for determining if determinism has been broken.
# RUST_LOG determines the logging level of the `smoke` test; trace is most likely to uncover determinism regressions
RUST_LOG=trace just sim meta smoke --seed 12345
Collect logs for linearizability testing using s2-verification:
just sim linearizable --seed 12345
# with `s2-porcupine` from <https://github.com/s2-streamstore/s2-verification> installed:
s2-porcupine -file history.12345.jsonl