aws-sdk-java-v2 icon indicating copy to clipboard operation
aws-sdk-java-v2 copied to clipboard

Add processor to detect shared events + customization to duplicate.

Open alextwoods opened this issue 9 months ago • 1 comments

Add processor to detect shared events + customization to duplicate.

Motivation and Context

When an event shape is shared between multiple eventstreams, it causes SDK generation/compilation failures. The top level shape POJO implements the event stream interface for each stream and the return type of the sdkEventType method conflicts.

Modifications

This PR adds two things:

  1. A new customization config (duplicateAndRenameSharedEvents)
  2. A new processor (EventStreamSharedEventProcessor) which applies the customization and raises helpful error messages if shared events are detected.

Testing

Added new unit tests to cover processor/config. Manual testing of internal service model that raised this issue.

Screenshots (if appropriate)

N/A

Types of changes

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

Checklist

  • [ x] I have read the CONTRIBUTING document
  • [ x] Local run of mvn install succeeds
  • [ x] 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
  • [ x] I have added tests to cover my changes
  • [ x] All new and existing tests passed
  • [ ] I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • [ ] My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

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

alextwoods avatar Apr 14 '25 16:04 alextwoods

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

github-actions[bot] avatar Aug 18 '25 16:08 github-actions[bot]