Skip to content

Commit 3383499

Browse files
authored
Release v2.0.0-preview.3 (2018-03-08) (#147)
Services --- * Synced the V2 SDK with latests AWS service API definitions. Breaking Changes --- * `private/mode/api`: Refactor service paginator helpers to iterator pattern (#119) * Refactors the generated service client paginators to be an iterator pattern. This pattern improves usability while removing the need for callbacks. * See the linked PR for an example. * `private/model/api`: Removes setter helpers from service API types (#101) * Removes the setter helper methods from service API types. Removing clutter and noise from the API type's signature. * Based on feedback #81 * `aws`: Rename CanceledErrorCode to ErrCodeRequestCanceled (#131) * Renames CanceledErrorCode to correct naming scheme. SDK Bugs --- * `internal/awsutil`: Fix DeepEqual to consider string alias type equal to string (#102) * Fixes SDK waiters not detecting the correct condition is met. #92 * `aws/external`: Fix EnvConfig misspelled container endpoint path getter (#106) * This caused the type to not satisfy the ContainerCredentialsEndpointPathProvider interface. * Fixes #105 * `service/s3/s3crypto`: Fix S3Crypto's handling of TagLen (#107) * Fixes the S3Crypto's handling of TagLen to only be set if present. * V2 Fix for aws/aws-sdk-go#1742 * `private/model/api`: Update SDK service client initialization documentation (#141) * Updates the SDK's service initialization doc template to reflect the v2 SDK's configuration update change from v1. * Related to #136 SDK Enhancements --- * `aws`: Improve pagination unit tests (#97) * V2 port of aws/aws-sdk-go#1733 * `aws/external`: Add example for shared config and static credential helper (#109) * Adds examples for the config helpers; WithSharedConfigProfile, WithCredentialsValue, WithMFATokenFunc. * `private/model/api`: Add validation to prevent collision of api defintions (#112) * V2 port of aws/aws-sdk-go#1758 * `aws/ec2metadata`: Add support for AWS_EC2_METADATA_DISABLED env var (#128) * When this environment variable is set. The SDK's EC2 Metadata Client will not attempt to make requests. All requests made with the EC2 Metadata Client will fail. * V2 port of aws/aws-sdk-go#1799 * Add code of conduct (#138) * Update SDK README dep usage (#140)
1 parent 309ad1c commit 3383499

File tree

221 files changed

+21967
-3358
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+21967
-3358
lines changed

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
Release v2.0.0-preview.3 (2018-03-08)
2+
===
3+
4+
### Services
5+
* Synced the V2 SDK with latests AWS service API definitions.
6+
7+
### Breaking Changes
8+
* `private/mode/api`: Refactor service paginator helpers to iterator pattern ([#119](https://github.com/aws/aws-sdk-go-v2/pull/119))
9+
* Refactors the generated service client paginators to be an iterator pattern. This pattern improves usability while removing the need for callbacks.
10+
* See the linked PR for an example.
11+
* `private/model/api`: Removes setter helpers from service API types ([#101](https://github.com/aws/aws-sdk-go-v2/pull/101))
12+
* Removes the setter helper methods from service API types. Removing clutter and noise from the API type's signature.
13+
* Based on feedback [#81][https://github.com/aws/aws-sdk-go-v2/issues/81]
14+
* `aws`: Rename CanceledErrorCode to ErrCodeRequestCanceled ([#131](https://github.com/aws/aws-sdk-go-v2/pull/131))
15+
* Renames CanceledErrorCode to correct naming scheme.
16+
17+
### SDK Bugs
18+
* `internal/awsutil`: Fix DeepEqual to consider string alias type equal to string ([#102](https://github.com/aws/aws-sdk-go-v2/pull/102))
19+
* Fixes SDK waiters not detecting the correct condition is met. [#92](https://github.com/aws/aws-sdk-go-v2/issues/92)
20+
* `aws/external`: Fix EnvConfig misspelled container endpoint path getter ([#106](https://github.com/aws/aws-sdk-go-v2/pull/106))
21+
* This caused the type to not satisfy the ContainerCredentialsEndpointPathProvider interface.
22+
* Fixes [#105](https://github.com/aws/aws-sdk-go-v2/issues/105)
23+
* `service/s3/s3crypto`: Fix S3Crypto's handling of TagLen ([#107](https://github.com/aws/aws-sdk-go-v2/pull/107))
24+
* Fixes the S3Crypto's handling of TagLen to only be set if present.
25+
* V2 Fix for [aws/aws-sdk-go#1742](https://github.com/aws/aws-sdk-go/issues/1742)
26+
* `private/model/api`: Update SDK service client initialization documentation ([#141](https://github.com/aws/aws-sdk-go-v2/pull/141))
27+
* Updates the SDK's service initialization doc template to reflect the v2 SDK's configuration update change from v1.
28+
* Related to [#136](https://github.com/aws/aws-sdk-go-v2/issues/136)
29+
30+
### SDK Enhancements
31+
* `aws`: Improve pagination unit tests ([#97](https://github.com/aws/aws-sdk-go-v2/pull/97))
32+
* V2 port of [aws/aws-sdk-go#1733](https://github.com/aws/aws-sdk-go/pull/1733)
33+
* `aws/external`: Add example for shared config and static credential helper ([#109](https://github.com/aws/aws-sdk-go-v2/pull/109))
34+
* Adds examples for the config helpers; WithSharedConfigProfile, WithCredentialsValue, WithMFATokenFunc.
35+
* `private/model/api`: Add validation to prevent collision of api defintions ([#112](https://github.com/aws/aws-sdk-go-v2/pull/112))
36+
* V2 port of [aws/aws-sdk-go#1758](https://github.com/aws/aws-sdk-go/pull/1758)
37+
* `aws/ec2metadata`: Add support for AWS_EC2_METADATA_DISABLED env var ([#128](https://github.com/aws/aws-sdk-go-v2/pull/128))
38+
* When this environment variable is set. The SDK's EC2 Metadata Client will not attempt to make requests. All requests made with the EC2 Metadata Client will fail.
39+
* V2 port of [aws/aws-sdk-go#1799](https://github.com/aws/aws-sdk-go/pull/1799)
40+
* Add code of conduct ([#138](https://github.com/aws/aws-sdk-go-v2/pull/138))
41+
* Update SDK README dep usage ([#140](https://github.com/aws/aws-sdk-go-v2/pull/140))
42+
143
Release v2.0.0-preview.2 (2018-01-15)
244
===
345

aws/endpoints/decode.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"encoding/json"
55
"fmt"
66
"io"
7-
"os"
87

98
"github.com/aws/aws-sdk-go-v2/aws/awserr"
109
)
@@ -85,34 +84,11 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (*Reso
8584
custAddEC2Metadata(p)
8685
custAddS3DualStack(p)
8786
custSetUnresolveServices(p)
88-
89-
custFixCloudHSMv2SigningName(p)
9087
}
9188

9289
return &Resolver{partitions: ps}, nil
9390
}
9491

95-
func custFixCloudHSMv2SigningName(p *partition) {
96-
// Workaround for aws/aws-sdk-go#1745 until the endpoint model can be
97-
// fixed upstream. TODO remove this once the endpoints model is updated.
98-
99-
s, ok := p.Services["cloudhsmv2"]
100-
if !ok {
101-
return
102-
}
103-
104-
if len(s.Defaults.CredentialScope.Service) != 0 {
105-
fmt.Fprintf(os.Stderr, "cloudhsmv2 signing name already set, ignoring override.\n")
106-
// If the value is already set don't override
107-
return
108-
}
109-
110-
s.Defaults.CredentialScope.Service = "cloudhsm"
111-
fmt.Fprintf(os.Stderr, "cloudhsmv2 signing name not set, overriding.\n")
112-
113-
p.Services["cloudhsmv2"] = s
114-
}
115-
11692
func custAddS3DualStack(p *partition) {
11793
if p.ID != "aws" {
11894
return

aws/endpoints/decode_test.go

Lines changed: 0 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -115,126 +115,3 @@ func TestDecodeModelOptionsSet(t *testing.T) {
115115
t.Errorf("expect %v options got %v", expect, actual)
116116
}
117117
}
118-
119-
func TestDecode_CustFixCloudHSMv2SigningName(t *testing.T) {
120-
cases := []struct {
121-
Doc string
122-
Expect string
123-
}{
124-
{
125-
Doc: `
126-
{
127-
"version": 3,
128-
"partitions": [
129-
{
130-
"defaults": {
131-
"hostname": "{service}.{region}.{dnsSuffix}",
132-
"protocols": [
133-
"https"
134-
],
135-
"signatureVersions": [
136-
"v4"
137-
]
138-
},
139-
"dnsSuffix": "amazonaws.com",
140-
"partition": "aws",
141-
"partitionName": "AWS Standard",
142-
"regionRegex": "^(us|eu|ap|sa|ca)\\-\\w+\\-\\d+$",
143-
"regions": {
144-
"ap-northeast-1": {
145-
"description": "Asia Pacific (Tokyo)"
146-
},
147-
"us-east-1": {
148-
"description": "US East (N. Virginia)"
149-
}
150-
},
151-
"services": {
152-
"cloudhsmv2": {
153-
"endpoints": {
154-
"us-east-1": {}
155-
}
156-
},
157-
"s3": {
158-
"endpoints": {
159-
"ap-northeast-1": {}
160-
}
161-
}
162-
}
163-
}
164-
]
165-
}`,
166-
Expect: "cloudhsm",
167-
},
168-
{
169-
Doc: `
170-
{
171-
"version": 3,
172-
"partitions": [
173-
{
174-
"defaults": {
175-
"hostname": "{service}.{region}.{dnsSuffix}",
176-
"protocols": [
177-
"https"
178-
],
179-
"signatureVersions": [
180-
"v4"
181-
]
182-
},
183-
"dnsSuffix": "amazonaws.com",
184-
"partition": "aws",
185-
"partitionName": "AWS Standard",
186-
"regionRegex": "^(us|eu|ap|sa|ca)\\-\\w+\\-\\d+$",
187-
"regions": {
188-
"ap-northeast-1": {
189-
"description": "Asia Pacific (Tokyo)"
190-
},
191-
"us-east-1": {
192-
"description": "US East (N. Virginia)"
193-
}
194-
},
195-
"services": {
196-
"cloudhsmv2": {
197-
"defaults": {
198-
"credentialScope": {
199-
"service": "coolSigningName"
200-
}
201-
},
202-
"endpoints": {
203-
"us-east-1": {}
204-
}
205-
},
206-
"s3": {
207-
"endpoints": {
208-
"ap-northeast-1": {}
209-
}
210-
}
211-
}
212-
}
213-
]
214-
}`,
215-
Expect: "coolSigningName",
216-
},
217-
}
218-
219-
for i, c := range cases {
220-
resolver, err := DecodeModel(strings.NewReader(c.Doc))
221-
if err != nil {
222-
t.Fatalf("%d, expected no error, got %v", i, err)
223-
}
224-
225-
p := resolver.partitions[0]
226-
defaults := p.Services["cloudhsmv2"].Defaults
227-
if e, a := c.Expect, defaults.CredentialScope.Service; e != a {
228-
t.Errorf("%d, expect %v, got %v", i, e, a)
229-
}
230-
231-
endpoint, err := resolver.ResolveEndpoint("cloudhsmv2", "us-east-1")
232-
if err != nil {
233-
t.Fatalf("%d, failed to resolve endpoint, %v", i, err)
234-
}
235-
236-
if e, a := c.Expect, endpoint.SigningName; e != a {
237-
t.Errorf("%d, expected %q go %q", i, e, a)
238-
}
239-
}
240-
}

0 commit comments

Comments
 (0)