Skip to content

Fix event marshaller binding for input event streams. #1927

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

Conversation

adamthom-amzn
Copy link
Contributor

This is another case of SDK code generation failing when the event's structure name and the structure member name are not identical.

Description

This is similar to #1821 which fixed the problem for output event streams.

Motivation and Context

This fixes generation for services that do not align their structure member names and structure type names when modelling event streams.

Testing

I modified the existing unit tests. The previously generated client appears to be nonfunctional, as it references an InputEventOne class and an InputEventOneMarshaller class, but the C2JModel only contains shapes InputEvent and InputEventTwo.

I also tested this offline on a model that broke generation without this change.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

This is another case of SDK code generation failing when the event's structure name and the structure member name are not identical.
@codecov-commenter
Copy link

codecov-commenter commented Jun 25, 2020

Codecov Report

Merging #1927 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1927      +/-   ##
============================================
+ Coverage     76.24%   76.26%   +0.01%     
  Complexity      187      187              
============================================
  Files          1076     1076              
  Lines         32575    32575              
  Branches       2569     2569              
============================================
+ Hits          24837    24842       +5     
+ Misses         6478     6473       -5     
  Partials       1260     1260              
Flag Coverage Δ Complexity Δ
#unittests 76.26% <100.00%> (+0.01%) 187.00 <0.00> (ø)
Impacted Files Coverage Δ Complexity Δ
...n/awssdk/codegen/poet/client/AsyncClientClass.java 96.24% <100.00%> (ø) 0.00 <0.00> (ø)
...nio/netty/internal/OldConnectionReaperHandler.java 81.81% <0.00%> (-9.10%) 0.00% <0.00%> (ø%)
...http/nio/netty/internal/nrs/HandlerSubscriber.java 82.75% <0.00%> (+6.89%) 0.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5148ee...dc96270. Read the comment docs.

@millems millems merged commit 022970e into aws:master Jun 30, 2020
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more here

aws-sdk-java-automation pushed a commit that referenced this pull request Feb 8, 2022
Revert "Replacing @theory annotated test case to @parameterized test …
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.

3 participants