Conversation
Fixes jitsucom#1479. - Region was z.enum(s3Regions) (23 hardcoded values) — blocked S3-compatible stores and newer AWS regions. Changed to z.string().min(1) with default, preserving s3Regions[0] as default and keeping existing configs valid. - Added addressingStyle enum [auto, virtual-hosted, path] (default auto) to expose S3 URL addressing control for S3-compatible endpoints. Backend respects it in bulker S3 client: path/virtual-hosted explicit, auto preserves historical behavior (path-style when endpoint set). Backward compatible: defaults match previous behavior.
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.
Summary / 概述
Fixes #1479. S3 destination was limited to 23 hardcoded regions and always used path-style for custom endpoints, blocking S3-compatible stores (MinIO, Wasabi, etc.) and newer AWS regions. This PR makes region free-text and adds explicit addressing-style control.
What / 变更内容
webapps/console/lib/schema/destinations.tsx:region: z.enum(s3Regions)→z.string().min(1).default("us-west-1")(keepss3Regions[0]as default); addeds3AddressingStyles = ["auto","virtual-hosted","path"]andaddressingStyle: z.enum(...).optional().default("auto")bulker/bulkerlib/implementations/s3.go: addedAddressingStyletoS3Config;NewS3now respectspath/virtual-hosted/auto(auto preserves historicalendpoint != "" => UsePathStyle=true)Why / 动机
Issue reports custom regions are impossible via dropdown and S3-compatible clouds need path vs virtual-hosted choice. Current enum blocks legitimate configs.
Test Plan / 测试计划
pnpm codegen && pnpm typecheck— passgo vet ./implementations— passeu-west-10,custom-region-1,my-minio-region; rejects empty; defaultsregion=us-west-1,addressingStyle=auto; rejects invalidaddressingStylevitest --project unit129/130 pass (1 timeout inmodels-editor.test.tspre-existing)Backward Compatibility / 向后兼容
Defaults match previous behavior: existing configs without
addressingStylegetauto(path-style when endpoint set, virtual-hosted otherwise); existing 23 regions remain valid as free text.Related Issue
Fixes #1479
Checklist
pnpm codegen && pnpm typecheckpassgo vetpassAI-Assisted Disclosure
Per CONTRIBUTING guidelines: I have read every line; tested locally with
pnpm codegen/typecheckandgo vet; single-topic PR; AI tools used: Muse Spark for drafting. Final review and decisions are mine.