Mixed version compatibility detection #6477
Merged
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.



Following the release of a breaking change where a newer version of a service client was trying to hit a non-existent code path on an older version of core, we have identified a number of core classes that are considered "risky" to change.
When changed / added to, a "risky" core class can have a codepath that breaks customers using mixed SDK versions. For example, when newer service clients expect methods or functionality that older core versions don't provide, it causes runtime failures for customers who haven't upgraded all their SDK modules together.
This workflow detects changes to the following base classes that generated service code implements:
•
AwsRequest•
AwsResponse•
AwsResponseMetadata•
AwsServiceException•
SdkPojoThe workflow uses git diff to detect any modifications to these specific base class files. If changes are found, it searches for new public method additions using pattern matching, and (attempts to) filter out obvious false positives like comments, string literals, and javadoc examples. When "risky" changes are detected, the workflow blocks the PR from merging until the team adds a
mixed-version-compatibility-reviewed label.Testing:
tested on personal fork
Considerations:
This is not supposed to be the "end all be all" tool for catching these potential runtime violations between mixed versions. It's supposed to be a first line of defense for flagging changes with potentially risky elements. Essentially is a very blunt instrument that will require us to do some manual validation after it flags potential violations.
We can always disable this if its more annoying than helpful.