You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "cfmcgrady (via GitHub)" <gi...@apache.org> on 2023/09/18 14:00:47 UTC

[GitHub] [incubator-celeborn] cfmcgrady opened a new pull request, #1921: [CELEBORN-XXX][WIP] Add support for making distribution package via SBT

cfmcgrady opened a new pull request, #1921:
URL: https://github.com/apache/incubator-celeborn/pull/1921

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     - Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX] Your PR title ...'.
     - Be sure to keep the PR description updated to reflect all changes.
     - Please write your PR title to summarize what this PR proposes.
     - If possible, provide a concise example to reproduce the issue for a faster review.
   -->
   
   ### What changes were proposed in this pull request?
   
   
   
   ### Why are the changes needed?
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   
   
   ### How was this patch tested?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] cfmcgrady commented on pull request #1921: [CELEBORN-989] Add support for making distribution package via SBT

Posted by "cfmcgrady (via GitHub)" <gi...@apache.org>.
cfmcgrady commented on PR #1921:
URL: https://github.com/apache/incubator-celeborn/pull/1921#issuecomment-1724860017

   cc @pan3793 @FMX 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] cxzl25 commented on a diff in pull request #1921: [CELEBORN-989] Add support for making distribution package via SBT

Posted by "cxzl25 (via GitHub)" <gi...@apache.org>.
cxzl25 commented on code in PR #1921:
URL: https://github.com/apache/incubator-celeborn/pull/1921#discussion_r1330368883


##########
build/make-distribution.sh:
##########
@@ -236,42 +241,133 @@ function build_mr_client {
     cp "$PROJECT_DIR"/client-mr/mr-shaded/target/celeborn-client-mr-shaded_${SCALA_VERSION}-$VERSION.jar "$DIST_DIR/mr/"
 }
 
-if [ "$RELEASE" == "true" ]; then
-  build_service
-  build_spark_client -Pspark-2.4
-  build_spark_client -Pspark-3.4
-  build_flink_client -Pflink-1.14
-  build_flink_client -Pflink-1.15
-  build_flink_client -Pflink-1.17
-  build_mr_client mr
+
+#########################
+#     sbt functions     #
+#########################
+
+function sbt_build_service {
+  VERSION=$("$SBT" "Show / version" | awk '/\[info\]/{ver=$2} END{print ver}')
+
+  SCALA_VERSION=$("$SBT" "Show / scalaBinaryVersion" | awk '/\[info\]/{ver=$2} END{print ver}')
+
+  echo "Celeborn version is $VERSION"
+  echo "Making apache-celeborn-$VERSION-$NAME.tgz"
+
+  echo "Celeborn $VERSION$GITREVSTRING" > "$DIST_DIR/RELEASE"
+  echo "Build flags: $@" >> "$DIST_DIR/RELEASE"
+
+  BUILD_COMMAND=("$SBT" clean package $@)
+
+  # Actually build the jar
+  echo -e "\nBuilding with..."
+  echo -e "\$ ${BUILD_COMMAND[@]}\n"
+
+  "${BUILD_COMMAND[@]}"
+
+  $SBT "celeborn-master/copyJars;celeborn-worker/copyJars"
+
+  mkdir -p "$DIST_DIR/jars"
+  mkdir -p "$DIST_DIR/master-jars"
+  mkdir -p "$DIST_DIR/worker-jars"
+
+  ## Copy master jars
+  cp "$PROJECT_DIR"/master/target/scala-$SCALA_VERSION/celeborn-master_$SCALA_VERSION-$VERSION.jar "$DIST_DIR/master-jars/"
+  cp "$PROJECT_DIR"/master/target/scala-$SCALA_VERSION/jars/*.jar "$DIST_DIR/jars/"
+  for jar in $(ls "$PROJECT_DIR/master/target/scala-$SCALA_VERSION/jars"); do
+    (cd $DIST_DIR/master-jars; ln -snf "../jars/$jar" .)
+  done
+  ## Copy worker jars
+  cp "$PROJECT_DIR"/worker/target/scala-$SCALA_VERSION/celeborn-worker_$SCALA_VERSION-$VERSION.jar "$DIST_DIR/worker-jars/"
+  cp "$PROJECT_DIR"/worker/target/scala-$SCALA_VERSION/jars/*.jar "$DIST_DIR/jars/"
+  for jar in $(ls "$PROJECT_DIR/worker/target/scala-$SCALA_VERSION/jars"); do
+    (cd $DIST_DIR/worker-jars; ln -snf "../jars/$jar" .)
+  done
+}
+
+function sbt_build_client {
+  PROFILE="$1"
+  # get the client shaded project
+  CLIENT_PROJECT=$("$SBT" "$PROFILE" projects | grep shaded | awk '{print$2}')
+  # get the shaded jar file path
+  ASSEMBLY_OUTPUT_PATH=$("$SBT" "$PROFILE" "show $CLIENT_PROJECT/assembly/assemblyOutputPath" | awk '/\[info\]/{ver=$2} END{print ver}')
+  # build the shaded jar
+  $SBT $PROFILE "clean;$CLIENT_PROJECT/assembly"
+
+  PROFILE_PREFIX=$(echo "$PROFILE" | cut -d'-' -f2)
+  CLIENT_SUB_DIR="${PROFILE_PREFIX:1}"
+  mkdir -p "$DIST_DIR/$CLIENT_SUB_DIR"
+  cp "$ASSEMBLY_OUTPUT_PATH" "$DIST_DIR/$CLIENT_SUB_DIR/"
+}
+
+
+if [ "$SBT_ENABLED" == "true" ]; then
+  sbt_build_service

Review Comment:
   ```suggestion
     sbt_build_service "$@"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] cfmcgrady commented on pull request #1921: [CELEBORN-989] Add support for making distribution package via SBT

Posted by "cfmcgrady (via GitHub)" <gi...@apache.org>.
cfmcgrady commented on PR #1921:
URL: https://github.com/apache/incubator-celeborn/pull/1921#issuecomment-1726770877

   thanks for the review. @pan3793 @cxzl25 
   
   merging to main(v0.4.0).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] cfmcgrady closed pull request #1921: [CELEBORN-989] Add support for making distribution package via SBT

Posted by "cfmcgrady (via GitHub)" <gi...@apache.org>.
cfmcgrady closed pull request #1921: [CELEBORN-989] Add support for making distribution package via SBT
URL: https://github.com/apache/incubator-celeborn/pull/1921


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] codecov[bot] commented on pull request #1921: [CELEBORN-XXX][WIP] Add support for making distribution package via SBT

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #1921:
URL: https://github.com/apache/incubator-celeborn/pull/1921#issuecomment-1724795527

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1921?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#1921](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1921?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (7cc4b4a) into [main](https://app.codecov.io/gh/apache/incubator-celeborn/commit/fbeb5a62ecf2451f15c8b05491c1a6ef2e46a106?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (fbeb5a6) will **increase** coverage by `0.06%`.
   > Report is 6 commits behind head on main.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##             main    #1921      +/-   ##
   ==========================================
   + Coverage   46.57%   46.62%   +0.06%     
   ==========================================
     Files         164      164              
     Lines       10246    10280      +34     
     Branches      937      938       +1     
   ==========================================
   + Hits         4771     4792      +21     
   - Misses       5160     5172      +12     
   - Partials      315      316       +1     
   ```
   
   
   [see 3 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1921/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org