GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix eventstream legacy generation by dagnir · Pull Request #2217 · aws/aws-sdk-java-v2

Conversation

@dagnir

@dagnir dagnir commented Dec 21, 2020

Copy link
Copy Markdown
Contributor

Description

Legacy generation uses the shape name as the event name. Transcribe Streaming
has a member event named "TranscriptEvent", but its shape is
"MedicalTranscriptEvent". This only affected interfaces, marshalling/marshalling
is okay.

Motivation and Context

Bug fix.

Testing

Added a new test.

Checked the diffs:

  • Transcribe Streaming diff with 2.15.51: https://gist.github.com/dagnir/8a7578648433595ede76d998081ad749#file-transcribestreaming-diff-with-2-15-51-diff
  • Transcribe Streaming diff with 2.15.35. This is the first time MedicalTransciptEvent is introduced: https://gist.github.com/dagnir/8a7578648433595ede76d998081ad749#file-transcribestreaming-diff-with-2-15-35-diff
  • Kinesis diff with 2.15.51: https://gist.github.com/dagnir/8a7578648433595ede76d998081ad749#file-kinesis-diff-with-2-15-51-diff

Screenshots (if appropriate)

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dagnir added 2 commits December 21, 2020 12:40
@dagnir
Fix eventstream legacy generation
97ff60d
Legacy generation uses the shape name as the event name. Transcribe Streaming
has a member event named "TranscriptEvent", but its shape is
"MedicalTranscriptEvent". This only affected interfaces, marshalling/marshalling
is okay.
@dagnir
Fix test
e0eddb1
dagnir
dagnir commented Dec 21, 2020
View reviewed changes
Comment thread ...egen-generated-classes-test/src/main/resources/codegen-resources/eventstreams/service-2.json
"type": "structure",
"members": {
"EventOne": {
"TheEventOne": {

@dagnir dagnir Dec 21, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: legacy uses event shape name, so this caused a clash because we generated two "visitEventOne" methods; one is because the non legacy event was called "eventOne", and the legacy customized one had a shape name of "EventOne"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
zoewangg
zoewangg approved these changes Dec 21, 2020
View reviewed changes
@codecov-io

codecov-io commented Dec 21, 2020

Copy link
Copy Markdown

Codecov Report

Merging #2217 (e0eddb1) into master (205ef25) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2217      +/-   ##
============================================
- Coverage     77.58%   77.58%   -0.01%     
  Complexity      335      335              
============================================
  Files          1230     1230              
  Lines         38692    38697       +5     
  Branches       3043     3043              
============================================
+ Hits          30019    30022       +3     
- Misses         7214     7215       +1     
- Partials       1459     1460       +1     
Flag Coverage Δ Complexity Δ
unittests 77.58% <100.00%> (-0.01%) 0.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...eventstream/EventStreamVisitorBuilderImplSpec.java 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
...stream/EventStreamVisitorBuilderInterfaceSpec.java 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
...t/eventstream/EventStreamVisitorInterfaceSpec.java 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
...ssdk/codegen/poet/model/EventStreamSpecHelper.java 93.75% <100.00%> (+0.64%) 0.00 <0.00> (ø)
...ssdk/core/internal/async/FileAsyncRequestBody.java 80.95% <0.00%> (-2.86%) 0.00% <0.00%> (ø%)
...ware/amazon/awssdk/utils/cache/CachedSupplier.java 90.24% <0.00%> (+2.43%) 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 205ef25...e0eddb1. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sonarqubecloud

sonarqubecloud Bot commented Dec 21, 2020

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dagnir
dagnir merged commit d8c88cf into aws:master Dec 22, 2020
@dagnir
dagnir deleted the fix-legacy-generation branch December 22, 2020 01:03
aws-sdk-java-automation pushed a commit that referenced this pull request Oct 20, 2022
@dagnir
Do a quick install first so all deps are on the local repo (#2217)
2be163a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@zoewangg zoewangg zoewangg approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@dagnir @codecov-io @zoewangg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.