fix: honor alias region configuration - #44
Open
mrjavadseydi wants to merge 1 commit into
Open
mrjavadseydi wants to merge 1 commit into
mrjavadseydi wants to merge 1 commit into
Conversation
Signed-off-by: mr javad seydi <seydi.birjand@gmail.com>
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.
Contribution Licensing (no CLA, inbound=outbound, DCO required)
This pull request contributes to PGSTY SILO mcli (pgsty/mc). Code contributions are accepted under AGPL-3.0-or-later, the same license as the client. This project does not use a CLA or require a separate Apache-2.0 license grant. By submitting this pull request I represent that I have the right to contribute these changes under the GNU AGPL v3.0 or later. Every commit carries the required DCO Signed-off-by trailer.
Description
Honor the optional region field in version 10 alias configurations. Propagate the configured value to the S3 client while preserving MC_REGION and AWS_REGION precedence, and include the resolved region in the client cache identity.
Motivation and Context
S3-compatible services that do not implement GetBucketLocation can return an error even when the alias already specifies its region. Passing that region to minio-go avoids the unsupported lookup and signs requests with the configured region.
Addresses minio#5268.
How to test this PR?
go test ./... -count=1go test -race ./cmd -run Test(S3ClientRegionPrecedence|S3ClientCacheKeepsRegionIdentity|GetConfigHashIncludesRegion) -count=1make installTypes of changes
Checklist:
git commit -s) per the DCO