-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-5144. Create github check to alert when dependency tree is changed #2199
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
Conversation
This reverts commit 28b2bbf.
This reverts commit bc8de05.
This reverts commit 3003848.
Co-authored-by: Doroszlai, Attila <[email protected]>
Co-authored-by: Doroszlai, Attila <[email protected]>
Co-authored-by: Doroszlai, Attila <[email protected]>
| #sed expression removes the version. Usually license is not changed with version bumps | ||
| #jacoco and test dependencies are excluded | ||
| find . -type f -name "*.jar" | cut -c3- | perl -wpl -e 's/-[0-9]+(.[0-9]+)*(-SNAPSHOT)?+//g' | grep -v jacoco | grep -v hadoop-hdds-test-utils | sort > "$SCRIPTDIR"/$REPORT_NAME | ||
| find . -type f -name "*.jar" | cut -c3- | perl -wpl -e 's/-[0-9]+(.[0-9]+)*(-SNAPSHOT)?+//g' | perl -wpl -e 's/[0-9a-z]+-SNAPSHOT//g' | grep -v jacoco | grep -v hadoop-hdds-test-utils | sort > "$SCRIPTDIR"/$REPORT_NAME |
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.
Nit: the hash in snapshot jars could be handled by replacing (-SNAPSHOT)? with (-([0-9a-f]+-)?SNAPSHOT)?. One less perl command, no ugly - suffix in jar names.
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.
Good idea, thanks for the suggestion. Pushed the fix in b9b7dae, will merge it once we have a green build.
|
Thanks @elek for updating the patch. Merging it after a green build. |
This is the fixed version (handles ratis snapshots) of #2177
JIRA: https://issues.apache.org/jira/browse/HDDS-5144
What changes were proposed in this pull request?
hadoop-ozone/dist/src/main/license/bin/LICENSE.txtandhadoop-ozone/dist/src/main/license/bin/LICENSE.txtshould be modified when the transitive dependencies are changed.However, it's very easy to miss any dependency change when we bump versions. It's possible that we change only versions but we also introduce new jar files via transitive dependencies.
This happened (for example) in #2139 and #2065
To avoid any mistake I suggest the same approach what we use the protobuf compatibility check:
If new dependency is introduced, the LICENSE file can be updated and the committed jar list also can be updated.
How was this patch tested?
Tested on my fork.
Example of failing builds:
https://github.com/elek/ozone/runs/2407951331?check_suite_focus=true