Skip to content

fix: honor alias region configuration - #44

Open
mrjavadseydi wants to merge 1 commit into
pgsty:mainfrom
mrjavadseydi:fix/5268-alias-region
Open

mrjavadseydi wants to merge 1 commit into
pgsty:mainfrom
mrjavadseydi:fix/5268-alias-region

Conversation

@mrjavadseydi

Copy link
Copy Markdown

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=1
  • go test -race ./cmd -run Test(S3ClientRegionPrecedence|S3ClientCacheKeepsRegionIdentity|GetConfigHashIncludesRegion) -count=1
  • make install

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • All commits are signed off (git commit -s) per the DCO
  • Fixes a regression (not a regression)
  • Unit tests added/updated
  • Internal documentation updated (not needed)
  • Public documentation update opened in pgsty/silo.pgsty.com (not needed)

Signed-off-by: mr javad seydi <seydi.birjand@gmail.com>
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.

1 participant