fix: normalize storage provider variant name S3 to s3 for consistency#414
Open
yonzilch wants to merge 3 commits intomatrix-construct:mainfrom
Open
fix: normalize storage provider variant name S3 to s3 for consistency#414yonzilch wants to merge 3 commits intomatrix-construct:mainfrom
yonzilch wants to merge 3 commits intomatrix-construct:mainfrom
Conversation
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.
Member
|
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 :) |
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.
The storage provider configuration currently uses inconsistent casing for variant names:
[global.storage_provider.<ID>.local]— lowercase[global.storage_provider.<ID>.S3]— uppercaseThis inconsistency is confusing and also causes practical issues when configuring via environment variables, since Tuwunel lowercases env var keys during parsing, making the
S3variant unreachable through environment variables (users getexpected one of local, S3, None).In log it shows like:
Error: There was a problem with your configuration file: unknown variant: found
s3, expectedone oflocal,S3,None`` for key "STORAGE_PROVIDER.MEDIA_S3.S3" inTUWUNEL_environment variable(s)Proposed change: Rename the
S3variant tos3to match the convention established bylocal.This would also fix environment variable configuration via
TUWUNEL_STORAGE_PROVIDER__<ID>__S3__*which currently fails due to the case mismatch.