[#197] Settings → Trim whitespace around connection values - #199
Merged
revett merged 2 commits intoAug 10, 2026
Merged
Conversation
- Add bucketFor to trim the bucket a connection actually uses, so an accidental leading space no longer turns a valid bucket into a 400. - Trim accountId, region, endpoint, and accessKeyId at the point of use, matching how endpointFor/regionFor/normalizePrefix already canonicalize. - Normalize the same fields in fingerprintSettings so a whitespace edit does not read as a target change. - Resolves 8thpark#197.
Contributor
|
@greptileai Review PR |
Contributor
|
@greptileai Review PR |
revett
approved these changes
Aug 10, 2026
Contributor
|
@newchannelid432-code Thanks for another PR! 🍪 I finished it off, as it is needed for the 0.1.0 release. Please keep contributing and sharing the project |
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.
Fixes #197
An accidental leading space in the bucket field produced a generic
Storage rejected the request (400)error. Rather than blaming the user, canonicalize the connection fields the same wayendpointFor/[normalizePrefix] already do: store exactly as typed, trim at the point of use.bucketForand uses it everywhere a connection builds its URL (createS3Client,testConnection,fingerprintSettings).accountId,region,endpoint, andaccessKeyIdat the point of use too, so a stray space in any connection field fails loudly or works, never with a baffling provider error.hasConnectionConfig/missingFieldFortreat whitespace-only values as missing.Verified locally: 374/374 tests pass,
biome checkclean,npm run buildpasses.Greptile Summary
The PR canonicalizes connection fields at the point of use while preserving exactly what users entered in persisted settings.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile