From 895d0a8e37d957154bbe55ce43cfb053fe2ed64d Mon Sep 17 00:00:00 2001 From: dianguangyan001 <66503737+dianguangyan001@users.noreply.github.com> Date: Mon, 3 Mar 2025 14:49:06 +0800 Subject: [PATCH 1/5] Update 01-intro.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WebSkcket变更WebSocket --- docs/zh/08-operation/01-intro.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh/08-operation/01-intro.md b/docs/zh/08-operation/01-intro.md index e7d7641808..6f3295448a 100644 --- a/docs/zh/08-operation/01-intro.md +++ b/docs/zh/08-operation/01-intro.md @@ -77,7 +77,7 @@ taosX Agent 是 TDengine Enterprise 数据管道功能的重要组成部分, 这些应用程序负责向业务集群写入、查询业务数据以及订阅数据。应用程序可以通过以下 3 种方式与业务集群进行交互。 - 基于 taosc 的应用程序:采用原生连接的应用程序,直接连接到业务集群,默认端口为 6030。 - 基于 RESTful 连接的应用程序:使用 RESTful 接口访问业务集群的应用程序,需要通过 taosAdapter 进行连接,默认端口为 6041。 -- 基于 WebSkcket 连接的应用程序:采用 WebSocket 连接的应用程序,同样需要通过 taosAdapter 进行连接,默认端口为 6041。 +- 基于 WebSocket 连接的应用程序:采用 WebSocket 连接的应用程序,同样需要通过 taosAdapter 进行连接,默认端口为 6041。 2. 可视化/BI 工具 @@ -85,4 +85,4 @@ TDengine 支持与众多可视化及 BI 工具无缝对接,如 Grafana、Power 3. 数据源 -TDengine 具备强大的数据接入能力,可以对接各种数据源,如 MQTT、OPC-UA/DA、Kafka、AVEVA PI System、AVEVA Historian 等。这使得 TDengine 能够轻松整合来自不同数据源的数据,为用户提供全面、统一的数据视图。 \ No newline at end of file +TDengine 具备强大的数据接入能力,可以对接各种数据源,如 MQTT、OPC-UA/DA、Kafka、AVEVA PI System、AVEVA Historian 等。这使得 TDengine 能够轻松整合来自不同数据源的数据,为用户提供全面、统一的数据视图。 From d4281aa4b60869b93302521e1c2b1f01711bdda9 Mon Sep 17 00:00:00 2001 From: Feng Chao Date: Mon, 3 Mar 2025 14:56:54 +0800 Subject: [PATCH 2/5] ci: add windows build and test job to ci workflow --- .github/workflows/taosd-ci.yml | 146 ++++++++++++++++++++++++++++++++- 1 file changed, 143 insertions(+), 3 deletions(-) diff --git a/.github/workflows/taosd-ci.yml b/.github/workflows/taosd-ci.yml index 5be958adf7..f1ba0072f0 100644 --- a/.github/workflows/taosd-ci.yml +++ b/.github/workflows/taosd-ci.yml @@ -65,7 +65,7 @@ jobs: # check whether to run function test cases changed_files_non_tdgpt=$(git --no-pager diff --name-only FETCH_HEAD `git merge-base FETCH_HEAD $target_branch`|grep -v "^docs/en/"|grep -v "^docs/zh/"|grep -v ".md$" | grep -Ev "forecastoperator.c|anomalywindowoperator.c|tanalytics.h|tanalytics.c|tdgpt_cases.task|analytics" | tr '\n' ' ' ||:) - if [ $changed_files_non_tdgpt != '' ]; then + if [ "$changed_files_non_tdgpt" != '' ]; then run_function_test="true" else run_function_test="false" @@ -167,14 +167,17 @@ jobs: changed_files_non_doc=$(git --no-pager diff --name-only FETCH_HEAD `git merge-base FETCH_HEAD ${{ env.TARGET_BRANCH }}`|grep -v "^docs/en/"|grep -v "^docs/zh/"|grep -v ".md$" | tr '\n' ' ' || :) echo $changed_files_non_doc > ${{ env.WKDIR }}/tmp/${{ env.PR_NUMBER }}_${{ github.run_number }}/docs_changed.txt - name: Check assert testing + if: ${{ env.IS_TDINTERNAL == 'false' }} run: | cd ${{ env.WKC }}/tests/parallel_test ./run_check_assert_container.sh -d ${{ env.WKDIR }} - name: Check void function testing + if: ${{ env.IS_TDINTERNAL == 'false' }} run: | cd ${{ env.WKC }}/tests/parallel_test ./run_check_void_container.sh -d ${{ env.WKDIR }} - name: Build docker container + if: ${{ env.RUN_RUNCTION_TEST == 'true' }} run: | date rm -rf ${{ env.WKC }}/debug @@ -204,6 +207,7 @@ jobs: echo "timeout_cmd=$timeout_cmd" >> $GITHUB_OUTPUT echo "extra_param=$extra_param" >> $GITHUB_OUTPUT - name: Run function returns with a null pointer scan testing + if: ${{ env.IS_TDINTERNAL == 'false' }} run: | cd ${{ env.WKC }}/tests/parallel_test ./run_scan_container.sh -d ${{ env.WKDIR }} -b ${{ env.PR_NUMBER }}_${{ github.run_number }} -f ${{ env.WKDIR }}/tmp/${{ env.PR_NUMBER }}_${{ github.run_number }}/docs_changed.txt ${{ steps.get_param.outputs.extra_param }} @@ -215,7 +219,7 @@ jobs: date timeout 600 time ./run.sh -e -m /home/m.json -t tdgpt_cases.task -b ${{ env.PR_NUMBER }}_${{ github.run_number }} -l ${{ env.WKDIR }}/log -o 300 ${{ steps.get_param.outputs.extra_param }} - name: Run function test cases - if: ${{ env.RUN_RUNCTION_TEST }} == 'true' + if: ${{ env.RUN_RUNCTION_TEST == 'true'}} run: | cd ${{ env.WKC }}/tests/parallel_test export DEFAULT_RETRY_TIME=2 @@ -224,7 +228,7 @@ jobs: run-tests-on-mac: needs: fetch-parameters - if: ${{ needs.fetch-parameters.outputs.run_function_test == 'false' }} + if: ${{ needs.fetch-parameters.outputs.run_function_test == 'true' }} runs-on: group: CI labels: [self-hosted, macOS, ARM64, testing] @@ -313,3 +317,139 @@ jobs: make -j10 ctest -j10 || exit 7 date + + run-tests-on-windows: + needs: fetch-parameters + if: ${{ needs.fetch-parameters.outputs.run_function_test == 'true' }} + runs-on: + group: CI + labels: [self-hosted, Windows, X64, testing] + timeout-minutes: 126 + env: + IS_TDINTERNAL: ${{ needs.fetch-parameters.outputs.tdinternal }} + SOURCE_BRANCH: ${{ needs.fetch-parameters.outputs.source_branch }} + TARGET_BRANCH: ${{ needs.fetch-parameters.outputs.target_branch }} + PR_NUMBER: ${{ needs.fetch-parameters.outputs.pr_number }} + WIN_INTERNAL_ROOT: "C:\\workspace\\TDinternal" + WIN_COMMUNITY_ROOT: "C:\\workspace\\TDinternal\\community" + WIN_SYSTEM_TEST_ROOT: "C:\\workspace\\TDinternal\\community\\tests\\system-test" + WIN_VS_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat" + WIN_CPU_TYPE: "x64" + steps: + - name: Output the environment information + run: | + hostname + taskkill /f /t /im python.exe + taskkill /f /t /im bash.exe + taskkill /f /t /im taosd.exe + ipconfig + set + date /t + time /t + rd /s /Q "%WIN_INTERNAL_ROOT%\debug" || exit 0 + shell: cmd + - name: Prepare repositories + run: | + :: Prepare internal repository + if exist "%WIN_INTERNAL_ROOT%" ( + cd /d "%WIN_INTERNAL_ROOT%" + git reset --hard + git clean -f + git remote prune origin + git fetch + git checkout "%TARGET_BRANCH%" + ) else ( + echo Directory does not exist: "%WIN_INTERNAL_ROOT%" + ) + + :: Prepare community repository + if exist "%WIN_COMMUNITY_ROOT%" ( + cd /d "%WIN_COMMUNITY_ROOT%" + git reset --hard + git clean -f + git remote prune origin + git fetch + git checkout "%TARGET_BRANCH%" + ) else ( + echo Directory does not exist: "%WIN_COMMUNITY_ROOT%" + ) + shell: cmd + - name: Get latest codes and logs for TDinternal PR + if: ${{ env.IS_TDINTERNAL == 'true' }} + run: | + cd %WIN_INTERNAL_ROOT% + git pull origin %TARGET_BRANCH% + git fetch origin +refs/pull/%PR_NUMBER%/merge + git checkout -qf FETCH_HEAD + cd %WIN_COMMUNITY_ROOT% + git remote prune origin + git pull + shell: cmd + - name: Get latest codes and logs for TDengine PR + if: ${{ env.IS_TDINTERNAL == 'false' }} + run: | + cd %WIN_INTERNAL_ROOT% + git pull origin %TARGET_BRANCH% + cd %WIN_COMMUNITY_ROOT% + git remote prune origin + git pull origin %TARGET_BRANCH% + git fetch origin +refs/pull/%PR_NUMBER%/merge + git checkout -qf FETCH_HEAD + shell: cmd + - name: Output branch and log information + run: | + cd %WIN_INTERNAL_ROOT% + git branch + git log -5 + + cd %WIN_COMMUNITY_ROOT% + git branch + git log -5 + shell: cmd + - name: Update submodule + run: | + cd %WIN_COMMUNITY_ROOT% + git submodule update --init --recursive + shell: cmd + - name: Build on windows + run: | + echo "building ..." + time /t + cd %WIN_INTERNAL_ROOT% + mkdir debug + cd debug + time /t + call "%WIN_VS_PATH%" %WIN_CPU_TYPE% + set CL=/MP8 + echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> cmake" + time /t + cmake .. -G "NMake Makefiles JOM" -DBUILD_TEST=true -DBUILD_TOOLS=true || exit 7 + echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> jom -j 6" + time /t + jom -j 6 || exit 8 + time /t + + cd %WIN_COMMUNITY_ROOT%/tests/ci + pip3 install taospy==2.7.21 + pip3 install taos-ws-py==0.3.8 + xcopy /e/y/i/f %WIN_INTERNAL_ROOT%\\debug\\build\\lib\\taos.dll C:\\Windows\\System32 + shell: cmd + - name: Run ctest + run: | + echo "windows ctest ..." + time /t + cd %WIN_INTERNAL_ROOT%\\debug + ctest -j 1 || exit 7 + time /t + shell: cmd + - name: Run function test + run: | + echo "windows test ..." + xcopy /e/y/i/f "%WIN_INTERNAL_ROOT%\debug\build\lib\taos.dll" C:\Windows\System32 + ls -l "C:\Windows\System32\taos.dll" + time /t + cd %WIN_SYSTEM_TEST_ROOT% + echo "testing ..." + test-all.bat ci + time /t + shell: cmd From 997ea8691ae526c74cd8d1d0dcacb7bb3612a17f Mon Sep 17 00:00:00 2001 From: Feng Chao Date: Tue, 4 Mar 2025 08:52:32 +0800 Subject: [PATCH 3/5] Apply suggestions from code review Add "exit 1" to handle the exception of the diretory doesn't exist Co-authored-by: WANG Xu --- .github/workflows/taosd-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/taosd-ci.yml b/.github/workflows/taosd-ci.yml index f1ba0072f0..f92db448f6 100644 --- a/.github/workflows/taosd-ci.yml +++ b/.github/workflows/taosd-ci.yml @@ -360,6 +360,7 @@ jobs: git checkout "%TARGET_BRANCH%" ) else ( echo Directory does not exist: "%WIN_INTERNAL_ROOT%" + exit 1 ) :: Prepare community repository @@ -372,6 +373,7 @@ jobs: git checkout "%TARGET_BRANCH%" ) else ( echo Directory does not exist: "%WIN_COMMUNITY_ROOT%" + exit 1 ) shell: cmd - name: Get latest codes and logs for TDinternal PR From 502de809517ecb3f1b241efe1f1a9e7cf620da05 Mon Sep 17 00:00:00 2001 From: Feng Chao Date: Tue, 4 Mar 2025 10:25:23 +0800 Subject: [PATCH 4/5] fix: Update taosd-ci.yml 1. Remove the trigger condition to debug the TDinternal CI workflow 2. Update variable for the same configuration of windows runner --- .github/workflows/taosd-ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/taosd-ci.yml b/.github/workflows/taosd-ci.yml index f92db448f6..d2c743aac6 100644 --- a/.github/workflows/taosd-ci.yml +++ b/.github/workflows/taosd-ci.yml @@ -1,14 +1,14 @@ name: TDengine CI Test on: - pull_request: - branches: - - 'main' - - '3.0' - - '3.1' - paths-ignore: - - 'packaging/**' - - 'docs/**' + # pull_request: + # branches: + # - 'main' + # - '3.0' + # - '3.1' + # paths-ignore: + # - 'packaging/**' + # - 'docs/**' repository_dispatch: types: [run-tests] @@ -333,7 +333,7 @@ jobs: WIN_INTERNAL_ROOT: "C:\\workspace\\TDinternal" WIN_COMMUNITY_ROOT: "C:\\workspace\\TDinternal\\community" WIN_SYSTEM_TEST_ROOT: "C:\\workspace\\TDinternal\\community\\tests\\system-test" - WIN_VS_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat" + WIN_VS_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat" WIN_CPU_TYPE: "x64" steps: - name: Output the environment information From 22751bd3bf77b0a5b892ddee4f8fbc80740f8fb4 Mon Sep 17 00:00:00 2001 From: Feng Chao Date: Tue, 4 Mar 2025 15:22:59 +0800 Subject: [PATCH 5/5] ci: update ci workflow to compatible with 3.1 --- .github/workflows/taosd-ci.yml | 20 ++++++++++---------- .github/workflows/taosd-doc-build.yml | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/taosd-ci.yml b/.github/workflows/taosd-ci.yml index d2c743aac6..c4f18303ee 100644 --- a/.github/workflows/taosd-ci.yml +++ b/.github/workflows/taosd-ci.yml @@ -13,7 +13,7 @@ on: types: [run-tests] concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.event.client_payload.ref}}-${{ github.event_name == 'repository_dispatch' && 'dispatch' || ''}} cancel-in-progress: true env: @@ -88,7 +88,7 @@ jobs: env: IS_TDINTERNAL: ${{ needs.fetch-parameters.outputs.tdinternal }} RUN_RUNCTION_TEST: ${{ needs.fetch-parameters.outputs.run_function_test }} - RUN_TDGPT_TEST: ${{ needs.fetch-parameters.outputs.run_tdgpt_tests }} + RUN_TDGPT_TEST: ${{ needs.fetch-parameters.outputs.run_tdgpt_test }} SOURCE_BRANCH: ${{ needs.fetch-parameters.outputs.source_branch }} TARGET_BRANCH: ${{ needs.fetch-parameters.outputs.target_branch }} PR_NUMBER: ${{ needs.fetch-parameters.outputs.pr_number }} @@ -161,18 +161,18 @@ jobs: cd ${{ env.WKC }} git submodule update --init --recursive - name: Output the 'file_no_doc_changed' information to the file - if: ${{ env.IS_TDINTERNAL == 'false' }} + if: ${{ env.IS_TDINTERNAL == 'false' && env.TARGET_BRANCH != '3.1' }} run: | mkdir -p ${{ env.WKDIR }}/tmp/${{ env.PR_NUMBER }}_${{ github.run_number }} changed_files_non_doc=$(git --no-pager diff --name-only FETCH_HEAD `git merge-base FETCH_HEAD ${{ env.TARGET_BRANCH }}`|grep -v "^docs/en/"|grep -v "^docs/zh/"|grep -v ".md$" | tr '\n' ' ' || :) echo $changed_files_non_doc > ${{ env.WKDIR }}/tmp/${{ env.PR_NUMBER }}_${{ github.run_number }}/docs_changed.txt - name: Check assert testing - if: ${{ env.IS_TDINTERNAL == 'false' }} + if: ${{ env.IS_TDINTERNAL == 'false' && env.TARGET_BRANCH != '3.1' }} run: | cd ${{ env.WKC }}/tests/parallel_test ./run_check_assert_container.sh -d ${{ env.WKDIR }} - name: Check void function testing - if: ${{ env.IS_TDINTERNAL == 'false' }} + if: ${{ env.IS_TDINTERNAL == 'false' && env.TARGET_BRANCH != '3.1' }} run: | cd ${{ env.WKC }}/tests/parallel_test ./run_check_void_container.sh -d ${{ env.WKDIR }} @@ -207,12 +207,12 @@ jobs: echo "timeout_cmd=$timeout_cmd" >> $GITHUB_OUTPUT echo "extra_param=$extra_param" >> $GITHUB_OUTPUT - name: Run function returns with a null pointer scan testing - if: ${{ env.IS_TDINTERNAL == 'false' }} + if: ${{ env.IS_TDINTERNAL == 'false' && env.TARGET_BRANCH != '3.1' }} run: | cd ${{ env.WKC }}/tests/parallel_test ./run_scan_container.sh -d ${{ env.WKDIR }} -b ${{ env.PR_NUMBER }}_${{ github.run_number }} -f ${{ env.WKDIR }}/tmp/${{ env.PR_NUMBER }}_${{ github.run_number }}/docs_changed.txt ${{ steps.get_param.outputs.extra_param }} - name: Run tdgpt test cases - if: ${{ env.IS_TDINTERNAL }} == 'false' && ${{ env.RUN_TDGPT_TEST }} == 'true' + if: ${{ env.IS_TDINTERNAL == 'false' && env.TARGET_BRANCH != '3.1' && env.RUN_TDGPT_TEST == 'true' }} run: | cd ${{ env.WKC }}/tests/parallel_test export DEFAULT_RETRY_TIME=2 @@ -330,9 +330,9 @@ jobs: SOURCE_BRANCH: ${{ needs.fetch-parameters.outputs.source_branch }} TARGET_BRANCH: ${{ needs.fetch-parameters.outputs.target_branch }} PR_NUMBER: ${{ needs.fetch-parameters.outputs.pr_number }} - WIN_INTERNAL_ROOT: "C:\\workspace\\TDinternal" - WIN_COMMUNITY_ROOT: "C:\\workspace\\TDinternal\\community" - WIN_SYSTEM_TEST_ROOT: "C:\\workspace\\TDinternal\\community\\tests\\system-test" + WIN_INTERNAL_ROOT: "C:\\workspace\\0\\TDinternal" + WIN_COMMUNITY_ROOT: "C:\\workspace\\0\\TDinternal\\community" + WIN_SYSTEM_TEST_ROOT: "C:\\workspace\\0\\TDinternal\\community\\tests\\system-test" WIN_VS_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat" WIN_CPU_TYPE: "x64" steps: diff --git a/.github/workflows/taosd-doc-build.yml b/.github/workflows/taosd-doc-build.yml index 1dffaa0aa7..28f1f10835 100644 --- a/.github/workflows/taosd-doc-build.yml +++ b/.github/workflows/taosd-doc-build.yml @@ -5,7 +5,6 @@ on: branches: - 'main' - '3.0' - - '3.1' paths: - 'docs/**' - '*.md'