-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-42599][CONNECT][INFRA] Introduce dev/connect-jvm-client-mima-check instead of CompatibilitySuite
#40191
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
Changes from all commits
9d99b39
adbd5df
373fe6a
7e0b96a
ed49ca0
7a9e26b
4b93767
5c14dae
b913c9a
ef029b1
ddac49f
ad78165
4e63fb9
2888902
f389143
067167c
a5a193a
0cfd327
e25ec88
af06d40
dd35cf6
66db38c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| #!/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 -o pipefail | ||
| set -e | ||
|
|
||
| # Go to the Spark project root directory | ||
| FWDIR="$(cd "`dirname "$0"`"/..; pwd)" | ||
| cd "$FWDIR" | ||
| export SPARK_HOME=$FWDIR | ||
| echo $SPARK_HOME | ||
|
|
||
| if [[ -x "$JAVA_HOME/bin/java" ]]; then | ||
| JAVA_CMD="$JAVA_HOME/bin/java" | ||
| else | ||
| JAVA_CMD=java | ||
| fi | ||
|
|
||
| rm -f .connect-mima-check-result | ||
|
|
||
| TOOLS_CLASSPATH="$(build/sbt -DcopyDependencies=false "export tools/fullClasspath" | grep jar | tail -n1)" | ||
| CORE_CLASSPATH="$(build/sbt -DcopyDependencies=false "export core/fullClasspath" | grep jar | tail -n1)" | ||
| CATALYST_CLASSPATH="$(build/sbt -DcopyDependencies=false "export catalyst/fullClasspath" | grep jar | tail -n1)" | ||
|
|
||
| echo "Build sql module ..." | ||
| build/sbt sql/package | ||
| echo "Build connect-client-jvm module ..." | ||
| build/sbt connect-client-jvm/assembly | ||
|
|
||
| echo "Do connect-client-jvm module mima check ..." | ||
|
|
||
| $JAVA_CMD \ | ||
| -Xmx2g \ | ||
| -XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.util.jar=ALL-UNNAMED \ | ||
| -cp "$TOOLS_CLASSPATH:$CORE_CLASSPATH:$CATALYST_CLASSPATH" \ | ||
| org.apache.spark.tools.CheckConnectJvmClientCompatibility | ||
|
|
||
| RESULT_SIZE=$(wc -l .connect-mima-check-result | awk '{print $1}') | ||
|
|
||
| # The the file has no content if check passed. | ||
| if [[ $RESULT_SIZE -eq "0" ]]; then | ||
| ERRORS="" | ||
| else | ||
| ERRORS=$(grep ERROR .connect-mima-check-result | tail -n1) | ||
| fi | ||
|
|
||
| if test ! -z "$ERRORS"; then | ||
| cat .connect-mima-check-result | ||
| echo -e "connect-client-jvm module mima check failed." | ||
| echo -e "Exceptions to binary compatibility can be added in tools/CheckConnectJvmClientCompatibility.scala" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we keep the file
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to the previous habit, the In addition, the If we are sure we don't need to check
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another pr #40213 keep
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, I vote for change #40213 Thanks! |
||
| rm .connect-mima-check-result | ||
| exit 1 | ||
| else | ||
| rm .connect-mima-check-result | ||
| echo -e "sql and connect-client-jvm module mima check passed." | ||
| fi | ||
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.
Why make this private[sql]? For advanced use cases this is a better way of interacting with results.