-
Notifications
You must be signed in to change notification settings - Fork 587
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
Merged
Merged
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
2dc476e
script to check dependency changes
elek bc8de05
remove tests which are not required
elek 5a6fac8
fix checkout dir
elek 43761fc
fix tar
elek 097b2b0
exclude jacoco
elek 2694b0a
add missing ozonefs jar files
elek 28b2bbf
check the version of sort
elek 4b191b7
sort fix
elek a896a48
Revert "check the version of sort"
elek 3003848
Bump common compress version
elek d97c265
update output message
elek 4fea4a2
additional help text improvement
elek 740bbc2
Revert "remove tests which are not required"
elek 07b10bf
Revert "Bump common compress version"
elek 9babef1
add timeout
elek 314a9cb
Using unified diff
elek 9792528
Update the error message with warning to merge master
elek 3d12000
User perl for regexp replace.
elek 78e7dca
adjust timeout
elek 5347850
Merge remote-tracking branch 'origin/master' into dependency-check
elek bc22050
fix warning message
elek 056e7c8
regenerate jar report
elek 8e6467a
Merge remote-tracking branch 'origin/master' into dependency-check
elek 3fc74fc
fix pattern to handle Ratis type pseudo snapshot
elek b9b7dae
combine the two per expression
elek 062f70f
trigger new CI check
adoroszlai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,3 +67,6 @@ hadoop-ozone/recon/node_modules | |
| .mvn | ||
|
|
||
| .dev-tools | ||
|
|
||
|
|
||
| hadoop-ozone/dist/src/main/license/current.txt | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| #!/usr/bin/env bash | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
| cd "$DIR/../../.." || exit 1 | ||
|
|
||
| REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/dependency"} | ||
| mkdir -p "$REPORT_DIR" | ||
| REPORT_FILE="$REPORT_DIR/summary.txt" | ||
|
|
||
| hadoop-ozone/dist/src/main/license/update-jar-report.sh current.txt | ||
|
|
||
| cp hadoop-ozone/dist/src/main/license/jar-report.txt "$REPORT_DIR" | ||
| cp hadoop-ozone/dist/src/main/license/current.txt "$REPORT_DIR" | ||
|
|
||
| #implementation of sort cli is not exactly the same everywhere. It's better to sort with the same command locally | ||
| (diff -uw <(sort hadoop-ozone/dist/src/main/license/jar-report.txt) <(sort hadoop-ozone/dist/src/main/license/current.txt) || true ) > "$REPORT_FILE" | ||
|
|
||
|
|
||
| if [ -s "$REPORT_FILE" ]; then | ||
| echo "" | ||
| echo "Jar files are added/removed to/from the binary package." | ||
| echo "" | ||
| echo "Please update the hadoop-ozone/dist/src/main/license/bin/LICENSE.txt file with the modification" | ||
| echo " AND execute hadoop-ozone/dist/src/main/license/update-jar-report.sh when you are ready (after a full build)" | ||
| echo "" | ||
| echo "Generated hadoop-ozone/dist/src/main/license/jar-report.txt file should be added to your pull-request. It will be used as the base of future comparison." | ||
| echo "" | ||
| echo "This check may also report positive for PRs if the source is not up-to-date with the base branch (eg. \`master\`). In this case please merge the base branch into your source branch." | ||
| echo "" | ||
| echo "Changed jars:" | ||
| echo "" | ||
| cat $REPORT_FILE | ||
| exit 1 | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,235 @@ | ||
| share/ozone/lib/accessors-smart.jar | ||
| share/ozone/lib/activation.jar | ||
| share/ozone/lib/animal-sniffer-annotations.jar | ||
| share/ozone/lib/annotations.jar | ||
| share/ozone/lib/annotations.jar | ||
| share/ozone/lib/aopalliance.jar | ||
| share/ozone/lib/aopalliance-repackaged.jar | ||
| share/ozone/lib/asm.jar | ||
| share/ozone/lib/aws-java-sdk-core.jar | ||
| share/ozone/lib/aws-java-sdk-kms.jar | ||
| share/ozone/lib/aws-java-sdk-s3.jar | ||
| share/ozone/lib/bcpkix-jdk15on.jar | ||
| share/ozone/lib/bcprov-jdk15on.jar | ||
| share/ozone/lib/bonecp.RELEASE.jar | ||
| share/ozone/lib/cdi-api.jar | ||
| share/ozone/lib/checker-qual.jar | ||
| share/ozone/lib/commons-beanutils.jar | ||
| share/ozone/lib/commons-cli.jar | ||
| share/ozone/lib/commons-codec.jar | ||
| share/ozone/lib/commons-collections.jar | ||
| share/ozone/lib/commons-compress.jar | ||
| share/ozone/lib/commons-configuration2.jar | ||
| share/ozone/lib/commons-daemon.jar | ||
| share/ozone/lib/commons-digester.jar | ||
| share/ozone/lib/commons-io.jar | ||
| share/ozone/lib/commons-lang3.jar | ||
| share/ozone/lib/commons-logging.jar | ||
| share/ozone/lib/commons-math3.jar | ||
| share/ozone/lib/commons-net.jar | ||
| share/ozone/lib/commons-pool2.jar | ||
| share/ozone/lib/commons-text.jar | ||
| share/ozone/lib/commons-validator.jar | ||
| share/ozone/lib/derby.jar | ||
| share/ozone/lib/disruptor.jar | ||
| share/ozone/lib/dnsjava.jar | ||
| share/ozone/lib/error_prone_annotations.jar | ||
| share/ozone/lib/failureaccess.jar | ||
| share/ozone/lib/FastInfoset.jar | ||
| share/ozone/lib/grpc-api.jar | ||
| share/ozone/lib/grpc-context.jar | ||
| share/ozone/lib/grpc-core.jar | ||
| share/ozone/lib/grpc-netty.jar | ||
| share/ozone/lib/grpc-protobuf.jar | ||
| share/ozone/lib/grpc-protobuf-lite.jar | ||
| share/ozone/lib/grpc-stub.jar | ||
| share/ozone/lib/gson.jar | ||
| share/ozone/lib/guava-jre.jar | ||
| share/ozone/lib/guice-assistedinject.jar | ||
| share/ozone/lib/guice-bridge.jar | ||
| share/ozone/lib/guice.jar | ||
| share/ozone/lib/guice-multibindings.jar | ||
| share/ozone/lib/guice-servlet.jar | ||
| share/ozone/lib/hadoop-annotations.jar | ||
| share/ozone/lib/hadoop-auth.jar | ||
| share/ozone/lib/hadoop-common.jar | ||
| share/ozone/lib/hadoop-hdds-client.jar | ||
| share/ozone/lib/hadoop-hdds-common.jar | ||
| share/ozone/lib/hadoop-hdds-config.jar | ||
| share/ozone/lib/hadoop-hdds-container-service.jar | ||
| share/ozone/lib/hadoop-hdds-docs.jar | ||
| share/ozone/lib/hadoop-hdds-hadoop-dependency-client.jar | ||
| share/ozone/lib/hadoop-hdds-hadoop-dependency-server.jar | ||
| share/ozone/lib/hadoop-hdds-interface-admin.jar | ||
| share/ozone/lib/hadoop-hdds-interface-client.jar | ||
| share/ozone/lib/hadoop-hdds-interface-server.jar | ||
| share/ozone/lib/hadoop-hdds-server-framework.jar | ||
| share/ozone/lib/hadoop-hdds-server-scm.jar | ||
| share/ozone/lib/hadoop-hdds-tools.jar | ||
| share/ozone/lib/hadoop-hdfs-client.jar | ||
| share/ozone/lib/hadoop-hdfs.jar | ||
| share/ozone/lib/hadoop-ozone-client.jar | ||
| share/ozone/lib/hadoop-ozone-common.jar | ||
| share/ozone/lib/hadoop-ozone-csi.jar | ||
| share/ozone/lib/hadoop-ozone-datanode.jar | ||
| share/ozone/lib/hadoop-ozone-filesystem-common.jar | ||
| share/ozone/lib/hadoop-ozone-filesystem-hadoop2.jar | ||
| share/ozone/lib/hadoop-ozone-filesystem-hadoop3.jar | ||
| share/ozone/lib/hadoop-ozone-filesystem.jar | ||
| share/ozone/lib/hadoop-ozone-insight.jar | ||
| share/ozone/lib/hadoop-ozone-interface-client.jar | ||
| share/ozone/lib/hadoop-ozone-interface-storage.jar | ||
| share/ozone/lib/hadoop-ozone-ozone-manager.jar | ||
| share/ozone/lib/hadoop-ozone-reconcodegen.jar | ||
| share/ozone/lib/hadoop-ozone-recon.jar | ||
| share/ozone/lib/hadoop-ozone-s3gateway.jar | ||
| share/ozone/lib/hadoop-ozone-tools.jar | ||
| share/ozone/lib/hk2-api.jar | ||
| share/ozone/lib/hk2-locator.jar | ||
| share/ozone/lib/hk2-utils.jar | ||
| share/ozone/lib/htrace-core4-incubating.jar | ||
| share/ozone/lib/httpclient.jar | ||
| share/ozone/lib/httpcore.jar | ||
| share/ozone/lib/ion-java.jar | ||
| share/ozone/lib/istack-commons-runtime.jar | ||
| share/ozone/lib/j2objc-annotations.jar | ||
| share/ozone/lib/jackson-annotations.jar | ||
| share/ozone/lib/jackson-core.jar | ||
| share/ozone/lib/jackson-databind.jar | ||
| share/ozone/lib/jackson-dataformat-cbor.jar | ||
| share/ozone/lib/jackson-dataformat-xml.jar | ||
| share/ozone/lib/jackson-datatype-jsr310.jar | ||
| share/ozone/lib/jackson-module-jaxb-annotations.jar | ||
| share/ozone/lib/jaeger-client.jar | ||
| share/ozone/lib/jaeger-core.jar | ||
| share/ozone/lib/jaeger-thrift.jar | ||
| share/ozone/lib/jaeger-tracerresolver.jar | ||
| share/ozone/lib/jakarta.activation-api.jar | ||
| share/ozone/lib/jakarta.annotation-api.jar | ||
| share/ozone/lib/jakarta.inject.jar | ||
| share/ozone/lib/jakarta.validation-api.jar | ||
| share/ozone/lib/jakarta.ws.rs-api.jar | ||
| share/ozone/lib/jakarta.xml.bind-api.jar | ||
| share/ozone/lib/javassist-GA.jar | ||
| share/ozone/lib/javax.activation-api.jar | ||
| share/ozone/lib/javax.annotation-api.jar | ||
| share/ozone/lib/javax.el-api.jar | ||
| share/ozone/lib/javax.inject.jar | ||
| share/ozone/lib/javax.interceptor-api.jar | ||
| share/ozone/lib/javax.servlet-api.jar | ||
| share/ozone/lib/jaxb-api.jar | ||
| share/ozone/lib/jaxb-core.jar | ||
| share/ozone/lib/jaxb-runtime.jar | ||
| share/ozone/lib/jcip-annotations.jar | ||
| share/ozone/lib/jersey-cdi1x.jar | ||
| share/ozone/lib/jersey-client.jar | ||
| share/ozone/lib/jersey-common.jar | ||
| share/ozone/lib/jersey-container-servlet-core.jar | ||
| share/ozone/lib/jersey-container-servlet.jar | ||
| share/ozone/lib/jersey-core.jar | ||
| share/ozone/lib/jersey-entity-filtering.jar | ||
| share/ozone/lib/jersey-hk2.jar | ||
| share/ozone/lib/jersey-media-jaxb.jar | ||
| share/ozone/lib/jersey-media-json-jackson.jar | ||
| share/ozone/lib/jersey-server.jar | ||
| share/ozone/lib/jersey-server.jar | ||
| share/ozone/lib/jersey-servlet.jar | ||
| share/ozone/lib/jetty-http.v20201120.jar | ||
| share/ozone/lib/jetty-io.v20201120.jar | ||
| share/ozone/lib/jetty-security.v20201120.jar | ||
| share/ozone/lib/jetty-server.v20201120.jar | ||
| share/ozone/lib/jetty-servlet.v20201120.jar | ||
| share/ozone/lib/jetty-util-ajax.v20201120.jar | ||
| share/ozone/lib/jetty-util.v20201120.jar | ||
| share/ozone/lib/jetty-webapp.v20201120.jar | ||
| share/ozone/lib/jetty-xml.v20201120.jar | ||
| share/ozone/lib/jmespath-java.jar | ||
| share/ozone/lib/joda-time.jar | ||
| share/ozone/lib/jooq-codegen.jar | ||
| share/ozone/lib/jooq.jar | ||
| share/ozone/lib/jooq-meta.jar | ||
| share/ozone/lib/jsch.jar | ||
| share/ozone/lib/json-smart.jar | ||
| share/ozone/lib/jsp-api.jar | ||
| share/ozone/lib/jsr305.jar | ||
| share/ozone/lib/jsr311-api.jar | ||
| share/ozone/lib/kerb-admin.jar | ||
| share/ozone/lib/kerb-client.jar | ||
| share/ozone/lib/kerb-common.jar | ||
| share/ozone/lib/kerb-core.jar | ||
| share/ozone/lib/kerb-crypto.jar | ||
| share/ozone/lib/kerb-identity.jar | ||
| share/ozone/lib/kerb-server.jar | ||
| share/ozone/lib/kerb-simplekdc.jar | ||
| share/ozone/lib/kerb-util.jar | ||
| share/ozone/lib/kerby-asn1.jar | ||
| share/ozone/lib/kerby-config.jar | ||
| share/ozone/lib/kerby-pkix.jar | ||
| share/ozone/lib/kerby-util.jar | ||
| share/ozone/lib/kerby-xdr.jar | ||
| share/ozone/lib/kotlin-stdlib-common.jar | ||
| share/ozone/lib/kotlin-stdlib.jar | ||
| share/ozone/lib/leveldbjni-all.jar | ||
| share/ozone/lib/libthrift.jar | ||
| share/ozone/lib/listenablefuture-empty-to-avoid-conflict-with-guava.jar | ||
| share/ozone/lib/log4j-api.jar | ||
| share/ozone/lib/log4j-core.jar | ||
| share/ozone/lib/log4j.jar | ||
| share/ozone/lib/metainf-services.jar | ||
| share/ozone/lib/metrics-core.jar | ||
| share/ozone/lib/netty-buffer.Final.jar | ||
| share/ozone/lib/netty-codec.Final.jar | ||
| share/ozone/lib/netty-codec-http2.Final.jar | ||
| share/ozone/lib/netty-codec-http.Final.jar | ||
| share/ozone/lib/netty-codec-socks.Final.jar | ||
| share/ozone/lib/netty-common.Final.jar | ||
| share/ozone/lib/netty-handler.Final.jar | ||
| share/ozone/lib/netty-handler-proxy.Final.jar | ||
| share/ozone/lib/netty-resolver.Final.jar | ||
| share/ozone/lib/netty-transport.Final.jar | ||
| share/ozone/lib/netty-transport-native-epoll.Final.jar | ||
| share/ozone/lib/netty-transport-native-unix-common.Final.jar | ||
| share/ozone/lib/nimbus-jose-jwt.jar | ||
| share/ozone/lib/okhttp.jar | ||
| share/ozone/lib/okio.jar | ||
| share/ozone/lib/opentracing-api.jar | ||
| share/ozone/lib/opentracing-noop.jar | ||
| share/ozone/lib/opentracing-tracerresolver.jar | ||
| share/ozone/lib/opentracing-util.jar | ||
| share/ozone/lib/osgi-resource-locator.jar | ||
| share/ozone/lib/perfmark-api.jar | ||
| share/ozone/lib/picocli.jar | ||
| share/ozone/lib/protobuf-java.jar | ||
| share/ozone/lib/protobuf-java.jar | ||
| share/ozone/lib/protobuf-java-util.jar | ||
| share/ozone/lib/proto-google-common-protos.jar | ||
| share/ozone/lib/ratis-client-.jar | ||
| share/ozone/lib/ratis-common-.jar | ||
| share/ozone/lib/ratis-grpc-.jar | ||
| share/ozone/lib/ratis-metrics-.jar | ||
| share/ozone/lib/ratis-netty-.jar | ||
| share/ozone/lib/ratis-proto-.jar | ||
| share/ozone/lib/ratis-server-api-.jar | ||
| share/ozone/lib/ratis-server-.jar | ||
| share/ozone/lib/ratis-thirdparty-misc-.jar | ||
| share/ozone/lib/ratis-tools-.jar | ||
| share/ozone/lib/re2j.jar | ||
| share/ozone/lib/rocksdbjni.jar | ||
| share/ozone/lib/simpleclient_common.jar | ||
| share/ozone/lib/simpleclient_dropwizard.jar | ||
| share/ozone/lib/simpleclient.jar | ||
| share/ozone/lib/slf4j-api.jar | ||
| share/ozone/lib/slf4j-log4j12.jar | ||
| share/ozone/lib/snakeyaml.jar | ||
| share/ozone/lib/spring-beans.RELEASE.jar | ||
| share/ozone/lib/spring-core.RELEASE.jar | ||
| share/ozone/lib/spring-jcl.RELEASE.jar | ||
| share/ozone/lib/spring-jdbc.RELEASE.jar | ||
| share/ozone/lib/spring-tx.RELEASE.jar | ||
| share/ozone/lib/sqlite-jdbc.jar | ||
| share/ozone/lib/stax2-api.jar | ||
| share/ozone/lib/stax-ex.jar | ||
| share/ozone/lib/token-provider.jar | ||
| share/ozone/lib/txw2.jar | ||
| share/ozone/lib/weld-servlet.Final.jar | ||
| share/ozone/lib/woodstox-core.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #!/usr/bin/env bash | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
| REPORT_NAME=${1:-jar-report.txt} | ||
|
|
||
| cd "$SCRIPTDIR/../../.." || exit 1 | ||
|
|
||
| OZONE_VERSION=$(mvn help:evaluate -Dexpression=ozone.version -q -DforceStdout) | ||
| DIST_DIR="$SCRIPTDIR/../../../target/ozone-$OZONE_VERSION" | ||
| : ${OZONE_DIST_DIR:=$DIST_DIR} | ||
|
|
||
| cd "$OZONE_DIST_DIR" | ||
|
|
||
| #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' | perl -wpl -e 's/[0-9a-z]+-SNAPSHOT//g' | grep -v jacoco | grep -v hadoop-hdds-test-utils | sort > "$SCRIPTDIR"/$REPORT_NAME | ||
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.
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 lessperlcommand, 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.