From 143820a2e7bdc02617a6b6a0555fbad7db949eca Mon Sep 17 00:00:00 2001 From: ManickaP Date: Tue, 16 May 2023 19:34:15 +0200 Subject: [PATCH 1/9] Attempt to fix unfailing helix test run when testResults.xml are missing --- eng/testing/RunnerTemplate.cmd | 13 +++++++++---- eng/testing/RunnerTemplate.sh | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/eng/testing/RunnerTemplate.cmd b/eng/testing/RunnerTemplate.cmd index 0d898b4aa182ad..fa39383ee81b19 100644 --- a/eng/testing/RunnerTemplate.cmd +++ b/eng/testing/RunnerTemplate.cmd @@ -44,8 +44,8 @@ set EXECUTION_DIR=%~dp0 :: Don't use a globally installed SDK. set DOTNET_MULTILEVEL_LOOKUP=0 -:: ========================= BEGIN Test Execution ============================= -echo ----- start %DATE% %TIME% =============== To repro directly: ===================================================== +:: ========================= BEGIN Test Execution ============================= +echo ----- start %DATE% %TIME% =============== To repro directly: ===================================================== echo pushd %EXECUTION_DIR% [[RunCommandsEcho]] echo popd @@ -54,13 +54,18 @@ pushd %EXECUTION_DIR% @echo on [[RunCommands]] @echo off +if exist testResults.xml ( + set "HAS_TEST_RESULTS=1" +) popd echo ----- end %DATE% %TIME% ----- exit code %ERRORLEVEL% ---------------------------------------------------------- :: The helix work item should not exit with non-zero if tests ran and produced results :: The special console runner for runtime returns 1 when tests fail if %ERRORLEVEL%==1 ( - if not "%HELIX_WORKITEM_PAYLOAD%"=="" ( - exit /b 0 + if %HAS_TEST_RESULTS%==1 ( + if not "%HELIX_WORKITEM_PAYLOAD%"=="" ( + exit /b 0 + ) ) ) exit /b %ERRORLEVEL% diff --git a/eng/testing/RunnerTemplate.sh b/eng/testing/RunnerTemplate.sh index c0f2362601fe3b..ccf56442cf1c24 100644 --- a/eng/testing/RunnerTemplate.sh +++ b/eng/testing/RunnerTemplate.sh @@ -166,6 +166,9 @@ echo =========================================================================== pushd $EXECUTION_DIR [[RunCommands]] test_exitcode=$? +if [[ -f testResults.xml ]]; then + has_test_results=1; +fi; popd echo ----- end $(date) ----- exit code $test_exitcode ---------------------------------------------------------- @@ -230,7 +233,7 @@ popd >/dev/null # ======================== END Core File Inspection ========================== # The helix work item should not exit with non-zero if tests ran and produced results # The special console runner for runtime returns 1 when tests fail -if [[ "$test_exitcode" == "1" ]]; then +if [[ "$test_exitcode" == "1" && $has_test_results ]]; then if [ -n "$HELIX_WORKITEM_PAYLOAD" ]; then exit 0 fi From 803c936e3f9f6b32e568bdf24fc68ea74d97d7b5 Mon Sep 17 00:00:00 2001 From: ManickaP Date: Wed, 17 May 2023 12:14:01 +0200 Subject: [PATCH 2/9] Feedback and docker image attemted fix --- eng/pipelines/libraries/helix-queues-setup.yml | 2 +- eng/testing/RunnerTemplate.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 355ca33e31c17d..5c8021da40442d 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -77,7 +77,7 @@ jobs: - (Mariner.2.0.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64 - (openSUSE.15.2.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64 - ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - (Centos.7.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-mlnet-helix + - (Centos.9.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9-helix - RedHat.7.Amd64.Open - (Debian.10.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64 - Ubuntu.1804.Amd64.Open diff --git a/eng/testing/RunnerTemplate.sh b/eng/testing/RunnerTemplate.sh index ccf56442cf1c24..1ccf586242dd40 100644 --- a/eng/testing/RunnerTemplate.sh +++ b/eng/testing/RunnerTemplate.sh @@ -166,7 +166,7 @@ echo =========================================================================== pushd $EXECUTION_DIR [[RunCommands]] test_exitcode=$? -if [[ -f testResults.xml ]]; then +if [[ -s testResults.xml ]]; then has_test_results=1; fi; popd From 9473b9f6cea9e828c70d2e1384b098d3518bb946 Mon Sep 17 00:00:00 2001 From: ManickaP Date: Thu, 18 May 2023 11:24:32 +0200 Subject: [PATCH 3/9] Commenting out RHEL7 for a test run to see if there are any remaining problems elsewhere --- eng/pipelines/libraries/helix-queues-setup.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 5c8021da40442d..45ddc9095b68bb 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -63,7 +63,7 @@ jobs: - ${{ if eq(parameters.platform, 'linux_x64') }}: - ${{ if and(eq(parameters.jobParameters.interpreter, ''), ne(parameters.jobParameters.isSingleFile, true)) }}: - ${{ if and(eq(parameters.jobParameters.testScope, 'outerloop'), eq(parameters.jobParameters.runtimeFlavor, 'mono')) }}: - - RedHat.7.Amd64.Open + #- RedHat.7.Amd64.Open - SLES.15.Amd64.Open - (Fedora.36.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36-helix - (Ubuntu.2204.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-amd64 @@ -78,7 +78,7 @@ jobs: - (openSUSE.15.2.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64 - ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - (Centos.9.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9-helix - - RedHat.7.Amd64.Open + #- RedHat.7.Amd64.Open - (Debian.10.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64 - Ubuntu.1804.Amd64.Open - ${{ if or(eq(parameters.jobParameters.interpreter, 'true'), eq(parameters.jobParameters.isSingleFile, true)) }}: From cb359b515afec1588a5bdc4bae0729db45795462 Mon Sep 17 00:00:00 2001 From: Manicka Date: Fri, 19 May 2023 11:14:34 +0200 Subject: [PATCH 4/9] AlmaLinux 8 instead of RHEL7 --- eng/pipelines/libraries/helix-queues-setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 45ddc9095b68bb..c64796a92834fa 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -78,7 +78,7 @@ jobs: - (openSUSE.15.2.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64 - ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - (Centos.9.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9-helix - #- RedHat.7.Amd64.Open + - (AlmaLinux.8.Amd64.Open)RedHat.7.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-helix - (Debian.10.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64 - Ubuntu.1804.Amd64.Open - ${{ if or(eq(parameters.jobParameters.interpreter, 'true'), eq(parameters.jobParameters.isSingleFile, true)) }}: From 278f57850a22a706f44e9c6db31a90a77aef3c50 Mon Sep 17 00:00:00 2001 From: ManickaP Date: Mon, 22 May 2023 15:53:08 +0200 Subject: [PATCH 5/9] Test docker image --- eng/pipelines/libraries/helix-queues-setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index c64796a92834fa..9758d189b3cc08 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -63,8 +63,8 @@ jobs: - ${{ if eq(parameters.platform, 'linux_x64') }}: - ${{ if and(eq(parameters.jobParameters.interpreter, ''), ne(parameters.jobParameters.isSingleFile, true)) }}: - ${{ if and(eq(parameters.jobParameters.testScope, 'outerloop'), eq(parameters.jobParameters.runtimeFlavor, 'mono')) }}: - #- RedHat.7.Amd64.Open - SLES.15.Amd64.Open + - (Centos.9.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9-helix - (Fedora.36.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36-helix - (Ubuntu.2204.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-amd64 - (Debian.10.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64 From 0e774b0acedaf966c48e1e4f7e9b1f7a780e07b1 Mon Sep 17 00:00:00 2001 From: ManickaP Date: Tue, 23 May 2023 16:27:11 +0200 Subject: [PATCH 6/9] Kdepak asi soudruzi udelali chybu --- eng/testing/RunnerTemplate.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/eng/testing/RunnerTemplate.sh b/eng/testing/RunnerTemplate.sh index 1ccf586242dd40..c0f2362601fe3b 100644 --- a/eng/testing/RunnerTemplate.sh +++ b/eng/testing/RunnerTemplate.sh @@ -166,9 +166,6 @@ echo =========================================================================== pushd $EXECUTION_DIR [[RunCommands]] test_exitcode=$? -if [[ -s testResults.xml ]]; then - has_test_results=1; -fi; popd echo ----- end $(date) ----- exit code $test_exitcode ---------------------------------------------------------- @@ -233,7 +230,7 @@ popd >/dev/null # ======================== END Core File Inspection ========================== # The helix work item should not exit with non-zero if tests ran and produced results # The special console runner for runtime returns 1 when tests fail -if [[ "$test_exitcode" == "1" && $has_test_results ]]; then +if [[ "$test_exitcode" == "1" ]]; then if [ -n "$HELIX_WORKITEM_PAYLOAD" ]; then exit 0 fi From 028690e6fa571f558adfadb641468586fe117688 Mon Sep 17 00:00:00 2001 From: ManickaP Date: Thu, 25 May 2023 21:07:03 +0200 Subject: [PATCH 7/9] Fixed docker from centos stream 9 to 8 --- eng/pipelines/libraries/helix-queues-setup.yml | 4 ++-- eng/testing/RunnerTemplate.sh | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 9758d189b3cc08..d5e69d2d31039d 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -64,7 +64,7 @@ jobs: - ${{ if and(eq(parameters.jobParameters.interpreter, ''), ne(parameters.jobParameters.isSingleFile, true)) }}: - ${{ if and(eq(parameters.jobParameters.testScope, 'outerloop'), eq(parameters.jobParameters.runtimeFlavor, 'mono')) }}: - SLES.15.Amd64.Open - - (Centos.9.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9-helix + - (Centos.8.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-helix - (Fedora.36.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36-helix - (Ubuntu.2204.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-amd64 - (Debian.10.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64 @@ -77,7 +77,7 @@ jobs: - (Mariner.2.0.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64 - (openSUSE.15.2.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64 - ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - (Centos.9.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9-helix + - (Centos.8.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-helix - (AlmaLinux.8.Amd64.Open)RedHat.7.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-helix - (Debian.10.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64 - Ubuntu.1804.Amd64.Open diff --git a/eng/testing/RunnerTemplate.sh b/eng/testing/RunnerTemplate.sh index c0f2362601fe3b..7c534f72b5e867 100644 --- a/eng/testing/RunnerTemplate.sh +++ b/eng/testing/RunnerTemplate.sh @@ -166,6 +166,9 @@ echo =========================================================================== pushd $EXECUTION_DIR [[RunCommands]] test_exitcode=$? +if [[ -s testResults.xml ]]; then + has_test_results=1; +fi; popd echo ----- end $(date) ----- exit code $test_exitcode ---------------------------------------------------------- @@ -230,7 +233,7 @@ popd >/dev/null # ======================== END Core File Inspection ========================== # The helix work item should not exit with non-zero if tests ran and produced results # The special console runner for runtime returns 1 when tests fail -if [[ "$test_exitcode" == "1" ]]; then +if [[ "$test_exitcode" == "1" && "$has_test_results" == "1" ]]; then if [ -n "$HELIX_WORKITEM_PAYLOAD" ]; then exit 0 fi From 58e60364c4415c2d0d6b7d52381bab3ffec7b154 Mon Sep 17 00:00:00 2001 From: ManickaP Date: Fri, 26 May 2023 14:10:17 +0200 Subject: [PATCH 8/9] Test with different Queue --- eng/pipelines/libraries/helix-queues-setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index d5e69d2d31039d..85a15b1a7524c4 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -78,7 +78,7 @@ jobs: - (openSUSE.15.2.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64 - ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - (Centos.8.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-helix - - (AlmaLinux.8.Amd64.Open)RedHat.7.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-helix + - (AlmaLinux.8.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-helix - (Debian.10.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64 - Ubuntu.1804.Amd64.Open - ${{ if or(eq(parameters.jobParameters.interpreter, 'true'), eq(parameters.jobParameters.isSingleFile, true)) }}: From ba2d267e00b949ae80295f54622ce5cbfc78a816 Mon Sep 17 00:00:00 2001 From: ManickaP Date: Fri, 26 May 2023 16:09:22 +0200 Subject: [PATCH 9/9] Fixed docker image name --- eng/pipelines/libraries/helix-queues-setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 85a15b1a7524c4..80991ce389bd53 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -78,7 +78,7 @@ jobs: - (openSUSE.15.2.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64 - ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - (Centos.8.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-helix - - (AlmaLinux.8.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-helix + - (AlmaLinux.8.Amd64.Open)RedHat.7.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-helix-amd64 - (Debian.10.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64 - Ubuntu.1804.Amd64.Open - ${{ if or(eq(parameters.jobParameters.interpreter, 'true'), eq(parameters.jobParameters.isSingleFile, true)) }}: