This is an automated email from the ASF dual-hosted git repository.

zeroshade pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-go.git


The following commit(s) were added to refs/heads/main by this push:
     new a00f48ded refactor!: move AWS config context helpers from utils to 
awsconfig (#2638)
a00f48ded is described below

commit a00f48dedefd331af8849e70f1e7a3fd2bcf3c6d
Author: Andrei Tserakhau <[email protected]>
AuthorDate: Mon Nov 23 19:04:41 2026 +0100

    refactor!: move AWS config context helpers from utils to awsconfig (#2638)
    
    * refactor!: move AWS config context helpers from utils to awsconfig
    
    The public utils package held only WithAWSConfig and GetAWSConfig, which
    attach an *aws.Config to a context and read it back. Move them to a new
    root package, awsconfig, with the same names, behavior and unexported
    context key, and delete utils.
    
    Update the importers in catalog/glue, catalog/dynamodb, io/gocloud/s3
    and encryption/awskms and their tests, and the comment in
    catalog/rest/vended_creds.go that names the helper. Files that also use
    internal/awsconfig already import it as internalaws, so there is no
    name clash.
    
    Callers migrate by changing the import path from
    github.com/apache/iceberg-go/utils to github.com/apache/iceberg-go/awsconfig
    and the qualifier from utils to awsconfig. A compatibility note is added
    to releases.md.
    
    Signed-off-by: laskoviymishka <[email protected]>
    
    * refactor!: rename awsconfig context helpers to NewContext and FromContext
    
    awsconfig.WithAWSConfig and awsconfig.GetAWSConfig stuttered and clashed 
with
    the catalog WithAWSConfig options. Fold the utils release note into one 
entry.
    
    Signed-off-by: laskoviymishka <[email protected]>
    
    ---------
    
    Signed-off-by: laskoviymishka <[email protected]>
---
 {utils => awsconfig}/context.go               | 10 +++++-----
 catalog/dynamodb/dynamodb.go                  |  6 +++---
 catalog/dynamodb/dynamodb_integration_test.go |  4 ++--
 catalog/dynamodb/tables.go                    |  8 ++++----
 catalog/glue/glue.go                          | 12 ++++++------
 catalog/glue/glue_test.go                     |  4 ++--
 catalog/rest/vended_creds.go                  |  2 +-
 encryption/awskms/kms.go                      |  4 ++--
 encryption/awskms/kms_test.go                 |  6 +++---
 io/gocloud/s3/remote_signing_test.go          |  6 +++---
 io/gocloud/s3/s3.go                           |  4 ++--
 io/gocloud/s3/s3_test.go                      |  8 ++++----
 website/src/releases.md                       |  3 ++-
 13 files changed, 39 insertions(+), 38 deletions(-)

diff --git a/utils/context.go b/awsconfig/context.go
similarity index 79%
rename from utils/context.go
rename to awsconfig/context.go
index 407a3df94..86f1c86cc 100644
--- a/utils/context.go
+++ b/awsconfig/context.go
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-package utils
+package awsconfig
 
 import (
        "context"
@@ -25,14 +25,14 @@ import (
 
 type awsctxkey struct{}
 
-// WithAWSConfig returns a new context with the given AWS config
-func WithAWSConfig(ctx context.Context, cfg *aws.Config) context.Context {
+// NewContext returns a new context with the given AWS config
+func NewContext(ctx context.Context, cfg *aws.Config) context.Context {
        return context.WithValue(ctx, awsctxkey{}, cfg)
 }
 
-// GetAWSConfig returns the AWS config from the given context. Returns
+// FromContext returns the AWS config from the given context. Returns
 // nil if no config is set.
-func GetAWSConfig(ctx context.Context) *aws.Config {
+func FromContext(ctx context.Context) *aws.Config {
        if v := ctx.Value(awsctxkey{}); v != nil {
                return v.(*aws.Config)
        }
diff --git a/catalog/dynamodb/dynamodb.go b/catalog/dynamodb/dynamodb.go
index 3988e37e8..530b247fb 100644
--- a/catalog/dynamodb/dynamodb.go
+++ b/catalog/dynamodb/dynamodb.go
@@ -29,11 +29,11 @@ import (
        "time"
 
        "github.com/apache/iceberg-go"
+       "github.com/apache/iceberg-go/awsconfig"
        "github.com/apache/iceberg-go/catalog"
        icebergio "github.com/apache/iceberg-go/io"
        "github.com/apache/iceberg-go/metrics"
        "github.com/apache/iceberg-go/table"
-       "github.com/apache/iceberg-go/utils"
        "github.com/aws/aws-sdk-go-v2/aws"
        "github.com/aws/aws-sdk-go-v2/config"
        "github.com/aws/aws-sdk-go-v2/service/dynamodb"
@@ -76,7 +76,7 @@ var (
 func init() {
        catalog.MustRegister("dynamodb", catalog.RegistrarFunc(func(ctx 
context.Context, name string, props iceberg.Properties) (catalog.Catalog, 
error) {
                var cfg aws.Config
-               if supplied := utils.GetAWSConfig(ctx); supplied != nil {
+               if supplied := awsconfig.FromContext(ctx); supplied != nil {
                        cfg = supplied.Copy()
                } else {
                        var err error
@@ -263,7 +263,7 @@ func properties(entry item) iceberg.Properties {
 
 func (c *Catalog) fileSystem(props iceberg.Properties, location string) 
table.FSysF {
        return func(ctx context.Context) (icebergio.IO, error) {
-               return icebergio.LoadFS(utils.WithAWSConfig(ctx, &c.awsConfig), 
props, location)
+               return icebergio.LoadFS(awsconfig.NewContext(ctx, 
&c.awsConfig), props, location)
        }
 }
 
diff --git a/catalog/dynamodb/dynamodb_integration_test.go 
b/catalog/dynamodb/dynamodb_integration_test.go
index 7e84148de..b9d9e765d 100644
--- a/catalog/dynamodb/dynamodb_integration_test.go
+++ b/catalog/dynamodb/dynamodb_integration_test.go
@@ -37,10 +37,10 @@ import (
        "time"
 
        "github.com/apache/iceberg-go"
+       "github.com/apache/iceberg-go/awsconfig"
        "github.com/apache/iceberg-go/catalog"
        "github.com/apache/iceberg-go/catalog/catalogtest"
        "github.com/apache/iceberg-go/table"
-       "github.com/apache/iceberg-go/utils"
        "github.com/aws/aws-sdk-go-v2/aws"
        "github.com/aws/aws-sdk-go-v2/credentials"
        sdk "github.com/aws/aws-sdk-go-v2/service/dynamodb"
@@ -534,7 +534,7 @@ func TestDynamoDBRegistry(t *testing.T) {
        c := localCatalog(t)
        props := maps.Clone(c.props)
        props["type"] = "dynamodb"
-       loaded, err := catalog.Load(utils.WithAWSConfig(t.Context(), 
&c.awsConfig), "registry", props)
+       loaded, err := catalog.Load(awsconfig.NewContext(t.Context(), 
&c.awsConfig), "registry", props)
        require.NoError(t, err)
        require.Equal(t, "registry", loaded.Name())
        require.Equal(t, catalog.DynamoDB, loaded.CatalogType())
diff --git a/catalog/dynamodb/tables.go b/catalog/dynamodb/tables.go
index 7b4f93871..12408622a 100644
--- a/catalog/dynamodb/tables.go
+++ b/catalog/dynamodb/tables.go
@@ -29,11 +29,11 @@ import (
        "time"
 
        "github.com/apache/iceberg-go"
+       "github.com/apache/iceberg-go/awsconfig"
        "github.com/apache/iceberg-go/catalog"
        "github.com/apache/iceberg-go/catalog/internal"
        "github.com/apache/iceberg-go/table"
        "github.com/apache/iceberg-go/table/maintenance"
-       "github.com/apache/iceberg-go/utils"
        "github.com/aws/aws-sdk-go-v2/aws"
        "github.com/aws/aws-sdk-go-v2/service/dynamodb"
        "github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
@@ -109,7 +109,7 @@ func (c *Catalog) CreateTable(ctx context.Context, ident 
table.Identifier, schem
        if err != nil {
                return nil, err
        }
-       if err := internal.WriteMetadata(utils.WithAWSConfig(ctx, 
&c.awsConfig), staged.Table); err != nil {
+       if err := internal.WriteMetadata(awsconfig.NewContext(ctx, 
&c.awsConfig), staged.Table); err != nil {
                return nil, err
        }
        if err := c.createTableEntry(ctx, ident, staged.MetadataLocation()); 
err != nil {
@@ -237,7 +237,7 @@ func (c *Catalog) CommitTable(ctx context.Context, ident 
table.Identifier, requi
        if current != nil && staged.Metadata().Equals(current.Metadata()) {
                return current.Metadata(), current.MetadataLocation(), nil
        }
-       if err := internal.WriteMetadata(utils.WithAWSConfig(ctx, 
&c.awsConfig), staged.Table); err != nil {
+       if err := internal.WriteMetadata(awsconfig.NewContext(ctx, 
&c.awsConfig), staged.Table); err != nil {
                return nil, "", err
        }
        if current == nil {
@@ -294,7 +294,7 @@ func (c *Catalog) commitSucceeded(ctx context.Context, 
ident table.Identifier, l
 }
 
 func (c *Catalog) removeUncommittedMetadata(ctx context.Context, location 
string, loadFS table.FSysF) error {
-       cleanupCtx, cancel := 
context.WithTimeout(utils.WithAWSConfig(context.WithoutCancel(ctx), 
&c.awsConfig), 5*time.Second)
+       cleanupCtx, cancel := 
context.WithTimeout(awsconfig.NewContext(context.WithoutCancel(ctx), 
&c.awsConfig), 5*time.Second)
        defer cancel()
        fs, err := loadFS(cleanupCtx)
        if err != nil {
diff --git a/catalog/glue/glue.go b/catalog/glue/glue.go
index be9129c60..a8f68a509 100644
--- a/catalog/glue/glue.go
+++ b/catalog/glue/glue.go
@@ -29,6 +29,7 @@ import (
        "time"
 
        "github.com/apache/iceberg-go"
+       "github.com/apache/iceberg-go/awsconfig"
        "github.com/apache/iceberg-go/catalog"
        "github.com/apache/iceberg-go/catalog/internal"
        internalaws "github.com/apache/iceberg-go/internal/awsconfig"
@@ -36,7 +37,6 @@ import (
        "github.com/apache/iceberg-go/metrics"
        "github.com/apache/iceberg-go/table"
        "github.com/apache/iceberg-go/table/maintenance"
-       "github.com/apache/iceberg-go/utils"
        "github.com/aws/aws-sdk-go-v2/aws"
        "github.com/aws/aws-sdk-go-v2/config"
        "github.com/aws/aws-sdk-go-v2/credentials"
@@ -332,7 +332,7 @@ func (c *Catalog) CreateTable(ctx context.Context, 
identifier table.Identifier,
        }
 
        // Use the catalog's AWS config, not the ambient chain, for the 
metadata write.
-       ctx = utils.WithAWSConfig(ctx, c.awsCfg)
+       ctx = awsconfig.NewContext(ctx, c.awsCfg)
        if err := internal.WriteMetadata(ctx, staged.Table); err != nil {
                return nil, err
        }
@@ -449,7 +449,7 @@ func (c *Catalog) createS3TablesTable(ctx context.Context, 
database, tableName s
 // the Glue entry; the caller reloads, so a read failure never triggers 
rollback.
 func (c *Catalog) commitS3TablesTable(ctx context.Context, database, tableName 
string, identifier table.Identifier, schema *iceberg.Schema, opts 
...catalog.CreateTableOpt) error {
        // Use the catalog's AWS config for WriteMetadata and the staged.FS 
cleanup below.
-       ctx = utils.WithAWSConfig(ctx, c.awsCfg)
+       ctx = awsconfig.NewContext(ctx, c.awsCfg)
 
        allocated, err := c.glueSvc.GetTable(ctx, &glue.GetTableInput{
                CatalogId:    c.catalogId,
@@ -517,7 +517,7 @@ func (c *Catalog) RegisterTable(ctx context.Context, 
identifier table.Identifier
        }
 
        // Load the metadata file to get table properties
-       ctx = utils.WithAWSConfig(ctx, c.awsCfg)
+       ctx = awsconfig.NewContext(ctx, c.awsCfg)
        // Read the metadata file. The reporter is intentionally not wired 
here: the
        // tail c.LoadTable(...) re-resolves it through convertGlueToIceberg, 
and the
        // table built below is discarded after constructTableInput.
@@ -578,7 +578,7 @@ func (c *Catalog) CommitTable(ctx context.Context, 
identifier table.Identifier,
                return current.Metadata(), current.MetadataLocation(), nil
        }
        // Use the catalog's AWS config, not the ambient chain, for the 
metadata write.
-       ctx = utils.WithAWSConfig(ctx, c.awsCfg)
+       ctx = awsconfig.NewContext(ctx, c.awsCfg)
        if err := internal.WriteMetadata(ctx, staged.Table); err != nil {
                return nil, "", err
        }
@@ -1124,7 +1124,7 @@ func (c *Catalog) convertGlueToIceberg(ctx 
context.Context, glueTable *types.Tab
        }
 
        icebergTable, err := table.NewFromLocation(
-               utils.WithAWSConfig(ctx, c.awsCfg),
+               awsconfig.NewContext(ctx, c.awsCfg),
                TableIdentifier(database, tableName),
                metadataLocation,
                internal.LoadFSFuncWithRegistry(c.ioRegistry, c.props, 
metadataLocation),
diff --git a/catalog/glue/glue_test.go b/catalog/glue/glue_test.go
index 1d7859cfc..fa028083e 100644
--- a/catalog/glue/glue_test.go
+++ b/catalog/glue/glue_test.go
@@ -33,12 +33,12 @@ import (
        "time"
 
        "github.com/apache/iceberg-go"
+       "github.com/apache/iceberg-go/awsconfig"
        "github.com/apache/iceberg-go/catalog"
        cataloginternal "github.com/apache/iceberg-go/catalog/internal"
        iceio "github.com/apache/iceberg-go/io"
        _ "github.com/apache/iceberg-go/io/gocloud"
        "github.com/apache/iceberg-go/table"
-       "github.com/apache/iceberg-go/utils"
        "github.com/aws/aws-sdk-go-v2/aws"
        "github.com/aws/aws-sdk-go-v2/config"
        "github.com/aws/aws-sdk-go-v2/service/glue"
@@ -3248,7 +3248,7 @@ func recordingMemFS(t *testing.T, scheme string) 
(*iceio.MemFS, *[]*aws.Config)
        recorded := new([]*aws.Config)
        iceio.Unregister(scheme)
        iceio.Register(scheme, func(ctx context.Context, _ *url.URL, _ 
map[string]string) (iceio.IO, error) {
-               *recorded = append(*recorded, utils.GetAWSConfig(ctx))
+               *recorded = append(*recorded, awsconfig.FromContext(ctx))
 
                return memFS, nil
        })
diff --git a/catalog/rest/vended_creds.go b/catalog/rest/vended_creds.go
index f589c2fce..6f7444450 100644
--- a/catalog/rest/vended_creds.go
+++ b/catalog/rest/vended_creds.go
@@ -199,7 +199,7 @@ func (v *vendedCredentialRefresher) loadFS(ctx 
context.Context) (iceio.IO, error
        // lifetime instead, through ioCancel. fetchCreds above still honours 
ctx.
        //
        // WithoutCancel keeps ctx's values, and the IO depends on them: the S3
-       // factory takes its base AWS config from utils.GetAWSConfig(ctx), so do
+       // factory takes its base AWS config from awsconfig.FromContext(ctx), 
so do
        // not replace this with context.Background(). The flip side is that the
        // first caller's request-scoped values stay attached to the shared IO.
        ioCtx, ioCancel := context.WithCancel(context.WithoutCancel(ctx))
diff --git a/encryption/awskms/kms.go b/encryption/awskms/kms.go
index 27da516ff..93327352b 100644
--- a/encryption/awskms/kms.go
+++ b/encryption/awskms/kms.go
@@ -27,8 +27,8 @@ import (
        "fmt"
        "slices"
 
+       "github.com/apache/iceberg-go/awsconfig"
        "github.com/apache/iceberg-go/encryption"
-       "github.com/apache/iceberg-go/utils"
        "github.com/aws/aws-sdk-go-v2/aws"
        "github.com/aws/aws-sdk-go-v2/config"
        "github.com/aws/aws-sdk-go-v2/service/kms"
@@ -59,7 +59,7 @@ func NewClient(cfg aws.Config, optFns ...func(*kms.Options)) 
*Client {
 func init() {
        encryption.MustRegisterKMS("aws", func(ctx context.Context, props 
map[string]string) (encryption.KeyManagementClient, error) {
                var cfg aws.Config
-               if supplied := utils.GetAWSConfig(ctx); supplied != nil {
+               if supplied := awsconfig.FromContext(ctx); supplied != nil {
                        cfg = supplied.Copy()
                } else {
                        var err error
diff --git a/encryption/awskms/kms_test.go b/encryption/awskms/kms_test.go
index cbddbefb6..ce0f67b83 100644
--- a/encryption/awskms/kms_test.go
+++ b/encryption/awskms/kms_test.go
@@ -25,8 +25,8 @@ import (
        "strings"
        "testing"
 
+       "github.com/apache/iceberg-go/awsconfig"
        "github.com/apache/iceberg-go/encryption"
-       "github.com/apache/iceberg-go/utils"
        "github.com/aws/aws-sdk-go-v2/aws"
        "github.com/aws/aws-sdk-go-v2/credentials"
        "github.com/aws/aws-sdk-go-v2/service/kms"
@@ -185,7 +185,7 @@ func TestClientCancellation(t *testing.T) {
 
 func TestRegistryUsesContextConfig(t *testing.T) {
        supplied := aws.Config{Region: "us-west-2", Credentials: 
credentials.NewStaticCredentialsProvider("test", "test", "")}
-       loaded, err := 
encryption.LoadKeyManagementClient(utils.WithAWSConfig(t.Context(), &supplied), 
map[string]string{
+       loaded, err := 
encryption.LoadKeyManagementClient(awsconfig.NewContext(t.Context(), 
&supplied), map[string]string{
                encryption.KMSTypeKey: "aws", "client.region": "eu-west-1",
        })
        require.NoError(t, err)
@@ -227,7 +227,7 @@ func TestRegistryUsesKMSEndpoint(t *testing.T) {
                Credentials:      
credentials.NewStaticCredentialsProvider("test", "test", ""),
                RetryMaxAttempts: 1,
        }
-       loaded, err := 
encryption.LoadKeyManagementClient(utils.WithAWSConfig(t.Context(), &supplied), 
map[string]string{
+       loaded, err := 
encryption.LoadKeyManagementClient(awsconfig.NewContext(t.Context(), 
&supplied), map[string]string{
                encryption.KMSTypeKey: "aws",
                "client.region":       "eu-west-1",
                "kms.endpoint":        server.URL,
diff --git a/io/gocloud/s3/remote_signing_test.go 
b/io/gocloud/s3/remote_signing_test.go
index 2cc6e6bf3..a169c4a3b 100644
--- a/io/gocloud/s3/remote_signing_test.go
+++ b/io/gocloud/s3/remote_signing_test.go
@@ -33,9 +33,9 @@ import (
        "testing"
        "time"
 
+       "github.com/apache/iceberg-go/awsconfig"
        "github.com/apache/iceberg-go/internal/remotesigning"
        "github.com/apache/iceberg-go/io"
-       "github.com/apache/iceberg-go/utils"
        "github.com/aws/aws-sdk-go-v2/aws"
        "github.com/aws/aws-sdk-go-v2/aws/retry"
        awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
@@ -114,7 +114,7 @@ func TestRemoteSigningFileIO(t *testing.T) {
 
                return aws.Credentials{}, errors.New("unexpected credentials")
        })}
-       ctx := utils.WithAWSConfig(t.Context(), shared)
+       ctx := awsconfig.NewContext(t.Context(), shared)
        props := map[string]string{io.S3EndpointURL: storage.URL, 
io.S3RemoteSigningEnabled: "true", remotesigning.EndpointProperty: signer.URL, 
remotesigning.ConfigProperty: settings, "token": "ignored"}
        parsed, _ := url.Parse("s3://bucket")
        bucket, err := createS3Bucket(ctx, parsed, props)
@@ -354,7 +354,7 @@ func 
TestRemoteSigningRejectsClientsWithUncontrolledRedirects(t *testing.T) {
        custom := &wrappedHTTPClient{Client: &http.Client{}}
        props := map[string]string{io.S3RemoteSigningEnabled: "true", 
remotesigning.EndpointProperty: "https://signer.example/sign"}
        shared := &aws.Config{Region: "us-east-1", HTTPClient: custom}
-       ctx := utils.WithAWSConfig(t.Context(), shared)
+       ctx := awsconfig.NewContext(t.Context(), shared)
        parsed, err := url.Parse("s3://bucket")
        require.NoError(t, err)
        _, err = createS3Bucket(ctx, parsed, props)
diff --git a/io/gocloud/s3/s3.go b/io/gocloud/s3/s3.go
index 4d2985cad..eb42ca54a 100644
--- a/io/gocloud/s3/s3.go
+++ b/io/gocloud/s3/s3.go
@@ -28,9 +28,9 @@ import (
        "strconv"
        "time"
 
+       "github.com/apache/iceberg-go/awsconfig"
        internalaws "github.com/apache/iceberg-go/internal/awsconfig"
        "github.com/apache/iceberg-go/io"
-       "github.com/apache/iceberg-go/utils"
        "github.com/aws/aws-sdk-go-v2/aws"
        awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
        "github.com/aws/aws-sdk-go-v2/config"
@@ -184,7 +184,7 @@ func resolveS3AWSConfig(ctx context.Context, props 
map[string]string) (*aws.Conf
                base *aws.Config
                err  error
        )
-       if v := utils.GetAWSConfig(ctx); v != nil {
+       if v := awsconfig.FromContext(ctx); v != nil {
                base = v
        } else if base, err = ParseAWSConfig(ctx, props); err != nil {
                return nil, err
diff --git a/io/gocloud/s3/s3_test.go b/io/gocloud/s3/s3_test.go
index 213299878..ef040d982 100644
--- a/io/gocloud/s3/s3_test.go
+++ b/io/gocloud/s3/s3_test.go
@@ -29,9 +29,9 @@ import (
        "testing"
        "time"
 
+       "github.com/apache/iceberg-go/awsconfig"
        internalaws "github.com/apache/iceberg-go/internal/awsconfig"
        "github.com/apache/iceberg-go/io"
-       "github.com/apache/iceberg-go/utils"
        "github.com/aws/aws-sdk-go-v2/aws"
        awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
        "github.com/aws/aws-sdk-go-v2/credentials"
@@ -56,7 +56,7 @@ func TestResolveS3AWSConfigCredentialPrecedence(t *testing.T) 
{
        }
 
        ctxCfg := aws.Config{Credentials: 
credentials.NewStaticCredentialsProvider("CTX", "ctxsecret", "")}
-       ctxWith := utils.WithAWSConfig(context.Background(), &ctxCfg)
+       ctxWith := awsconfig.NewContext(context.Background(), &ctxCfg)
 
        // Explicit s3.* creds win over an ambient context config, without 
mutating it.
        t.Run("explicit props override ctx config", func(t *testing.T) {
@@ -91,7 +91,7 @@ func TestResolveS3AWSConfigCredentialPrecedence(t *testing.T) 
{
        t.Run("never mutates the shared ctx config", func(t *testing.T) {
                t.Parallel()
                shared := &aws.Config{Credentials: 
credentials.NewStaticCredentialsProvider("CTX", "ctxsecret", "")}
-               cfg, err := 
resolveS3AWSConfig(utils.WithAWSConfig(context.Background(), shared), 
map[string]string{})
+               cfg, err := 
resolveS3AWSConfig(awsconfig.NewContext(context.Background(), shared), 
map[string]string{})
                require.NoError(t, err)
                require.NotSame(t, shared, cfg)
 
@@ -111,7 +111,7 @@ func TestResolveS3AWSConfigCredentialPrecedence(t 
*testing.T) {
        t.Run("explicit region overrides ctx config", func(t *testing.T) {
                t.Parallel()
                shared := &aws.Config{Region: "ctx-region", Credentials: 
credentials.NewStaticCredentialsProvider("CTX", "s", "")}
-               cfg, err := 
resolveS3AWSConfig(utils.WithAWSConfig(context.Background(), shared), 
map[string]string{io.S3Region: "props-region"})
+               cfg, err := 
resolveS3AWSConfig(awsconfig.NewContext(context.Background(), shared), 
map[string]string{io.S3Region: "props-region"})
                require.NoError(t, err)
                assert.Equal(t, "props-region", cfg.Region)
                assert.Equal(t, "ctx-region", shared.Region, "shared ctx config 
must not be mutated")
diff --git a/website/src/releases.md b/website/src/releases.md
index 5831f93a6..3c668bb41 100644
--- a/website/src/releases.md
+++ b/website/src/releases.md
@@ -109,7 +109,8 @@ Per-release notes (highlights, breaking changes, 
contributors) are published on
 - **Snapshot expiration loads full REST history on demand.** Expiration 
requests `snapshots=all` when a REST table was loaded in refs mode, including 
on commit retries. Use `Transaction.ExpireSnapshotsWithContext` to control the 
staging request. Catalogs that only supply refs-only history cannot safely 
expire snapshots.
 - **RowDelta reports a concurrent deletion vector as a commit conflict.** If a 
concurrent commit adds a deletion vector for a data file that a `RowDelta` also 
adds one for, `Transaction.Commit` now fails with an error matching 
`table.ErrConflictingDeleteFiles`, `table.ErrCommitFailed` and 
`table.ErrTransactionUnusable`, and the transaction cannot be committed again. 
Previously, the error matched none of them and the transaction stayed usable. 
To resolve the conflict, reload the table and [...]
 - **Schema JSON constructor uses the Go initialism.** Replace 
`iceberg.NewSchemaFromJsonFields` with `iceberg.NewSchemaFromJSONFields`.
-- **AWS identifiers use the Go initialism.** `glue.AwsProperties`, 
`glue.WithAwsConfig` and `glue.WithAwsProperties` become `glue.AWSProperties`, 
`glue.WithAWSConfig` and `glue.WithAWSProperties`; `sigv4.WithAwsConfig` 
becomes `sigv4.WithAWSConfig`; `utils.WithAwsConfig` and `utils.GetAwsConfig` 
become `utils.WithAWSConfig` and `utils.GetAWSConfig`; and 
`config.CatalogConfig.AwsProfile` becomes `AWSProfile`. The `aws-profile` YAML 
key is unchanged.
+- **AWS identifiers use the Go initialism.** `glue.AwsProperties`, 
`glue.WithAwsConfig` and `glue.WithAwsProperties` become `glue.AWSProperties`, 
`glue.WithAWSConfig` and `glue.WithAWSProperties`; `sigv4.WithAwsConfig` 
becomes `sigv4.WithAWSConfig`; and `config.CatalogConfig.AwsProfile` becomes 
`AWSProfile`. The `aws-profile` YAML key is unchanged.
+- **`utils` is now `awsconfig`.** `utils.WithAwsConfig` and 
`utils.GetAwsConfig` become `awsconfig.NewContext` and `awsconfig.FromContext` 
in `github.com/apache/iceberg-go/awsconfig`, with the same behavior. The 
`utils` package is removed.
 - **Remaining exported names use Go initialisms.** `table.PropertyUuid` and 
`table.PropertyCurrentSnapshotId` become `table.PropertyUUID` and 
`table.PropertyCurrentSnapshotID`; `table.ReassignedIds` becomes 
`table.ReassignedIDs`; the `table.WriteTask.Uuid` field becomes `UUID`; 
`glue.CatalogIdKey` becomes `glue.CatalogIDKey`; `io.ADLSSasTokenPrefix` 
becomes `io.ADLSSASTokenPrefix`; and `rest.Oauth2AuthManager` and 
`rest.NewOauth2AuthManager` become `rest.OAuth2AuthManager` and `rest.NewO [...]
 - **KMS factory registration now takes a context.** Change 
`encryption.KMSFactory` implementations to accept `(context.Context, 
map[string]string)` instead of only properties, and call 
`encryption.LoadKeyManagementClient(ctx, props)` instead of 
`LoadKeyManagementClient(props)`. The existing global `RegisterKMS`, 
`UnregisterKMS`, and `GetRegisteredKMSNames` functions still use the default 
registry; `RegisterKMS` still panics for invalid registrations. Use 
`encryption.MustRegisterKMS` for  [...]
 - **Name-mapping child lookup renamed.** Replace `MappedField.GetField(name)` 
with `MappedField.FindFieldByName(name)`, which returns `(*MappedField, bool)`. 
The new method returns a pointer to the actual child field rather than a copy, 
and reports a missing name with `false`.

Reply via email to