-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Patcher improvements (HDFS) #126449
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 improvements (HDFS) #126449
Conversation
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
...ols-internal/src/main/java/org/elasticsearch/gradle/internal/dependencies/patches/Utils.java
Outdated
Show resolved
Hide resolved
...ternal/src/main/java/org/elasticsearch/gradle/internal/dependencies/patches/PatcherInfo.java
Outdated
Show resolved
Hide resolved
...ols-internal/src/main/java/org/elasticsearch/gradle/internal/dependencies/patches/Utils.java
Outdated
Show resolved
Hide resolved
mosche
left a comment
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, just a tiny nit
DaveCTurner
left a comment
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.
It'd be slightly nicer to get all the hash mismatches at once, rather than having to update them one-by-one and re-run the build. But it's not that many, this LGTM too.
...ols-internal/src/main/java/org/elasticsearch/gradle/internal/dependencies/patches/Utils.java
Outdated
Show resolved
Hide resolved
...ternal/src/main/java/org/elasticsearch/gradle/internal/dependencies/patches/PatcherInfo.java
Outdated
Show resolved
Hide resolved
I like it, Done! |
DaveCTurner
left a comment
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 still
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