Skip to content

Rename storage.s3.profiles to buckets, share S3StorageConfig for bucket entries - #6

Merged
papaharry merged 4 commits into
defensedotcom:mainfrom
quickwit-oss:david-yaffe/6523-s3-buckets
Oct 6, 2026
Merged

papaharry merged 4 commits into
defensedotcom:mainfrom
quickwit-oss:david-yaffe/6523-s3-buckets

Conversation

@dayaffe

@dayaffe dayaffe commented Oct 6, 2026 •

Copy link
Copy Markdown

Follow-up to quickwit-oss#6523. Merging this into your main updates that PR.

  • Rename profiles → buckets (storage.s3.buckets.<bucket-name>): "profiles" is easy to confuse with AWS credential profiles, and the keys are bucket names, as in Hadoop's per-bucket S3A config.
  • Bucket entries reuse S3StorageConfig instead of a separate S3ProfileConfig, so parsing, flavors, redaction, and unknown-field rejection are shared and can't drift. Nested buckets are rejected at validation.
  • Resolver: one backend (config + lazily built client) per bucket, created up front; resolve() has a single code path and no mutex.
  • Validation: bucket keys that can never match (empty, or containing / like s3://my-bucket) fail at startup instead of silently falling back to the primary backend.
  • Tests: routing (exact match, no prefix matching, fallback), env-override bypass, key and nesting validation.
  • Docs: updated for the rename; documented QW_S3_FORCE_PATH_STYLE_ACCESS, that env overrides apply to the primary backend only, and that every node must declare the same buckets entries.

⚠️ Breaking for existing configs: rename profiles: to buckets: before deploying, otherwise Quickwit fails to start with unknown field profiles.

After merging this, quickwit-oss#6523 will have a one-line conflict with upstream main in docs/configuration/storage-config.md (the QW_S3_MAX_CONCURRENCY row); merging upstream main into your main again resolves it.

"Profiles" collides with AWS credential profiles; the map keys are
bucket names, which also matches Hadoop's per-bucket S3A config.

- Drop S3ProfileConfig: `buckets` is a map of S3StorageConfig, so
  serde, flavors, redaction, and Debug are shared with the primary
  backend. Nested `buckets` are rejected in StorageConfigs::validate.
- apply_flavor recurses into bucket configs at load time.
- The resolver builds one backend (config + lazy client) per bucket at
  construction, so resolve() has a single code path and needs no mutex.
- Reject `storage.s3.buckets` keys that are empty or contain `/`. Such
  keys can never match a parsed bucket name, so the bucket would
  silently fall back to the primary backend and its credentials.
- Test bucket routing in the S3 factory: exact match, dotted names,
  bucket-only URIs, no prefix matching, and fallback to the primary.
- Make the env-override test set QW_S3_ENDPOINT and
  QW_S3_FORCE_PATH_STYLE_ACCESS, and restore the test that unknown
  fields in a bucket entry are rejected.
- Skip URI parsing when no buckets are configured, and drop the
  primary backend's duplicate copy of the bucket configs.
- Docs: add the `buckets` property and the
  QW_S3_FORCE_PATH_STYLE_ACCESS env variable to the reference tables.
- Load a full node config with `storage.s3.buckets` to cover validation
  and flavor expansion on the real load path, including a quoted
  numeric bucket name and a rejected `s3://` key.
- Check that the nested-buckets error comes from the nested check.
- Docs: QW_S3_ENDPOINT and QW_S3_FORCE_PATH_STYLE_ACCESS apply to the
  primary backend only; every node must declare the same `buckets`
  entries; quote bucket names YAML would parse as non-strings.
Remove tests already covered elsewhere: the full node-config load test
(validation and flavor expansion are unit tested), the dotted-name and
no-buckets factory tests (covered by the routing test), and the
bucket unknown-field test (bucket entries share S3StorageConfig's
deny_unknown_fields).
@papaharry
papaharry merged commit 927e64b into defensedotcom:main Oct 6, 2026
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.

2 participants