This is an automated email from the ASF dual-hosted git repository.

roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git


The following commit(s) were added to refs/heads/master by this push:
     new ce20683ad [MINOR] Improve(script): Change intellij launch config file 
name and local-dev conf folder (#2008)
ce20683ad is described below

commit ce20683ad1a6eb0d55a6f91b0c7c80b88db24259
Author: maobaolong <baoloong...@tencent.com>
AuthorDate: Mon Aug 12 10:22:31 2024 +0800

    [MINOR] Improve(script): Change intellij launch config file name and 
local-dev conf folder (#2008)
    
    
    ### What changes were proposed in this pull request?
    
    - Copy local_dev conf to .idea folder which a folder in `.gitignore`, so, 
local_dev conf changes are not tracked by git.
    - Remove the xml suffix of `runConfigurations/xxx.xml`, if not, intellij 
idea will find it and load the configurations into idea, after that, any idea 
launch configuration change will persist to these files, what is not we want. 
Remove the xml suffix can make idea don't treat these files as launch 
configuration files.
    
    ### Why are the changes needed?
    
    Without this change, any local purpose change will tracked by git, this 
make contributors busy to revert changes or push local changes to git 
repository by accident.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Just run the `incubator-uniffle/dev/intellij/install-runconfig.sh`
---
 dev/intellij/install-runconfig.sh                                | 9 +++++++--
 .../CoordinatorServer.run.xml => runConfs/CoordinatorServer.run} | 4 ++--
 .../Dashboard.run.xml => runConfs/Dashboard.run}                 | 4 ++--
 .../ShuffleServer.run.xml => runConfs/ShuffleServer.run}         | 4 ++--
 {conf/local_dev => dev/local_dev_template}/coordinator.conf      | 0
 {conf/local_dev => dev/local_dev_template}/dashboard.conf        | 0
 {conf/local_dev => dev/local_dev_template}/log4j2.xml            | 0
 {conf/local_dev => dev/local_dev_template}/server.conf           | 0
 8 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/dev/intellij/install-runconfig.sh 
b/dev/intellij/install-runconfig.sh
index e743ed684..f290afa5c 100755
--- a/dev/intellij/install-runconfig.sh
+++ b/dev/intellij/install-runconfig.sh
@@ -22,7 +22,12 @@ set -o nounset   # exit the script if you try to use an 
uninitialised variable
 set -o errexit   # exit the script if any statement returns a non-true return 
value
 
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-SRC_DIR="$SCRIPT_DIR/runConfigurations"
-DEST_DIR="$SCRIPT_DIR/../../.idea/runConfigurations/"
+SRC_DIR="$SCRIPT_DIR/runConfs"
+DEST_DIR="$SCRIPT_DIR/../../.idea/runConfigurations1/"
+mkdir -p "$DEST_DIR"
+ls -1 "$SRC_DIR" | xargs -n1 -I FILE cp "$SRC_DIR/FILE" "$DEST_DIR/FILE.xml"
+
+SRC_DIR="$SCRIPT_DIR/../../dev/local_dev_template"
+DEST_DIR="$SCRIPT_DIR/../../.idea/local_dev1/"
 mkdir -p "$DEST_DIR"
 ls -1 "$SRC_DIR" | xargs -n1 -I FILE cp "$SRC_DIR/FILE" "$DEST_DIR"
diff --git a/dev/intellij/runConfigurations/CoordinatorServer.run.xml 
b/dev/intellij/runConfs/CoordinatorServer.run
similarity index 92%
rename from dev/intellij/runConfigurations/CoordinatorServer.run.xml
rename to dev/intellij/runConfs/CoordinatorServer.run
index c0e7bc74d..69ec9de90 100644
--- a/dev/intellij/runConfigurations/CoordinatorServer.run.xml
+++ b/dev/intellij/runConfs/CoordinatorServer.run
@@ -19,8 +19,8 @@
     <option name="INCLUDE_PROVIDED_SCOPE" value="true" />
     <option name="MAIN_CLASS_NAME" 
value="org.apache.uniffle.coordinator.CoordinatorServer" />
     <module name="coordinator" />
-    <option name="PROGRAM_PARAMETERS" value="--conf 
$PROJECT_DIR$/conf/local_dev/coordinator.conf" />
-    <option name="VM_PARAMETERS" 
value="-Dlog4j2.configurationFile=file:$PROJECT_DIR$/conf/local_dev/log4j2.xml 
-Dlog.path=$PROJECT_DIR$/logs/coordinator.log" />
+    <option name="PROGRAM_PARAMETERS" value="--conf 
$PROJECT_DIR$/.idea/local_dev/coordinator.conf" />
+    <option name="VM_PARAMETERS" 
value="-Dlog4j2.configurationFile=file:$PROJECT_DIR$/.idea/local_dev/log4j2.xml 
-Dlog.path=$PROJECT_DIR$/logs/coordinator.log" />
     <extension name="coverage">
       <pattern>
         <option name="PATTERN" value="org.apache.uniffle.coordinator.*" />
diff --git a/dev/intellij/runConfigurations/Dashboard.run.xml 
b/dev/intellij/runConfs/Dashboard.run
similarity index 92%
rename from dev/intellij/runConfigurations/Dashboard.run.xml
rename to dev/intellij/runConfs/Dashboard.run
index 825d10018..5f3d953db 100644
--- a/dev/intellij/runConfigurations/Dashboard.run.xml
+++ b/dev/intellij/runConfs/Dashboard.run
@@ -19,8 +19,8 @@
     <option name="INCLUDE_PROVIDED_SCOPE" value="true" />
     <option name="MAIN_CLASS_NAME" 
value="org.apache.uniffle.dashboard.web.Dashboard" />
     <module name="dashboard" />
-    <option name="PROGRAM_PARAMETERS" value="--conf 
$PROJECT_DIR$/conf/local_dev/dashboard.conf" />
-    <option name="VM_PARAMETERS" 
value="-Dlog4j2.configurationFile=file:$PROJECT_DIR$/conf/local_dev/log4j2.xml 
-Dlog.path=$PROJECT_DIR$/logs/dashboard.log" />
+    <option name="PROGRAM_PARAMETERS" value="--conf 
$PROJECT_DIR$/.idea/local_dev/dashboard.conf" />
+    <option name="VM_PARAMETERS" 
value="-Dlog4j2.configurationFile=file:$PROJECT_DIR$/.idea/local_dev/log4j2.xml 
-Dlog.path=$PROJECT_DIR$/logs/dashboard.log" />
     <extension name="coverage">
       <pattern>
         <option name="PATTERN" value="org.apache.uniffle.dashboard.web.*" />
diff --git a/dev/intellij/runConfigurations/ShuffleServer.run.xml 
b/dev/intellij/runConfs/ShuffleServer.run
similarity index 92%
rename from dev/intellij/runConfigurations/ShuffleServer.run.xml
rename to dev/intellij/runConfs/ShuffleServer.run
index 4a05a752e..0f29a1b05 100644
--- a/dev/intellij/runConfigurations/ShuffleServer.run.xml
+++ b/dev/intellij/runConfs/ShuffleServer.run
@@ -19,8 +19,8 @@
     <option name="INCLUDE_PROVIDED_SCOPE" value="true" />
     <option name="MAIN_CLASS_NAME" 
value="org.apache.uniffle.server.ShuffleServer" />
     <module name="shuffle-server" />
-    <option name="PROGRAM_PARAMETERS" value="--conf 
$PROJECT_DIR$/conf/local_dev/server.conf" />
-    <option name="VM_PARAMETERS" 
value="-Dlog4j2.configurationFile=file:$PROJECT_DIR$/conf/local_dev/log4j2.xml 
-Dlog.path=$PROJECT_DIR$/logs/shuffle_server.log" />
+    <option name="PROGRAM_PARAMETERS" value="--conf 
$PROJECT_DIR$/.idea/local_dev/server.conf" />
+    <option name="VM_PARAMETERS" 
value="-Dlog4j2.configurationFile=file:$PROJECT_DIR$/.idea/local_dev/log4j2.xml 
-Dlog.path=$PROJECT_DIR$/logs/shuffle_server.log" />
     <extension name="coverage">
       <pattern>
         <option name="PATTERN" value="org.apache.uniffle.server.*" />
diff --git a/conf/local_dev/coordinator.conf 
b/dev/local_dev_template/coordinator.conf
similarity index 100%
rename from conf/local_dev/coordinator.conf
rename to dev/local_dev_template/coordinator.conf
diff --git a/conf/local_dev/dashboard.conf 
b/dev/local_dev_template/dashboard.conf
similarity index 100%
rename from conf/local_dev/dashboard.conf
rename to dev/local_dev_template/dashboard.conf
diff --git a/conf/local_dev/log4j2.xml b/dev/local_dev_template/log4j2.xml
similarity index 100%
rename from conf/local_dev/log4j2.xml
rename to dev/local_dev_template/log4j2.xml
diff --git a/conf/local_dev/server.conf b/dev/local_dev_template/server.conf
similarity index 100%
rename from conf/local_dev/server.conf
rename to dev/local_dev_template/server.conf

Reply via email to