Skip to content

Merging H2 changes to master #651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 383 commits into from
Aug 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
383 commits
Select commit Hold shift + click to select a range
d898cbf
Updated to next snapshot version 2.0.0-preview-10-SNAPSHOT
Mar 21, 2018
4793240
Fix changelog for version 2.0.0-preview-9
varunnvs92 Mar 21, 2018
82760d7
Working flow
shorea Apr 4, 2018
5a31342
Merge branch 'master' into h2
shorea Apr 9, 2018
9c95be9
Syncing retry conditions with V1 and a bit of cleanup, reduce duplica…
shorea Apr 10, 2018
d79eec9
Removing unused shapes again
shorea Apr 10, 2018
837f43a
Include root causes in the exception message from AWSCredentialsProvi…
skwslide Mar 14, 2018
f20524b
Getting kinesis to build
shorea Apr 10, 2018
8463f37
Add flow module to parent pom
zoewangg Apr 10, 2018
696bacc
Added Consumer<Builder> methods to client methods where they were pre…
millems Apr 16, 2018
7bf7d49
Made the static methods on RequestBody match the ones on AsyncRequest…
millems Apr 17, 2018
cc5279e
Renamed AsyncRequestProvider to AsyncRequestBody to better match sync…
millems Apr 16, 2018
c30cda5
Remove release flag
dagnir Apr 18, 2018
e00789b
Renamed AsyncResponseHandler to AsyncResponseTransformer and Streamin…
millems Apr 17, 2018
fd9a6bf
Create Uber JAR for Kinesis
dagnir Apr 17, 2018
3cf77a2
Added Consumer<Builder> methods to varargs methods.
millems Apr 17, 2018
c34594f
Merge pull request #232 from aws/h2-dongie
dagnir Apr 20, 2018
7e0ffeb
Merge pull request #231 from dagnir/uber-kinesis
dagnir Apr 23, 2018
74c602f
Various fixes and cleanup for H2
shorea Apr 24, 2018
fa96f27
Merge branch 'master' into h2
shorea Apr 24, 2018
90b9a42
Add override method for config consumer method
dagnir May 4, 2018
46a9ecc
Improve exception message for high burst traffic using netty client
varunnvs92 Apr 29, 2018
ea8dcd0
CredentialsEndpointProvider.java: Adds the sending of a User-Agent ot…
Apr 24, 2018
0645e00
Renamed ClientConfiguration#lastExecutionInterceptors to executionInt…
millems May 9, 2018
551aa5c
Syncing client with latest model
shorea May 10, 2018
10a846e
Split core module to profiles, regions, auth, aws-core and core modules.
zoewangg May 1, 2018
41c3f18
Marked SdkHttpClient and SdkHttpClientFactory as internal and documen…
millems May 11, 2018
6599a3e
Fixes and checkstyle issues
shorea May 15, 2018
9273c32
Merge branch 'master' into shorea-h2
shorea May 15, 2018
ad59a1a
Merge pull request #233 from aws/shorea-h2
shorea May 15, 2018
c92026b
Fixing merge bug
shorea May 15, 2018
b6a2df9
Merge pull request #234 from aws/shorea-h2
shorea May 15, 2018
d28f092
H1 fixes. Porting over high burst stuff
shorea May 16, 2018
3eee3d7
H1 fixes. Porting over high burst stuff
shorea May 16, 2018
870da2c
Syncing with latest model and removing some generated classes from so…
shorea May 16, 2018
f278623
Syncing with latest model and removing some generated classes from so…
shorea May 16, 2018
037b992
Move Stax parser classes and AWS speicifc JSON Unmarshaller/Mashaller…
zoewangg May 9, 2018
ed2eabe
Add SdkHttpResponse to SdkResponse so that customers can retrieve HTT…
zoewangg May 16, 2018
61caaa6
Implementing backpressure and flow control.
shorea May 17, 2018
5e56f11
Merge branch 'master' into shorea-h2
shorea May 22, 2018
e888d95
Merge branch 'shorea-h2' into h2
shorea May 22, 2018
4fbe82e
Merge fixes
shorea May 22, 2018
39dc340
Add AWS Secrets Manager
zoewangg May 22, 2018
bdec344
Remove httpRequestTimeout and executionTimeout features
zoewangg May 22, 2018
b5ef768
Move AWS specific retry policies to aws-core,created AwsServiceExcept…
zoewangg May 11, 2018
9e16e3b
Implementing flow exceptions and fixing some channel releasing issues.
shorea May 23, 2018
7a0b768
Cleaning up protocol future and sending RST_STREAM when subscription …
shorea May 24, 2018
646c4cc
Wrap ReadTimeoutException/WriteTimeoutException with IOException so t…
zoewangg May 22, 2018
f05f567
Renamed "Bytes" overload for streaming operations to "AsBytes", and "…
millems May 24, 2018
ffc3c3c
Releasing channel
shorea May 25, 2018
17a1b4d
Use path style addressing for bucket names containing period
varunnvs92 May 15, 2018
2eb0787
Updating buffer size and enabling wire logging
shorea May 25, 2018
f6300ec
Suggest customers use a global region for IAM if their calls fail. If…
millems May 24, 2018
fc82008
Javapoet 1.11.1
May 25, 2018
032da16
Renamed S3AdvancedConfiguration to S3Configuration and ServiceAdvance…
millems May 24, 2018
edd81e3
Various usability improvements, such as simplifying configuring an HT…
millems Apr 13, 2018
4b774db
Renamed `RequestOverrideConfig` to `RequestOverrideConfiguration` to …
millems May 25, 2018
d47033a
Updating model
shorea May 25, 2018
45ab0ec
Updated to next snapshot version 2.0.0-preview-11-SNAPSHOT
May 26, 2018
6dc22d2
Fix Changlog
zoewangg May 26, 2018
9d62802
Signer Refactor
varunnvs92 May 16, 2018
1fae05b
fix changlog
zoewangg May 29, 2018
4e83319
Use TestBase resources for signer integ tests
varunnvs92 May 29, 2018
a306b53
Various refactor and cleanup
shorea May 30, 2018
f86592f
More cleanup and refactorings
shorea May 30, 2018
df2920d
Multiple minor changes as follow up to signer refactor PR. Has refact…
varunnvs92 May 29, 2018
5e8b36b
Merge branch 'master' into h2
shorea May 30, 2018
eb95dc5
Adding option to set protocol
shorea May 31, 2018
d4b7a8d
Make all generated model classes final
varunnvs92 May 31, 2018
82d4c10
Temporary Logging
shorea May 31, 2018
d096051
Support auto construct lists
dagnir May 22, 2018
12e10fd
Refactored client configuration to follow the HTTP model of defaults:…
millems May 30, 2018
b0cdb29
Make AwsRegionProviders throw exceptions like AwsCredentialsProviders
varunnvs92 May 31, 2018
c1a4d89
Add support to disable EC2 instance metadata service usage via enviro…
zoewangg May 23, 2018
0fb0b1d
Dont close input stream passed to public APIs
varunnvs92 Jun 1, 2018
e1d6359
Fix changelog sorting issue with preview versions
varunnvs92 Jun 2, 2018
caa5c55
Updating buffer logic in MessageDecoder to grow on demand and not upd…
shorea Jun 1, 2018
8e5d58f
Improving connection release behavior
shorea Jun 2, 2018
e38c4d6
By default, offload completion of the async execution future to a sep…
millems May 30, 2018
c5016d9
Remove unnecessary StringBuilder use
dagnir Jun 1, 2018
ff7973b
Use Instant instead of Date in Presigner params
varunnvs92 Jun 5, 2018
ead1c3a
PR for discussion, showing Reactive Streams TCK, proposing some
ktoso Jan 31, 2018
80a6f39
include sample content in test file, FIXME: these should use a virtual
ktoso Jan 31, 2018
1fd4c34
SimpleSubscriber is now spec compliant
ktoso Feb 3, 2018
89df25f
SingleByteArrayAsyncRequestProvider is now compliant
ktoso Feb 3, 2018
bb8ed04
Add TCK tests for reactive streams impls
dagnir May 31, 2018
7f2e3dc
Checkstyle fixes and calling onComplete and onError on flow subscriber
shorea Jun 5, 2018
a656eae
maven-dependency-plugin 3.1.1
Jun 6, 2018
3c9f96a
Verifying the http default values
varunnvs92 Jun 6, 2018
acd9a0c
Fixing some issues around terminal notifications and releasing channel
shorea Jun 6, 2018
ddbf4a3
Merge branch 'master' into shorea-h2
shorea Jun 6, 2018
9e68cc8
maven-javadoc-plugin 3.0.1
Jun 7, 2018
3971be6
Split service packages to differnt modules for kinesis, route53, iot,…
zoewangg Jun 6, 2018
1065296
Synchronize on FileSubscription.this
dagnir Jun 7, 2018
b678279
Remove java.util.Date from AbstractAwsSigner
varunnvs92 Jun 7, 2018
bedd98b
Change http default values
varunnvs92 Jun 7, 2018
873e34d
Add fix for FullResponseContentPublisher
dagnir Jun 7, 2018
a550a42
Modeling changes for SubscribeToShard API
shorea Jun 7, 2018
5c9f77a
Enforce that enum names must be singular, not plural.
millems Jun 4, 2018
8393db9
Support disable cert validation in Apache client through SdkHttpConfi…
varunnvs92 Jun 5, 2018
6a36769
Rename flow -> eventstream
shorea Jun 8, 2018
4a0100e
Move DynamoDB Item class to mapper
varunnvs92 Jun 8, 2018
d13e0f2
Handle autoconstruct lists in non-JSON protocols
dagnir Jun 5, 2018
1328d8a
Delete EventLoopGroupConfiguration
varunnvs92 Jun 8, 2018
6d197d6
Caching XPathFactory to improve performance of exception handling for…
zoewangg Jun 11, 2018
f144827
Updating models with latest released models.
shorea Jun 11, 2018
27a5ea3
Cast operand to long
varunnvs92 Jun 11, 2018
c175873
Clean up pom files
zoewangg Jun 7, 2018
899f873
Add bundle relocation fixes
dagnir Jun 12, 2018
4097534
Fixing first connection bug and handling TCP resets and other IO Exce…
shorea Jun 12, 2018
aec232c
Copying SubscribeToShardEvent to source
shorea Jun 12, 2018
fe827cb
Stop publishing after Content-Length bytes
dagnir Jun 8, 2018
2e4c228
Avoid path.toFile calls
telendt Jun 11, 2018
b54659c
Fix spotbugs bugs
zoewangg Jun 11, 2018
1859d7c
Make update service names to match 2.0 naming conventions. Use servic…
millems Jun 12, 2018
9e86e7f
Add service specific Retry Policy
zoewangg Jun 13, 2018
9e88788
Rename wrap to wrappedWith
dagnir Jun 14, 2018
abaf8aa
Annotated all core classes with public/private/internal. Moved a few …
millems Jun 15, 2018
5d08043
Move assignment of subscriber to top
dagnir Jun 18, 2018
f667aa4
Signal exceptions through CompletableFuture
dagnir Jun 14, 2018
5461f34
Remove unecessary Optional in fields and return optional for getters …
zoewangg Jun 15, 2018
9e8ede5
Remove gzipEnabled configuration, deprecated QueryStringSigner, remov…
zoewangg Jun 18, 2018
9d54957
Shutdown async executor service when client is closed. Do not shutdow…
millems Jun 18, 2018
7854348
Region class clean up
zoewangg Jun 18, 2018
35ce6e5
Handle NPE in SdkHttpResponseAdapter class
varunnvs92 Jun 19, 2018
7fb95cf
Moved internal region classes to the internal package
millems Jun 19, 2018
69bdb50
Moved internal core classes to the internal package.
millems Jun 19, 2018
4329a15
Fix simpledb test
zoewangg Jun 19, 2018
a549562
Don't use proxy password in toString method
varunnvs92 Jun 20, 2018
38d5532
Hack to deal with ReadTimeout issue
shorea Jun 20, 2018
e02c47c
Moved internal auth classes to internal package.
millems Jun 18, 2018
07c39fc
Move wiki pages to docs folder
zoewangg Jun 21, 2018
b9fd3da
Move ImmutableObjectUtils to mapper module
varunnvs92 Jun 20, 2018
e61a68f
Make paginator resume method private
zoewangg Jun 21, 2018
03e890e
Manually patching https://github.com/netty/netty/pull/8028/commits
shorea Jun 22, 2018
022581c
Updated AwsCrendentials to interface implemented by AwsBasicCredentia…
zoewangg Jun 22, 2018
e7cd973
Update ion-java to 1.2.0 which has automatic module name
varunnvs92 Jun 22, 2018
cff8969
AsyncClientBuilder cleanup: remove async prefix and create SdkEventGr…
zoewangg Jun 19, 2018
9723ee3
Merge branch 'master' into h2
shorea Jun 23, 2018
9647e56
rename SdkBuilder.apply to SdkBuilder.applyMutator to applyMutation
zoewangg Jun 22, 2018
9ece72b
Update DDB default max retry count to 8
zoewangg Jun 25, 2018
5627c3d
Cleaning up pending task comments
varunnvs92 Jun 22, 2018
8d64435
Customization config to disable sync client generation
varunnvs92 Jun 26, 2018
f611b46
Move sync pagination classes under pagination.sync package
varunnvs92 Jun 26, 2018
51a0f57
Move AwsS3V4Signer to auth
zoewangg Jun 25, 2018
df7a6fa
Change table name to avoid conflicts with other tests that run immedi…
varunnvs92 Jun 26, 2018
39cef60
Code generation for event stream responses.
shorea Jun 8, 2018
e2989db
Unit tests for event streaming code gen
shorea Jun 27, 2018
0ddceca
Merge branch 'h2' into shorea-h2
shorea Jun 27, 2018
11b1708
Replacing `@javax.annotation.Generated` with our own `Generated` anno…
zoewangg Jun 25, 2018
bf6ce49
Exceptions are now delivered to response handler in all scenarios. Fi…
shorea Jun 27, 2018
1750cf6
Fixing build for S3 and Glacier
shorea Jun 28, 2018
e3c3503
Increasing max payload size for event stream messages
shorea Jun 28, 2018
cd132ad
Generate setters for list and maps that has enum shape
varunnvs92 Jun 27, 2018
19c210d
Fix javadocs
dagnir Jun 26, 2018
295aec3
Refactor modules under a umbrella core module
varunnvs92 Jun 28, 2018
16576e4
Add changelog for core modules refactor
varunnvs92 Jun 28, 2018
e22efa1
add method name checkstyle to make sure we are not using kotlin funct…
zoewangg Jun 28, 2018
57f7bfb
Add new region and update endpoints.json
zoewangg Jul 2, 2018
995a495
Mark `final` on classes that are not designed to be sub classes to pr…
zoewangg Jun 29, 2018
c6f8550
Fixed bug preventing consumer-builder methods being generated on pagi…
millems Jun 29, 2018
176051e
Models that take and return `ByteBuffer` now take and return `SdkByte…
millems Jun 27, 2018
6d7e0f1
Add builder interface to public APIs
zoewangg Jul 3, 2018
1ead587
Cleaning up code gen
shorea Jul 2, 2018
43fe4f5
Use ofNullable in getValueForField
dagnir Jul 3, 2018
26c6769
Adding comment to condition and adding overload to MessageDecoder
shorea Jul 5, 2018
ea0406a
Add MissingSdkAnnotationCheck to make sure all non-test classes are m…
zoewangg Jul 5, 2018
a5eef01
Fail the connect promise if the connection is closed before HTTP/2 pa…
millems Jul 3, 2018
c838a7d
Update httpclient and httpcore to latest versions
varunnvs92 Jul 6, 2018
f6e780c
Refactoring retry policy code
spfink Jul 6, 2018
a9e29f2
Make sure each module has a dedicated package root and add support fo…
zoewangg Jul 5, 2018
1bc9207
Model updates
shorea Jul 6, 2018
a5eb770
Add support for auto construct maps
dagnir Jul 2, 2018
77943ed
Update all service models to follow V2 naming convention
zoewangg Jul 6, 2018
b1cb504
Add builders to auto pagination helper classes
varunnvs92 Jul 6, 2018
79643bc
Update Kinesis Bundle version
dagnir Jul 9, 2018
6172f2b
Standardize add item and override items to collection
zoewangg Jul 3, 2018
07ca27c
Merge public aws-sdk-java-v2/master
dagnir Jul 10, 2018
8e63e4c
Fix #585 RetryOnExceptions should consider subclasses of exceptions.
madgnome Jun 28, 2018
3cdb4cd
Fixes after merge
dagnir Jul 10, 2018
8e0ec00
Fixing cbor marshalling of dates
shorea Jul 11, 2018
fa649da
Making exceptions immutable
spfink Jul 11, 2018
f82ccf4
Append paginator user agent for pagination methods
zoewangg Jul 9, 2018
f169576
Updating Jackson version
spfink Jul 11, 2018
4bdcfcf
Add auto construct container fixes
dagnir Jul 11, 2018
bbcafd1
Fixing s3 unmarshalling
spfink Jul 11, 2018
9167af8
Minor fixes related to #615
dagnir Jul 11, 2018
a955245
Updating DDB tests to assert on correct value. Adding in getMessage o…
spfink Jul 12, 2018
9c7c1e7
Updating S3 unmarshaller to also add message to errorMessage on AwsEr…
spfink Jul 12, 2018
477dc7c
Merge remote-tracking branch 'origin/h2' into h2-merge-final
dagnir Jul 12, 2018
20c88b2
merge public aws-sdk-java-v2/master
dagnir Jul 12, 2018
a57a137
Fixes after merge
dagnir Jul 12, 2018
37cbb57
Don't relocate reactivestreams in bundle
dagnir Jul 12, 2018
d283378
Removing no longer needed template
spfink Jul 12, 2018
c3e2404
Cleaned up util classes in sdk-core.
millems Jul 12, 2018
f5a77d8
Netty 4.1.26.Final
Jul 10, 2018
1fb3acd
Fix broken integratin tests
varunnvs92 Jul 13, 2018
3769ac6
Cleaned up util classes in the utils module.
millems Jul 12, 2018
a205218
Add changelog for exceptions
varunnvs92 Jul 13, 2018
ea7af6a
Check skipSyncClientGeneration opt for paginators
dagnir Jul 13, 2018
5c87bfe
Ignore tests failing due to issues with loading resource files
varunnvs92 Jul 13, 2018
38824d1
Make ProfileFileLocation (formerly ProfileFileLocations) a public API.
millems Jul 13, 2018
5bf9f20
Updated code to support "exception" events.
millems Jul 10, 2018
bbb2a96
Return new instance for newChannel
dagnir Jul 13, 2018
4a7db6a
Merge remote-tracking branch 'public/master' into h2-merge-final
dagnir Jul 13, 2018
6c1f0b9
Merge remote-tracking branch 'origin/h2' into h2-merge-final
dagnir Jul 13, 2018
c983953
Fixes after merge
dagnir Jul 13, 2018
012de41
Merge pull request #248 from aws/h2-merge-final
dagnir Jul 13, 2018
5436ebd
Fix javadoc source path in bundle pom
varunnvs92 Jul 14, 2018
1bf1ee2
Fixing merge issue
shorea Jul 18, 2018
a722756
Ignoring exception members in an event stream shape. Syncing Kinesis …
shorea Jul 24, 2018
272cf4f
Revert "Ignoring exception members in an event stream shape. Syncing …
shorea Jul 24, 2018
b803fa9
Extracting error message from payload
shorea Jul 24, 2018
da8986c
Fixing bugs around connection release
shorea Jul 25, 2018
99714c0
Updating initial window size to 1 MB
shorea Jul 26, 2018
3ddfe8c
Revert "Revert "Ignoring exception members in an event stream shape. …
shorea Jul 26, 2018
c7e91ed
Fix unmarshaller generation when member is marked with httppayload trait
varunnvs92 Jul 26, 2018
526e831
Merge pull request #254 from aws/varunkn/h2-fixes
varunnvs92 Jul 26, 2018
9411ddf
Fix code coverage offset for core modules.
millems Jul 13, 2018
7a3f4ce
Handling exceptions thrown in onEventStream and renaming maxConns to …
shorea Jul 26, 2018
4e813ab
skip maven releases for test modules
zoewangg Jul 26, 2018
b645fb3
Fixing NPE when framelogger is null
shorea Jul 26, 2018
135b9e2
Removing MRJ to fix Java 9 build
shorea Jul 27, 2018
62012f6
Revert changes in dcbda80 and added javadoc plugin to codegen-generat…
zoewangg Jul 27, 2018
554bd72
Updated to next snapshot version 2.0.0-preview-12-SNAPSHOT
Jul 30, 2018
4657e5a
Add the mfa_serial profile property
Jul 30, 2018
3f19596
Add the ability to provide a Supplier<AssumeRoleRequest> to StsAssume…
Jul 30, 2018
34f4cef
Update changelog entries
zoewangg Jul 30, 2018
0e479d7
Merge pull request #637 from aws/updateSnapshotVersion
zoewangg Jul 31, 2018
b1ddd5a
Merge pull request #638 from abrooksv/mfaSerialProperty
zoewangg Jul 31, 2018
d389eab
Merge pull request #639 from abrooksv/stsRequestProvider
zoewangg Jul 31, 2018
6825899
Not calling terminal methods on cancel and fixing simple methods
shorea Jul 31, 2018
589a68d
Update javadoc site
zoewangg Jul 31, 2018
3758bd9
Remove sdk-core dependency from profiles module.
millems Jul 31, 2018
dc4cd00
Improve logging for debuggability.
zoewangg Jul 27, 2018
8d7dc0d
Add changelog entry for autoconstruct containers
dagnir Aug 1, 2018
94e70e6
Properly handling cancellation and protecting channel pool from multi…
shorea Aug 2, 2018
6c34260
Don't retry on SubscribeToShard and checkstyle fixes
shorea Aug 2, 2018
9e38ff1
Addressing comments
shorea Aug 2, 2018
26cf06f
Merge branch 'master' into h2
shorea Aug 2, 2018
111fd3a
Merge pull request #261 from aws/shorea-h2
shorea Aug 2, 2018
9934e9a
fix checkstyle
zoewangg Aug 2, 2018
6fd5872
Fixing merge
shorea Aug 2, 2018
793630c
Updating region to a whitelisted one
shorea Aug 2, 2018
010379e
Add flow pom.xml fixes for release
dagnir Aug 2, 2018
03dd88c
Update flow deps
dagnir Aug 2, 2018
83faf46
Removing kinesis-bundle
shorea Aug 3, 2018
e9cbcba
Merge branch 'master' into h2
shorea Aug 7, 2018
acf6973
Ignoring test to see if build succeeds.
shorea Aug 7, 2018
2629e30
Explicitly set region so test will pass in Travis
shorea Aug 7, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<suppress checks=".*"
files=".*[\\/](test|it)[\\/]java[\\/].+\.java$"/>

<!-- TODO: Disable these suppressions. -->
<suppress checks=".*"
files=".(flow)[\\/].+\.java$"/>

<!-- ignore missing annotation checks under test/codegen directory -->
<suppress checks="MissingSdkAnnotationCheck"
files=".(codegen|test)[\\/].+\.java$"/>
Expand All @@ -31,6 +35,14 @@
<suppress checks="MissingSdkAnnotationCheck"
files=".(services)[\\/].+\.java$"/>

<!-- TODO want to contribute this back to Netty -->
<suppress checks=".*"
files=".*BetterFixedChannelPool\.java$"/>

<!-- TODO want to contribute this back to Netty -->
<suppress checks=".*"
files=".*[\\/]io[\\/]netty[\\/]handler[\\/]codec[\\/]http2[\\/].*\.java$"/>

<!-- Assumes getter/setter match JSON property -->
<suppress checks="AbbreviationAsWordInName"
files=".*[\\/]software[\\/]amazon[\\/]awssdk[\\/]services[\\/]s3[\\/]event[\\/]S3EventNotification.java$"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@
<Bug pattern="URF_UNREAD_FIELD,DLS_DEAD_LOCAL_STORE,REC_CATCH_EXCEPTION" />
</Match>

<!-- NP_NONNULL_PARAM_VIOLATION false postive - https://github.com/spotbugs/spotbugs/issues/484 -->
<Match>
<Class name="software.amazon.awssdk.core.pagination.async.SequentialSubscriber" />
<Method name="onComplete" />
<Bug pattern="NP_NONNULL_PARAM_VIOLATION" />
</Match>

<!-- False positive -->
<Match>
<Class name="software.amazon.awssdk.core.ResponseBytes" />
Expand Down Expand Up @@ -103,4 +96,12 @@
<Bug pattern="RI_REDUNDANT_INTERFACES" />
</Match>

<Match>
<Or>
<Package name="io.netty.handler.codec.http2"/>
<Class name="software.amazon.awssdk.http.nio.netty.internal.utils.BetterFixedChannelPool" />
</Or>
<Bug pattern="BC_UNCONFIRMED_CAST,SIC_INNER_SHOULD_BE_STATIC_ANON,DLS_DEAD_LOCAL_STORE,DM_CONVERT_CASE,NM_CLASS_NOT_EXCEPTION,NP_NULL_ON_SOME_PATH"/>
</Match>

</FindBugsFilter>
1 change: 1 addition & 0 deletions bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<include>commons-codec:commons-codec</include>
<include>software.amazon.ion:ion-java</include>
<include>software.amazon.awssdk:*</include>
<include>software.amazon:*</include>
<include>commons-logging:*</include>
</includes>
</artifactSet>
Expand Down
5 changes: 5 additions & 0 deletions codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<artifactId>annotations</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-client-spi</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>regions</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public static Metadata constructMetadata(ServiceModel serviceModel,
.withSigningName(serviceMetadata.getSigningName())
.withAuthType(AuthType.fromValue(serviceMetadata.getSignatureVersion()))
.withRequiresApiKey(requiresApiKey(serviceModel))
.withUid(serviceMetadata.getUid());
.withUid(serviceMetadata.getUid())
.withSupportsH2(supportsH2(serviceMetadata));

final String jsonVersion = getJsonVersion(metadata, serviceMetadata);
metadata.setJsonVersion(jsonVersion);
Expand All @@ -108,6 +109,10 @@ public static Metadata constructMetadata(ServiceModel serviceModel,
return metadata;
}

private static boolean supportsH2(ServiceMetadata serviceMetadata) {
return serviceMetadata.getProtocolSettings() != null && serviceMetadata.getProtocolSettings().containsKey("h2");
}

private static String getJsonVersion(Metadata metadata, ServiceMetadata serviceMetadata) {
// TODO this should be defaulted in the C2J build tool
if (serviceMetadata.getJsonVersion() == null && metadata.isJsonProtocol()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private Map<String, ShapeModel> constructModelShapes(Set<String> shapesToSkip) {
ShapeType shapeType = getModelShapeType(shape);

if (shapeType != null) {
final String javaClassName = getNamingStrategy().getJavaClassName(shapeName);
String javaClassName = getNamingStrategy().getJavaClassName(shapeName);
if (shapesToSkip.contains(javaClassName)) {
continue;
}
Expand All @@ -77,6 +77,9 @@ private Map<String, ShapeModel> constructModelShapes(Set<String> shapesToSkip) {
* @return null if the given shape is neither a structure nor enum model.
*/
private ShapeType getModelShapeType(final Shape shape) {
if (shape.isException()) {
return null;
}
if (isStructure(shape)) {
return ShapeType.Model;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ protected final ShapeModel generateShapeModel(String javaClassName, String shape
shapeModel.setRequired(shape.getRequired());
shapeModel.setDeprecated(shape.isDeprecated());
shapeModel.setWrapper(shape.isWrapper());
shapeModel.withIsEventStream(shape.isEventStream());
shapeModel.withIsEvent(shape.isEvent());

boolean hasHeaderMember = false;
boolean hasStatusCodeMember = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import software.amazon.awssdk.codegen.model.intermediate.OperationModel;
import software.amazon.awssdk.codegen.poet.PoetExtensions;
import software.amazon.awssdk.codegen.utils.PaginatorUtils;
import software.amazon.awssdk.core.pagination.async.SequentialSubscriber;
import software.amazon.awssdk.utils.async.SequentialSubscriber;

public class PaginationDocs {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public AwsGeneratorTasks(GeneratorTaskParams params) {
private Iterable<GeneratorTask> createAwsTasks(GeneratorTaskParams params) {
// TODO Move AsyncClientGeneratorTasks to common generic tasks (mostly CommonGeneratorTasks class)
return new CompositeIterable<>(new AsyncClientGeneratorTasks(params),
new PaginatorsGeneratorTasks(params));
new PaginatorsGeneratorTasks(params),
new EventStreamGeneratorTasks(params));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

package software.amazon.awssdk.codegen.emitters.tasks;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.codegen.emitters.GeneratorTask;
import software.amazon.awssdk.codegen.emitters.GeneratorTaskParams;
import software.amazon.awssdk.codegen.emitters.PoetGeneratorTask;
import software.amazon.awssdk.codegen.model.intermediate.OperationModel;
import software.amazon.awssdk.codegen.poet.ClassSpec;
import software.amazon.awssdk.codegen.poet.eventstream.EventStreamResponseHandlerBuilderImplSpec;
import software.amazon.awssdk.codegen.poet.eventstream.EventStreamResponseHandlerSpec;
import software.amazon.awssdk.codegen.poet.eventstream.EventStreamUtils;
import software.amazon.awssdk.codegen.poet.eventstream.EventStreamVisitorBuilderImplSpec;

/**
* Generator tasks for event streaming operations.
*/
class EventStreamGeneratorTasks extends BaseGeneratorTasks {

private final GeneratorTaskParams params;

EventStreamGeneratorTasks(GeneratorTaskParams dependencies) {
super(dependencies);
this.params = dependencies;
}

@Override
protected List<GeneratorTask> createTasks() throws Exception {
info("Emitting event stream classes");

String fileHeader = model.getFileHeader();
String modelDirectory = params.getPathProvider().getModelDirectory();
return model.getOperations().values().stream()
.filter(OperationModel::hasEventStreamOutput)
.flatMap(this::eventStreamClassSpecs)
.map(spec -> new PoetGeneratorTask(modelDirectory, fileHeader, spec))
.collect(Collectors.toList());
}

private Stream<ClassSpec> eventStreamClassSpecs(OperationModel opModel) {
EventStreamUtils eventStreamUtils = EventStreamUtils.create(params.getPoetExtensions(), opModel);
return Stream.of(
new EventStreamResponseHandlerSpec(params, eventStreamUtils),
new EventStreamResponseHandlerBuilderImplSpec(params, eventStreamUtils),
new EventStreamVisitorBuilderImplSpec(params, eventStreamUtils));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ private boolean shouldGenerate(ShapeModel shapeModel) {
info("Skip generating marshaller class for " + shapeModel.getShapeName());
return false;
}
return shouldGenerate(shapeModel.getShapeType());
}

private boolean shouldGenerate(ShapeType shapeType) {
return ShapeType.Request == shapeType || (ShapeType.Model == shapeType && metadata.isJsonProtocol());
ShapeType shapeType = shapeModel.getShapeType();
return (ShapeType.Request == shapeType || (ShapeType.Model == shapeType && metadata.isJsonProtocol()))
// The event stream shape is a container for event subtypes and isn't something that needs to ever be marshalled
&& !shapeModel.isEventStream();
}

private Stream<GeneratorTask> createTask(String javaShapeName, ShapeModel shapeModel) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,11 @@ private boolean shouldGenerate(ShapeModel shapeModel) {
info("Skip generating unmarshaller class for " + shapeModel.getShapeName());
return false;
}
return shouldGenerate(shapeModel.getShapeType());
}

private boolean shouldGenerate(ShapeType shapeType) {
switch (shapeType) {
switch (shapeModel.getShapeType()) {
case Response:
case Model:
return true;
// The event stream shape is a container for event subtypes and isn't something that needs to ever be unmarshalled
return !shapeModel.isEventStream();
case Exception:
// Generating Exception Unmarshallers is not required for the JSON protocol
return !metadata.isJsonProtocol();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,5 +553,4 @@ private void appendParagraph(StringBuilder builder, String content, Object... co
.append("</p>")
.append(LF);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public class Metadata {

private String baseResponseName;

private boolean supportsH2;

public String getApiVersion() {
return apiVersion;
}
Expand Down Expand Up @@ -717,4 +719,12 @@ public Metadata withBaseResponseName(String baseResponseName) {
private String joinPackageNames(String lhs, String rhs) {
return StringUtils.isBlank(rhs) ? lhs : lhs + '.' + rhs;
}

public boolean supportsH2() {
return supportsH2;
}

public void withSupportsH2(boolean supportsH2) {
this.supportsH2 = supportsH2;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,16 @@ public boolean isPaginated() {
public void setPaginated(boolean paginated) {
isPaginated = paginated;
}

/**
* @return True if the operation has an event stream member in the output shape. False otherwise.
*/
public boolean hasEventStreamOutput() {
return outputShape != null
&& outputShape.getMembers() != null
&& outputShape.getMembers().stream()
.filter(m -> m.getShape() != null)
.anyMatch(m -> m.getShape().isEventStream());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ public class ShapeModel extends DocumentationModel implements HasDeprecation {

private ShapeCustomizationInfo customization = new ShapeCustomizationInfo();

private boolean isEventStream;

private boolean isEvent;

public ShapeModel(@JsonProperty("c2jName") String c2jName) {
this.c2jName = c2jName;
}
Expand Down Expand Up @@ -272,7 +276,10 @@ public List<MemberModel> getMembers() {
*/
public List<MemberModel> getNonStreamingMembers() {
return getMembers().stream()
// Filter out binary streaming members
.filter(m -> !m.getHttp().getIsStreaming())
// Filter out event stream members (if shape is null then it's primitive and we should include it).
.filter(m -> m.getShape() == null || !m.getShape().isEventStream)
.collect(Collectors.toList());
}

Expand Down Expand Up @@ -449,4 +456,29 @@ public void setRequestSignerClassFqcn(String authorizerClass) {
this.requestSignerClassFqcn = authorizerClass;
}

/**
* @return True if the shape is an 'eventstream' shape. The eventstream shape is the tagged union like
* container that holds individual 'events'.
*/
public boolean isEventStream() {
return this.isEventStream;
}

public ShapeModel withIsEventStream(boolean isEventStream) {
this.isEventStream = isEventStream;
return this;
}

/**
* @return True if the shape is an 'event'. I.E. It is a member of the eventstream and represents one logical event
* that can be delivered on the event stream.
*/
public boolean isEvent() {
return this.isEvent;
}

public ShapeModel withIsEvent(boolean isEvent) {
this.isEvent = isEvent;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

package software.amazon.awssdk.codegen.model.service;

import java.util.Map;

public class ServiceMetadata {

private String apiVersion;
Expand Down Expand Up @@ -43,6 +45,8 @@ public class ServiceMetadata {

private String uid;

private Map<String, String> protocolSettings;

public String getApiVersion() {
return apiVersion;
}
Expand Down Expand Up @@ -142,6 +146,14 @@ public void setUid(String uid) {
this.uid = uid;
}

public Map<String, String> getProtocolSettings() {
return protocolSettings;
}

public void setProtocolSettings(Map<String, String> protocolSettings) {
this.protocolSettings = protocolSettings;
}

public String getServiceId() {
return serviceId;
}
Expand Down
Loading