Skip to content

fix: normalize storage provider variant name S3 to s3 for consistency#414

Open
yonzilch wants to merge 3 commits intomatrix-construct:mainfrom
yonzilch:main
Open

fix: normalize storage provider variant name S3 to s3 for consistency#414
yonzilch wants to merge 3 commits intomatrix-construct:mainfrom
yonzilch:main

Conversation

@yonzilch
Copy link
Copy Markdown

The storage provider configuration currently uses inconsistent casing for variant names:

  • [global.storage_provider.<ID>.local] — lowercase
  • [global.storage_provider.<ID>.S3] — uppercase

This inconsistency is confusing and also causes practical issues when configuring via environment variables, since Tuwunel lowercases env var keys during parsing, making the S3 variant unreachable through environment variables (users get expected one of local, S3, None).

In log it shows like:
Error: There was a problem with your configuration file: unknown variant: found s3, expected one of local, S3, None`` for key "STORAGE_PROVIDER.MEDIA_S3.S3" in TUWUNEL_ environment variable(s)

Proposed change: Rename the S3 variant to s3 to match the convention established by local.

This would also fix environment variable configuration via TUWUNEL_STORAGE_PROVIDER__<ID>__S3__* which currently fails due to the case mismatch.

The `config_example_generator` macro on `StorageProviderS3` still
referenced the old uppercase section name `global.storage_provider.<ID>.S3`,
causing the auto-generated `tuwunel-example.toml` to retain the uppercase
variant and conflict with the lowercased enum rename.

Update the section to `global.storage_provider.<ID>.s3` to match the
renamed enum variant and ensure consistent generation.
@jevolk
Copy link
Copy Markdown
Member

jevolk commented Apr 15, 2026

I apologize for the CI and I will try to re-run this past any flakes. This should be a bit easier once we get this merged and you're made official :)

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