Skip to content

Commit 7bfe2ba

Browse files
committed
test: add test asserting partition is not empty
1 parent 3da10e5 commit 7bfe2ba

File tree

12 files changed

+66
-40
lines changed

12 files changed

+66
-40
lines changed

apis/v1alpha1/ack-generate-metadata.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ack_generate_info:
2-
build_date: "2025-07-22T21:50:37Z"
3-
build_hash: b2dc0f44e0b08f041de14c3944a5cc005ba97c8f
4-
go_version: go1.24.5
5-
version: v0.50.0
2+
build_date: "2025-07-29T23:15:18Z"
3+
build_hash: b3710e1809b937c18444149c91c7f1f3c47c407b
4+
go_version: go1.24.4
5+
version: v0.50.0-2-gb3710e1-dirty
66
api_directory_checksum: 2108338a86d704419192e545c0bfb433bab8c836
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.32.6

config/crd/bases/s3.services.k8s.aws_buckets.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,12 +1219,17 @@ spec:
12191219
OwnerAccountID is the AWS Account ID of the account that owns the
12201220
backend AWS service API resource.
12211221
type: string
1222+
partition:
1223+
description: Partition is the AWS partition in which the resource
1224+
exists or will exist
1225+
type: string
12221226
region:
12231227
description: Region is the AWS region in which the resource exists
12241228
or will exist.
12251229
type: string
12261230
required:
12271231
- ownerAccountID
1232+
- partition
12281233
- region
12291234
type: object
12301235
conditions:

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,5 @@ require (
9494
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
9595
sigs.k8s.io/yaml v1.4.0 // indirect
9696
)
97+
98+
replace github.com/aws-controllers-k8s/runtime => github.com/michaelhtm/ack-runtime v0.49.1-0.20250730215011-f7ca6ab251ea

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
github.com/aws-controllers-k8s/runtime v0.50.0 h1:6BXOBdnb+xw6uSMEDeALhTKc4veZR9NfXIsl5QJKZ8k=
2-
github.com/aws-controllers-k8s/runtime v0.50.0/go.mod h1:OkUJN+Ds799JLYZsMJrO2vDJ4snxUeHK2MgrQHbU+Qc=
31
github.com/aws/aws-sdk-go v1.49.0 h1:g9BkW1fo9GqKfwg2+zCD+TW/D36Ux+vtfJ8guF4AYmY=
42
github.com/aws/aws-sdk-go v1.49.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
53
github.com/aws/aws-sdk-go-v2 v1.34.0 h1:9iyL+cjifckRGEVpRKZP3eIxVlL06Qk1Tk13vreaVQU=
@@ -117,6 +115,8 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0
117115
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
118116
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
119117
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
118+
github.com/michaelhtm/ack-runtime v0.49.1-0.20250730215011-f7ca6ab251ea h1:hyMdoRxWLIS1ner6atIh2BeaKMxnRQhTXdzs2WDZBjs=
119+
github.com/michaelhtm/ack-runtime v0.49.1-0.20250730215011-f7ca6ab251ea/go.mod h1:OkUJN+Ds799JLYZsMJrO2vDJ4snxUeHK2MgrQHbU+Qc=
120120
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
121121
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
122122
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=

helm/crds/s3.services.k8s.aws_buckets.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,12 +1219,17 @@ spec:
12191219
OwnerAccountID is the AWS Account ID of the account that owns the
12201220
backend AWS service API resource.
12211221
type: string
1222+
partition:
1223+
description: Partition is the AWS partition in which the resource
1224+
exists or will exist
1225+
type: string
12221226
region:
12231227
description: Region is the AWS region in which the resource exists
12241228
or will exist.
12251229
type: string
12261230
required:
12271231
- ownerAccountID
1232+
- partition
12281233
- region
12291234
type: object
12301235
conditions:

pkg/resource/bucket/hook.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ package bucket
1515

1616
import (
1717
"context"
18-
"fmt"
1918
"strings"
2019

2120
"github.com/pkg/errors"
@@ -29,19 +28,6 @@ import (
2928
svcsdktypes "github.com/aws/aws-sdk-go-v2/service/s3/types"
3029
)
3130

32-
// bucketARN returns the ARN of the S3 bucket with the given name.
33-
func bucketARN(bucketName string) string {
34-
// TODO(a-hilaly): I know there could be other partitions, but I'm
35-
// not sure how to determine at this level of abstraction. Probably
36-
// something the SDK/runtime should handle. For now, we'll just use
37-
// the `aws` partition.
38-
//
39-
// NOTE(a-hilaly): Other parts of ACK also use this default partition
40-
// e.g the generated function `ARNFromName` also uses `aws` as the
41-
// default partition.
42-
return fmt.Sprintf("arn:aws:s3:::%s", bucketName)
43-
}
44-
4531
var (
4632
DefaultAccelerationStatus = svcsdktypes.BucketAccelerateStatusSuspended
4733
DefaultRequestPayer = svcsdktypes.PayerBucketOwner

pkg/resource/bucket/identifiers.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/resource/bucket/manager.go

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/resource/bucket/manager_factory.go

Lines changed: 24 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/resource/bucket/sdk.go

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)