From c9af034faa11ff0dd2dd3d3fafc35122e403b1b9 Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Wed, 15 May 2024 12:21:13 +0000 Subject: [PATCH 01/13] some commit to run tests --- ydb/core/blobstorage/vdisk/vdisk_actor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ydb/core/blobstorage/vdisk/vdisk_actor.cpp b/ydb/core/blobstorage/vdisk/vdisk_actor.cpp index 53ede8b5f634..448545145034 100644 --- a/ydb/core/blobstorage/vdisk/vdisk_actor.cpp +++ b/ydb/core/blobstorage/vdisk/vdisk_actor.cpp @@ -2,6 +2,8 @@ #include #include +const int SOME = 42; + namespace NKikimr { IActor* CreateVDisk(const TIntrusivePtr &cfg, From 06ae09101cec8fe562fcba7dd462465e97586953 Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Wed, 15 May 2024 16:51:26 +0000 Subject: [PATCH 02/13] linkage according graph --- .github/actions/build_and_test_ya/action.yml | 50 +++++++++++++------- .github/actions/build_ya/action.yml | 28 +++++++++-- .github/scripts/graph_compare.sh | 31 ++++++++---- 3 files changed, 78 insertions(+), 31 deletions(-) diff --git a/.github/actions/build_and_test_ya/action.yml b/.github/actions/build_and_test_ya/action.yml index d1f83a6709ba..a59a92da6bc9 100644 --- a/.github/actions/build_and_test_ya/action.yml +++ b/.github/actions/build_and_test_ya/action.yml @@ -36,7 +36,12 @@ inputs: type: boolean required: true description: If true, compares build graphs between the current and previous commits to find a list of test suites to run. Otherwise, runs all tests. - folder_prefix: + increment_build: + # TODO: merge this input with 'increment' + type: boolean + required: true + description: If true, compares build graphs between the current and previous commits to find a list of modules to build. + folder_prefix: type: string default: "ya-" put_build_results_to_cache: @@ -77,34 +82,43 @@ runs: folder_prefix: ya- build_preset: ${{ inputs.build_preset }} + - name: Generate ya.make with affected test suites and modules list + if: inputs.increment == 'true' || increment_build == 'true' + uses: ./.github/actions/graph_compare + + - name: Change target in case of incremental (tests) + id: test_run_choice + shell: bash + run: | + if [ "${{ inputs.increment }}" == "true" ]; then + echo "target='.'" >> $GITHUB_OUTPUT + else + echo "target=${{ inputs.build_target }}" >> $GITHUB_OUTPUT + fi + + + - name: Change target in case of incremental (modules) + id: modules_choice + shell: bash + run: | + if [ "${{ inputs.increment_build }}" == "true" ]; then + echo "target='.'" >> $GITHUB_OUTPUT + else + echo "target=${{ inputs.build_target }}" >> $GITHUB_OUTPUT + fi + - name: Build uses: ./.github/actions/build_ya id: build if: ${{ inputs.run_build == 'true' }} with: - build_target: ${{ inputs.build_target }} + build_target: ${{ steps.modules_choice.outputs.target }} build_preset: ${{ inputs.build_preset }} bazel_remote_uri: ${{ fromJSON( inputs.vars ).REMOTE_CACHE_URL || '' }} bazel_remote_username: ${{ inputs.put_build_results_to_cache && fromJSON( inputs.secs ).REMOTE_CACHE_USERNAME || '' }} bazel_remote_password: ${{ inputs.put_build_results_to_cache && fromJSON( inputs.secs ).REMOTE_CACHE_PASSWORD || '' }} link_threads: ${{ inputs.link_threads }} - - name: Generate ya.make with affected test suites list - if: inputs.run_tests == 'true' && inputs.increment == 'true' - uses: ./.github/actions/graph_compare - - - name: Check if there's a list of tests to run - id: test_run_choice - shell: bash - run: | - if [ -f ya.make ];then - echo "target='.'" >> $GITHUB_OUTPUT - echo "Listed test targets: " - cat ya.make - else - echo "target=${{ inputs.build_target }}" >> $GITHUB_OUTPUT - fi - - name: Run tests uses: ./.github/actions/test_ya if: ${{ inputs.run_tests == 'true' && (steps.build.outputs.success == 'true' || inputs.run_tests_if_build_fails == 'true') }} diff --git a/.github/actions/build_ya/action.yml b/.github/actions/build_ya/action.yml index 96e35551da50..29d8c3dd6d2c 100644 --- a/.github/actions/build_ya/action.yml +++ b/.github/actions/build_ya/action.yml @@ -21,6 +21,10 @@ inputs: required: false default: "8" description: "link threads count" + do_link: + required: false + default: "false" + description: "Perform linkage or not (temporary transitional flaf)" outputs: success: value: ${{ steps.build.outputs.status }} @@ -65,10 +69,12 @@ runs: extra_params+=(--bazel-remote-base-uri "${{ inputs.bazel_remote_uri }}") fi + remote_put_params=() + if [ ! -z "${{ inputs.bazel_remote_username }}" ]; then - extra_params+=(--bazel-remote-username "${{ inputs.bazel_remote_username }}") - extra_params+=(--bazel-remote-password "${{ inputs.bazel_remote_password }}") - extra_params+=(--bazel-remote-put --dist-cache-evict-bins --add-result .o --add-result .a) + remote_put_params+=(--bazel-remote-username "${{ inputs.bazel_remote_username }}") + remote_put_params+=(--bazel-remote-password "${{ inputs.bazel_remote_password }}") + remote_put_params+=(--bazel-remote-put --dist-cache-evict-bins --add-result .o --add-result .a) fi case "${{ inputs.build_preset }}" in @@ -115,15 +121,29 @@ runs: # to be sure set -o pipefail + # We don't want to put binaries (elf) to cache because its are too big, + # so, if cache specified we do not perform linkage see '--dist-cache-evict-bins' flag ./ya make -k --build "${build_type}" --force-build-depends -T --stat -DCONSISTENT_DEBUG \ --log-file "$TMP_DIR/ya_log.txt" --evlog-file "$TMP_DIR/ya_evlog.jsonl" \ --cache-size 512G --link-threads "${{ inputs.link_threads }}" \ - "${extra_params[@]}" |& tee $TMP_DIR/ya_make.log && echo "status=true" >> $GITHUB_OUTPUT || ( + "${extra_params[@]}" "${remote_put_params[@]}" |& tee $TMP_DIR/ya_make.log && echo "status=true" >> $GITHUB_OUTPUT || ( RC=$? echo "::debug::ya make RC=$RC" echo "status=failed" >> $GITHUB_OUTPUT ) + if [ "${{ inputs.do_link }}" == "true" ]; then + # Perform linkage without "${remote_put_params[@]}" + ./ya make -k --build "${build_type}" --force-build-depends -T --stat -DCONSISTENT_DEBUG \ + --log-file "$TMP_DIR/ya_log_linkage.txt" --evlog-file "$TMP_DIR/ya_evlog_linkage.jsonl" \ + --cache-size 512G --link-threads "${{ inputs.link_threads }}" \ + "${extra_params[@]}" |& tee $TMP_DIR/ya_make.log && echo "status=true" >> $GITHUB_OUTPUT || ( + RC=$? + echo "::debug::ya make RC=$RC" + echo "status=failed" >> $GITHUB_OUTPUT + ) + fi + - name: sync logs to s3 if: always() shell: bash diff --git a/.github/scripts/graph_compare.sh b/.github/scripts/graph_compare.sh index 89ebd65fd567..8d5b72ed3e41 100755 --- a/.github/scripts/graph_compare.sh +++ b/.github/scripts/graph_compare.sh @@ -1,21 +1,21 @@ # Compares build graphs for two given refs in the current directory git repo -# Creates ya.make in the current directory listing affected ydb test suites +# Creates ya.make in the current directory listing affected ydb targets # Parameters: base_commit_sha head_commit_sha -set -e +set -ex workdir=$(mktemp -d) echo Workdir: $workdir echo Checkout base commit... git checkout $1 echo Build graph for base commit... -./ya make -Gj0 -ttt ydb --build release -k --cache-tests | jq '.graph[] | select( ."node-type"=="test")' > $workdir/graph_base +./ya make -Gj0 -ttt ydb --build release -k --cache-tests | jq '.graph[]' > $workdir/graph_base echo Checkout head commit... git checkout $2 echo Build graph for head commit... -./ya make -Gj0 -ttt ydb --build release -k --cache-tests | jq '.graph[] | select( ."node-type"=="test")' > $workdir/graph_head +./ya make -Gj0 -ttt ydb --build release -k --cache-tests | jq '.graph[]' > $workdir/graph_head echo Generate lists of uids for base and head... cat $workdir/graph_base | jq '.uid' > $workdir/uid_base @@ -24,8 +24,12 @@ cat $workdir/graph_head | jq '.uid' > $workdir/uid_head echo Create a list of changed uids in the head graph... (cat $workdir/uid_head;(cat $workdir/uid_base;cat $workdir/uid_head) | sort | uniq -u) | sort | uniq -d > $workdir/uids_new +echo Create ya.make +echo "# This file is autogenerated by graph_compare.sh" > ya.make +echo "" > ya.make + echo Generate list of test shard names from the head graph based on the list of uids... -cat $workdir/graph_head | jq -r --slurpfile uids $workdir/uids_new 'select( any( .uid; .==$uids[] )) | .kv.path' | sort | uniq > $workdir/testsuites +cat $workdir/graph_head | jq -r --slurpfile uids $workdir/uids_new 'select( ."node-type"=="test") | select( any( .uid; .==$uids[] )) | .kv.path' | sort | uniq > $workdir/testsuites echo Number of test suites: cat $workdir/testsuites | wc -l @@ -33,8 +37,17 @@ cat $workdir/testsuites | wc -l echo Removing test suite name from the list to get target names... sed -E 's/\/[^/]*$//g;/^null$/d' $workdir/testsuites > $workdir/ts2 -echo Generating temp ya.make with recurses to all required tests... -cat $workdir/ts2 | (echo 'RECURSE_FOR_TESTS(';cat;echo ')') > ya.make +echo Append into ya.make RECURSE_FOR_TESTS to all required tests... +cat $workdir/ts2 | (echo 'RECURSE_FOR_TESTS(';cat;echo ')') >> ya.make + +echo Generate list of module names from the head graph based on the list of uids... +cat $workdir/graph_head | jq -r --slurpfile uids $workdir/uids_new 'select( ."target_properties"."module_type" != null) | select( any( .uid; .==$uids[] )) | .target_properties.module_dir' | sort | uniq > $workdir/modules + +echo Number of modules: +cat $workdir/modules | wc -l + +echo Append into ya.make RECURSE to all required modules... +cat $workdir/modules | (echo 'RECURSE(';cat;echo ')') >> ya.make -# echo Running ya test... -# ./ya make -A -R --build relwithdebinfo . \ No newline at end of file +echo "ya.make content:" +cat ya.make From 5eb1d85bdaae27e663db3b3aedd8500beb5db518 Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Wed, 15 May 2024 16:59:09 +0000 Subject: [PATCH 03/13] fix --- .github/actions/build_and_test_ya/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build_and_test_ya/action.yml b/.github/actions/build_and_test_ya/action.yml index a59a92da6bc9..d9ef11c819cb 100644 --- a/.github/actions/build_and_test_ya/action.yml +++ b/.github/actions/build_and_test_ya/action.yml @@ -41,7 +41,7 @@ inputs: type: boolean required: true description: If true, compares build graphs between the current and previous commits to find a list of modules to build. - folder_prefix: + folder_prefix: type: string default: "ya-" put_build_results_to_cache: From 56e62283652551943f7b9cbaff2067961afbf52b Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Wed, 15 May 2024 17:00:21 +0000 Subject: [PATCH 04/13] fix --- .github/actions/build_and_test_ya/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build_and_test_ya/action.yml b/.github/actions/build_and_test_ya/action.yml index d9ef11c819cb..156d47726658 100644 --- a/.github/actions/build_and_test_ya/action.yml +++ b/.github/actions/build_and_test_ya/action.yml @@ -83,7 +83,7 @@ runs: build_preset: ${{ inputs.build_preset }} - name: Generate ya.make with affected test suites and modules list - if: inputs.increment == 'true' || increment_build == 'true' + if: inputs.increment == 'true' || inputs.increment_build == 'true' uses: ./.github/actions/graph_compare - name: Change target in case of incremental (tests) From be49e3ed5b7550ea1eb18ef8b78bcc31231899cc Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Wed, 15 May 2024 17:05:30 +0000 Subject: [PATCH 05/13] fix --- ydb/core/blobstorage/vdisk/vdisk_actor.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/ydb/core/blobstorage/vdisk/vdisk_actor.cpp b/ydb/core/blobstorage/vdisk/vdisk_actor.cpp index 448545145034..53ede8b5f634 100644 --- a/ydb/core/blobstorage/vdisk/vdisk_actor.cpp +++ b/ydb/core/blobstorage/vdisk/vdisk_actor.cpp @@ -2,8 +2,6 @@ #include #include -const int SOME = 42; - namespace NKikimr { IActor* CreateVDisk(const TIntrusivePtr &cfg, From d68968195e57873f134ec95ca316d6c49bf8fd33 Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Wed, 15 May 2024 17:27:35 +0000 Subject: [PATCH 06/13] fixes --- .github/actions/build_ya/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/build_ya/action.yml b/.github/actions/build_ya/action.yml index 29d8c3dd6d2c..f084eebe6c1f 100644 --- a/.github/actions/build_ya/action.yml +++ b/.github/actions/build_ya/action.yml @@ -24,7 +24,7 @@ inputs: do_link: required: false default: "false" - description: "Perform linkage or not (temporary transitional flaf)" + description: "Perform linkage or not (temporary transitional flag)" outputs: success: value: ${{ steps.build.outputs.status }} @@ -121,8 +121,8 @@ runs: # to be sure set -o pipefail - # We don't want to put binaries (elf) to cache because its are too big, - # so, if cache specified we do not perform linkage see '--dist-cache-evict-bins' flag + # We don't want to put binaries (exe, so) to cache because they are too big, + # so, if cache specified we do not perform linkage (see '--dist-cache-evict-bins' flag) ./ya make -k --build "${build_type}" --force-build-depends -T --stat -DCONSISTENT_DEBUG \ --log-file "$TMP_DIR/ya_log.txt" --evlog-file "$TMP_DIR/ya_evlog.jsonl" \ --cache-size 512G --link-threads "${{ inputs.link_threads }}" \ From a0b4a6b2ec47ea2c8218af8ccb8e716ef2decd30 Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Wed, 15 May 2024 18:18:13 +0000 Subject: [PATCH 07/13] fix --- .github/scripts/graph_compare.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/scripts/graph_compare.sh b/.github/scripts/graph_compare.sh index 8d5b72ed3e41..53eb9ad2679d 100755 --- a/.github/scripts/graph_compare.sh +++ b/.github/scripts/graph_compare.sh @@ -25,7 +25,6 @@ echo Create a list of changed uids in the head graph... (cat $workdir/uid_head;(cat $workdir/uid_base;cat $workdir/uid_head) | sort | uniq -u) | sort | uniq -d > $workdir/uids_new echo Create ya.make -echo "# This file is autogenerated by graph_compare.sh" > ya.make echo "" > ya.make echo Generate list of test shard names from the head graph based on the list of uids... From e0b7377c98dbefed9c62da046e708d63553850e5 Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Wed, 15 May 2024 18:21:13 +0000 Subject: [PATCH 08/13] fix --- .github/actions/build_and_test_ya/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/build_and_test_ya/action.yml b/.github/actions/build_and_test_ya/action.yml index 156d47726658..40ababe2808e 100644 --- a/.github/actions/build_and_test_ya/action.yml +++ b/.github/actions/build_and_test_ya/action.yml @@ -39,7 +39,8 @@ inputs: increment_build: # TODO: merge this input with 'increment' type: boolean - required: true + required: false + default: "false" description: If true, compares build graphs between the current and previous commits to find a list of modules to build. folder_prefix: type: string From bd8da7a2cb2235ffee0c4e7871e4188c47938285 Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Thu, 16 May 2024 09:12:33 +0000 Subject: [PATCH 09/13] fix --- .github/actions/build_and_test_ya/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build_and_test_ya/action.yml b/.github/actions/build_and_test_ya/action.yml index 40ababe2808e..09cabe5807a2 100644 --- a/.github/actions/build_and_test_ya/action.yml +++ b/.github/actions/build_and_test_ya/action.yml @@ -92,7 +92,7 @@ runs: shell: bash run: | if [ "${{ inputs.increment }}" == "true" ]; then - echo "target='.'" >> $GITHUB_OUTPUT + echo "target=." >> $GITHUB_OUTPUT else echo "target=${{ inputs.build_target }}" >> $GITHUB_OUTPUT fi @@ -103,7 +103,7 @@ runs: shell: bash run: | if [ "${{ inputs.increment_build }}" == "true" ]; then - echo "target='.'" >> $GITHUB_OUTPUT + echo "target=." >> $GITHUB_OUTPUT else echo "target=${{ inputs.build_target }}" >> $GITHUB_OUTPUT fi From 4f88a59c9c3234e13a368c6e318efbf4343a3a8d Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Fri, 17 May 2024 13:42:17 +0000 Subject: [PATCH 10/13] move link to test --- .github/actions/build_and_test_ya/action.yml | 21 ++--------- .github/actions/build_ya/action.yml | 37 +++----------------- .github/actions/test_ya/action.yml | 6 ++-- 3 files changed, 9 insertions(+), 55 deletions(-) diff --git a/.github/actions/build_and_test_ya/action.yml b/.github/actions/build_and_test_ya/action.yml index 09cabe5807a2..71f0d68aabdc 100644 --- a/.github/actions/build_and_test_ya/action.yml +++ b/.github/actions/build_and_test_ya/action.yml @@ -36,12 +36,6 @@ inputs: type: boolean required: true description: If true, compares build graphs between the current and previous commits to find a list of test suites to run. Otherwise, runs all tests. - increment_build: - # TODO: merge this input with 'increment' - type: boolean - required: false - default: "false" - description: If true, compares build graphs between the current and previous commits to find a list of modules to build. folder_prefix: type: string default: "ya-" @@ -84,7 +78,7 @@ runs: build_preset: ${{ inputs.build_preset }} - name: Generate ya.make with affected test suites and modules list - if: inputs.increment == 'true' || inputs.increment_build == 'true' + if: inputs.increment == 'true' uses: ./.github/actions/graph_compare - name: Change target in case of incremental (tests) @@ -97,23 +91,12 @@ runs: echo "target=${{ inputs.build_target }}" >> $GITHUB_OUTPUT fi - - - name: Change target in case of incremental (modules) - id: modules_choice - shell: bash - run: | - if [ "${{ inputs.increment_build }}" == "true" ]; then - echo "target=." >> $GITHUB_OUTPUT - else - echo "target=${{ inputs.build_target }}" >> $GITHUB_OUTPUT - fi - - name: Build uses: ./.github/actions/build_ya id: build if: ${{ inputs.run_build == 'true' }} with: - build_target: ${{ steps.modules_choice.outputs.target }} + build_target: ${{ inputs.build_target }} build_preset: ${{ inputs.build_preset }} bazel_remote_uri: ${{ fromJSON( inputs.vars ).REMOTE_CACHE_URL || '' }} bazel_remote_username: ${{ inputs.put_build_results_to_cache && fromJSON( inputs.secs ).REMOTE_CACHE_USERNAME || '' }} diff --git a/.github/actions/build_ya/action.yml b/.github/actions/build_ya/action.yml index f084eebe6c1f..2869db1eb766 100644 --- a/.github/actions/build_ya/action.yml +++ b/.github/actions/build_ya/action.yml @@ -21,10 +21,6 @@ inputs: required: false default: "8" description: "link threads count" - do_link: - required: false - default: "false" - description: "Perform linkage or not (temporary transitional flag)" outputs: success: value: ${{ steps.build.outputs.status }} @@ -69,12 +65,10 @@ runs: extra_params+=(--bazel-remote-base-uri "${{ inputs.bazel_remote_uri }}") fi - remote_put_params=() - if [ ! -z "${{ inputs.bazel_remote_username }}" ]; then - remote_put_params+=(--bazel-remote-username "${{ inputs.bazel_remote_username }}") - remote_put_params+=(--bazel-remote-password "${{ inputs.bazel_remote_password }}") - remote_put_params+=(--bazel-remote-put --dist-cache-evict-bins --add-result .o --add-result .a) + extra_params+=(--bazel-remote-username "${{ inputs.bazel_remote_username }}") + extra_params+=(--bazel-remote-password "${{ inputs.bazel_remote_password }}") + extra_params+=(--bazel-remote-put --dist-cache-evict-bins --add-result .o --add-result .a) fi case "${{ inputs.build_preset }}" in @@ -121,29 +115,15 @@ runs: # to be sure set -o pipefail - # We don't want to put binaries (exe, so) to cache because they are too big, - # so, if cache specified we do not perform linkage (see '--dist-cache-evict-bins' flag) ./ya make -k --build "${build_type}" --force-build-depends -T --stat -DCONSISTENT_DEBUG \ --log-file "$TMP_DIR/ya_log.txt" --evlog-file "$TMP_DIR/ya_evlog.jsonl" \ --cache-size 512G --link-threads "${{ inputs.link_threads }}" \ - "${extra_params[@]}" "${remote_put_params[@]}" |& tee $TMP_DIR/ya_make.log && echo "status=true" >> $GITHUB_OUTPUT || ( + "${extra_params[@]}" |& tee $TMP_DIR/ya_make.log && echo "status=true" >> $GITHUB_OUTPUT || ( RC=$? echo "::debug::ya make RC=$RC" echo "status=failed" >> $GITHUB_OUTPUT ) - if [ "${{ inputs.do_link }}" == "true" ]; then - # Perform linkage without "${remote_put_params[@]}" - ./ya make -k --build "${build_type}" --force-build-depends -T --stat -DCONSISTENT_DEBUG \ - --log-file "$TMP_DIR/ya_log_linkage.txt" --evlog-file "$TMP_DIR/ya_evlog_linkage.jsonl" \ - --cache-size 512G --link-threads "${{ inputs.link_threads }}" \ - "${extra_params[@]}" |& tee $TMP_DIR/ya_make.log && echo "status=true" >> $GITHUB_OUTPUT || ( - RC=$? - echo "::debug::ya make RC=$RC" - echo "status=failed" >> $GITHUB_OUTPUT - ) - fi - - name: sync logs to s3 if: always() shell: bash @@ -165,15 +145,6 @@ runs: echo "Build successful." | .github/scripts/tests/comment-pr.py --ok fi - - name: build_stats - shell: bash - continue-on-error: true - run: | - set -x - export build_preset="${{ inputs.build_preset }}" - python3 -m pip install ydb ydb[yc] - python3 .github/scripts/send_build_stats.py - - name: show free space if: always() shell: bash diff --git a/.github/actions/test_ya/action.yml b/.github/actions/test_ya/action.yml index 7f48dd4b467c..6bbcfd33f30f 100644 --- a/.github/actions/test_ya/action.yml +++ b/.github/actions/test_ya/action.yml @@ -196,13 +196,13 @@ runs: echo "Tests are running..." | .github/scripts/tests/comment-pr.py - ./ya test ${{ inputs.build_target }} "${params[@]}" \ - --stat --log-file "$LOG_DIR/ya_log.txt" --evlog-file "$LOG_DIR/ya_evlog.jsonl" -DCONSISTENT_DEBUG \ + ./ya make -A ${{ inputs.build_target }} "${params[@]}" \ + --stat --log-file "$LOG_DIR/ya_log2.txt" --evlog-file "$LOG_DIR/ya_evlog2.jsonl" -DCONSISTENT_DEBUG \ --no-dir-outputs \ --junit "$JUNIT_REPORT_XML" --output "$OUT_DIR" || ( RC=$? if [ $RC -ne 0 ]; then - echo "ya test returned $RC, check existence $JUNIT_REPORT_XML" + echo "ya make -A returned $RC, check existence $JUNIT_REPORT_XML" if [ -s "$JUNIT_REPORT_XML" ]; then echo "$JUNIT_REPORT_XML exists" ls -la "$JUNIT_REPORT_XML" From 5ba4fb86dc62ba75e317bd98daf84f080fe100ab Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Wed, 22 May 2024 10:38:10 +0000 Subject: [PATCH 11/13] force modules to build --- .github/scripts/graph_compare.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/graph_compare.sh b/.github/scripts/graph_compare.sh index 53eb9ad2679d..0e873fff4129 100755 --- a/.github/scripts/graph_compare.sh +++ b/.github/scripts/graph_compare.sh @@ -10,12 +10,12 @@ echo Workdir: $workdir echo Checkout base commit... git checkout $1 echo Build graph for base commit... -./ya make -Gj0 -ttt ydb --build release -k --cache-tests | jq '.graph[]' > $workdir/graph_base +./ya make -Gj0 -ttt ydb --build release -k --cache-tests --no-strip-idle-build-results | jq '.graph[]' > $workdir/graph_base echo Checkout head commit... git checkout $2 echo Build graph for head commit... -./ya make -Gj0 -ttt ydb --build release -k --cache-tests | jq '.graph[]' > $workdir/graph_head +./ya make -Gj0 -ttt ydb --build release -k --cache-tests --no-strip-idle-build-results | jq '.graph[]' > $workdir/graph_head echo Generate lists of uids for base and head... cat $workdir/graph_base | jq '.uid' > $workdir/uid_base From 9bfa080f081801ea32dde07ea8087e41ec709f75 Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Wed, 22 May 2024 11:29:36 +0000 Subject: [PATCH 12/13] forgotten --- .github/actions/test_ya/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/test_ya/action.yml b/.github/actions/test_ya/action.yml index 6bbcfd33f30f..ffa3e43d16b0 100644 --- a/.github/actions/test_ya/action.yml +++ b/.github/actions/test_ya/action.yml @@ -191,6 +191,9 @@ runs: ;; esac + # Also build targets which are not in tests' dependencies + params+=(--no-strip-idle-build-results) + echo "::debug::get version" ./ya --version From b1c919a45ab3e095b3950634dfc4d8159a97a4d5 Mon Sep 17 00:00:00 2001 From: Maxim Yurchuk Date: Wed, 22 May 2024 13:51:10 +0000 Subject: [PATCH 13/13] return ya test --- .github/actions/test_ya/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/test_ya/action.yml b/.github/actions/test_ya/action.yml index ffa3e43d16b0..3eb4154e0c13 100644 --- a/.github/actions/test_ya/action.yml +++ b/.github/actions/test_ya/action.yml @@ -199,13 +199,13 @@ runs: echo "Tests are running..." | .github/scripts/tests/comment-pr.py - ./ya make -A ${{ inputs.build_target }} "${params[@]}" \ + ./ya test ${{ inputs.build_target }} "${params[@]}" \ --stat --log-file "$LOG_DIR/ya_log2.txt" --evlog-file "$LOG_DIR/ya_evlog2.jsonl" -DCONSISTENT_DEBUG \ --no-dir-outputs \ --junit "$JUNIT_REPORT_XML" --output "$OUT_DIR" || ( RC=$? if [ $RC -ne 0 ]; then - echo "ya make -A returned $RC, check existence $JUNIT_REPORT_XML" + echo "ya test returned $RC, check existence $JUNIT_REPORT_XML" if [ -s "$JUNIT_REPORT_XML" ]; then echo "$JUNIT_REPORT_XML exists" ls -la "$JUNIT_REPORT_XML"