-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Patcher for AWS SDKv2 locale-dependent formatting #126326
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
Patcher for AWS SDKv2 locale-dependent formatting #126326
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
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.
Can we revert the test change in 23769da to show that this fixes the actual bug?
...ternal/src/main/java/org/elasticsearch/gradle/internal/dependencies/patches/PatcherInfo.java
Outdated
Show resolved
Hide resolved
Patchers transform specific classes in some "broken" dependencies to ensure they behave correctly (fixing a bug, disabling some undesired or dangerous behaviour, updating calls to deprecated or removed method overloads). If we upgrade one of the dependencies we patch, we have a concerns that the patchers may not work against the classes in the new version. This PR addresses this concern by introducing a check on the SHA256 digest of the class, to ensure we are operating on the same bytes the patcher was designed for; if the digest changes that means the class has been changed (e.g. for a dependency update). If that happens, we break the build process with a specific error, so we can double check that the patchers still work against the new classes. Extracted from #126326 Relates to ES-11279
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.
LGTM (assuming CI is happy)
AWS SDK v2 has a bug (aws/aws-sdk-java-v2#5968) where PathResolver uses locale-dependent formatting. This PR adds a patcher to the discovery-ec2 build process to replace calls to String.format(<format>, <args>) with String.format(Locale.ROOT, <format>, <args>). Relates to ES-11279
AWS SDK v2 has a bug (aws/aws-sdk-java-v2#5968) where PathResolver uses locale-dependent formatting.
This PR adds a patcher to the
discovery-ec2
build process to replace calls toString.format(<format>, <args>)
withString.format(Locale.ROOT, <format>, <args>)
.Relates to ES-11279