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

gaojun2048 pushed a commit to branch test_ci
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


The following commit(s) were added to refs/heads/test_ci by this push:
     new 3ace2551e A fix ci (#3284)
3ace2551e is described below

commit 3ace2551e1884e66a706a86f7a8794bcc9484d60
Author: Eric <[email protected]>
AuthorDate: Thu Nov 3 15:13:17 2022 +0800

    A fix ci (#3284)
    
    * add -am to dependency:tree mvn
    
    * fix ci error
---
 .github/workflows/backend.yml                      | 15 ++++++++++++---
 tools/update_modules_check/update_modules_check.py | 14 +++++++++++++-
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml
index 6acabf004..d525e4b8c 100644
--- a/.github/workflows/backend.yml
+++ b/.github/workflows/backend.yml
@@ -201,8 +201,13 @@ jobs:
           modules='${{ steps.engine-modules.outputs.modules }}${{ 
steps.cv2-modules.outputs.modules }}'
           modules=${modules: 1}
           pl_modules=`python 
tools/update_modules_check/update_modules_check.py replace $modules`
-          ./mvnw -Pno_dist -D"e2e.dependency.skip"=false  dependency:tree 
-DoutputType=text -DoutputFile=/tmp/tree_out.txt -amd -pl $pl_modules -c
+          ./mvnw help:evaluate -Dexpression=project.modules -q -DforceStdout 
-pl $pl_modules > /tmp/sub_module.txt
+          sub_modules=`python 
tools/update_modules_check/update_modules_check.py sub /tmp/sub_module.txt`
+          tree_modules="$modules$sub_modules"
+          includes=`python tools/update_modules_check/update_modules_check.py 
tree $tree_modules`
+          ./mvnw -Pno_dist -D"e2e.dependency.skip"=false  dependency:tree 
$includes -DoutputType=text -DoutputFile=/tmp/tree_out.txt
           build_modules=`python 
tools/update_modules_check/update_modules_check.py final_ut /tmp/tree_out.txt`
+          build_modules=${build_modules: 1}
           echo $build_modules
           echo "modules=$build_modules" >> $GITHUB_OUTPUT
 
@@ -211,10 +216,14 @@ jobs:
         if: ${{ steps.filter.outputs.api == 'false' }}
         run: |
           modules='${{ steps.cv2-e2e-modules.outputs.modules }}${{ 
steps.cv2-flink-e2e-modules.outputs.modules }}${{ 
steps.cv2-spark-e2e-modules.outputs.modules }}${{ 
steps.engine-e2e-modules.outputs.modules }}${{ 
steps.engine-modules.outputs.modules }}${{ steps.cv2-modules.outputs.modules }}'
-          modules=${modules: 1}
           pl_modules=`python 
tools/update_modules_check/update_modules_check.py replace $modules`
-          ./mvnw -Pno_dist -D"e2e.dependency.skip"=false  dependency:tree 
-DoutputType=text -DoutputFile=/tmp/tree_out.txt -amd -pl $pl_modules -c
+          ./mvnw help:evaluate -Dexpression=project.modules -q -DforceStdout 
-pl $pl_modules > /tmp/sub_module.txt
+          sub_modules=`python 
tools/update_modules_check/update_modules_check.py sub /tmp/sub_module.txt`
+          tree_modules="$modules$sub_modules"
+          includes=`python tools/update_modules_check/update_modules_check.py 
tree $tree_modules`
+          ./mvnw -Pno_dist -D"e2e.dependency.skip"=false  dependency:tree 
$includes -DoutputType=text -DoutputFile=/tmp/tree_out.txt
           build_modules=`python 
tools/update_modules_check/update_modules_check.py final_it /tmp/tree_out.txt`
+          build_modules=${build_modules: 1}
           echo $build_modules
           echo "modules=$build_modules" >> $GITHUB_OUTPUT
 
diff --git a/tools/update_modules_check/update_modules_check.py 
b/tools/update_modules_check/update_modules_check.py
index 8c104a2c4..c135d7c99 100644
--- a/tools/update_modules_check/update_modules_check.py
+++ b/tools/update_modules_check/update_modules_check.py
@@ -63,6 +63,17 @@ def replace_comma_to_commacolon(modules_str):
     modules_str = ":" + modules_str
     print(modules_str)
 
+def get_sub_modules(file):
+    f = open(file, 'rb')
+    output = ""
+    for line in f.readlines():
+        line = line.replace(" ","")
+        if line.startswith("<string>"):
+            line = line.replace(" ","").replace("<string>", 
"").replace("</string>", "").replace("\n", "")
+            output = output + "," + line
+
+    print(output)
+
 def get_dependency_tree_includes(modules_str):
     modules = modules_str.split(',')
     output = ""
@@ -96,7 +107,6 @@ def get_final_ut_modules(file):
             if con[2] == "jar":
                 output = output + "," + ":" + con[1]
 
-    output = output[1:len(output)]
     print(output)
 
 def main(argv):
@@ -120,6 +130,8 @@ def main(argv):
         get_final_ut_modules(argv[2])
     elif argv[1] == "replace":
         replace_comma_to_commacolon(argv[2])
+    elif argv[1] == "sub":
+        get_sub_modules(argv[2])
 
 if __name__ == "__main__":
     main(sys.argv)
\ No newline at end of file

Reply via email to