From d41fcd1da40d98510ff51aca00dc9f34572925e4 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 1 Nov 2022 14:55:34 -0400 Subject: [PATCH 1/2] ci: not to check flatten plugin behavior We have had the check for the flatten-maven-plugin in each Cloud Java client repository. However, the behavior of the plugin has been stable and its not each repository's responsibility to assert the plugin's behavior. A new check has added at the googleapis/java-shared-config repository to assert the plugin's behavior when we upgrade its version. --- .kokoro/dependencies.sh | 55 ----------------------------------------- owlbot.py | 1 - 2 files changed, 56 deletions(-) diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 545820622f..aa3d8c7b13 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -56,58 +56,3 @@ retry_with_backoff 3 10 \ -Dclirr.skip=true mvn -B dependency:analyze -DfailOnWarning=true - -echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" -## Run dependency list completeness check -function completenessCheck() { - # Output dep list with compile scope generated using the original pom - # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. - # This is stripped from the output as it is not present in the flattened pom. - # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. - msg "Generating dependency list using original pom..." - # Excluding commons-codec,commons-logging from the comparison as a temp fix - # Explanation and issue filed in maven-dependency-plugin: https://issues.apache.org/jira/browse/MDEP-737 - mvn dependency:list -f pom.xml -DexcludeArtifactIds=commons-codec,commons-logging,grpc-googleapis -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// >.org-list.txt - - # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) - msg "Generating dependency list using flattened pom..." - # Excluding commons-codec,commons-logging from the comparison as a temp fix - # Explanation and issue filed in maven-dependency-plugin: https://issues.apache.org/jira/browse/MDEP-737 - mvn dependency:list -f .flattened-pom.xml -DexcludeArtifactIds=commons-codec,commons-logging,grpc-googleapis -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt - - # Compare two dependency lists - msg "Comparing dependency lists..." - diff .org-list.txt .new-list.txt >.diff.txt - if [[ $? == 0 ]] - then - msg "Success. No diff!" - else - msg "Diff found. See below: " - msg "You can also check .diff.txt file located in $1." - cat .diff.txt - return 1 - fi -} - -# Allow failures to continue running the script -set +e - -error_count=0 -for path in $(find -name ".flattened-pom.xml") -do - # Check flattened pom in each dir that contains it for completeness - dir=$(dirname "$path") - pushd "$dir" - completenessCheck "$dir" - error_count=$(($error_count + $?)) - popd -done - -if [[ $error_count == 0 ]] -then - msg "All checks passed." - exit 0 -else - msg "Errors found. See log statements above." - exit 1 -fi diff --git a/owlbot.py b/owlbot.py index 54ebff8614..bf1878a29c 100644 --- a/owlbot.py +++ b/owlbot.py @@ -19,7 +19,6 @@ java.common_templates(excludes=[ '.kokoro/nightly/samples.cfg', '.kokoro/presubmit/samples.cfg', - '.kokoro/dependencies.sh', 'codecov.yaml', 'renovate.json', '.kokoro/build.sh' From c0ae4fa8fdb358660e3b6c8f014d8c5403a101a3 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 1 Nov 2022 19:00:11 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/dependencies.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index aa3d8c7b13..bd8960246f 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -14,6 +14,7 @@ # limitations under the License. set -eo pipefail +shopt -s nullglob ## Get the directory of the build script scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) @@ -41,9 +42,9 @@ function determineMavenOpts() { then # MaxPermSize is no longer supported as of jdk 17 echo -n "-Xmx1024m" - else + else echo -n "-Xmx1024m -XX:MaxPermSize=128m" - fi + fi } export MAVEN_OPTS=$(determineMavenOpts)