fix(storage): address review findings for named S3 backends#2
Merged
Conversation
Six issues from the Codex review of the s3+<name> named-backend feature: - uri: slice path at the real `://` separator and preserve the `s3+<name>` scheme in parent()/file_name() (was corrupting paths to `t://bucket`). - config: env overrides (QW_S3_ENDPOINT, QW_S3_FORCE_PATH_STYLE_ACCESS) now apply to the primary backend only; named backends are self-contained. Removed the process-wide OnceLock that cached the first client's path-style. - config: as_s3_config() applies flavor expansion for named backends. - config: accept the disable_multi_object_delete_requests alias on named. - config: accept and pass through disable_checksums and the stalled-stream protection toggles on named backends (were denied and hard-coded false). Adds unit tests for URI scheme preservation, field parity, flavor expansion, and named-backend endpoint isolation. Updates storage-config docs.
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.
Addresses the six Codex review findings on the
s3+<name>named-backend feature.Findings fixed
Uri::path()now slices at the real://separator;parent()/file_name()preserve thes3+<name>scheme (was corruptings3+alt://bucket/keytot://bucket/key).OnceLockforforce_path_style_access; each backend honors its own value.QW_S3_ENDPOINT/QW_S3_FORCE_PATH_STYLE_ACCESSapply to the primary backend only; named backends are self-contained (is_named_backendmarker).as_s3_config()appliesflavorexpansion to named backends.disable_multi_object_delete_requestsalias.disable_checksumsand the stalled-stream protection toggles (were denied + hard-codedfalse).Tests
uri::tests::test_uri_named_s3_schemestorage_config::tests::test_storage_s3_named_backends_field_paritystorage_config::tests::test_storage_s3_named_backend_applies_flavorstorage_config::tests::test_storage_s3_named_backend_uses_own_endpointLocal: clippy clean,
cargo +nightly fmt --checkclean, all unit tests pass.Note: none of these were triggered by the current staging config (uniform path-style, per-backend endpoints, no flavors/legacy keys) — they become load-bearing as the topology changes.