Add processor to detect shared events + customization to duplicate.
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:
- A new customization config (
duplicateAndRenameSharedEvents) - 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 installsucceeds - [ 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-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith 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
Quality Gate passed
Issues
2 New issues
0 Accepted issues
Measures
0 Security Hotspots
92.4% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
91.4% Coverage on New Code
0.0% Duplication on New Code
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.