From c447b042338baf6b78b382543d6e3c00c3ea2f20 Mon Sep 17 00:00:00 2001 From: Sunjay Bhatia Date: Fri, 20 Nov 2020 15:48:44 -0500 Subject: [PATCH 01/16] Step 5: Introduce clang_cl job for Windows to envoy azure pipelines Signed-off-by: Sunjay Bhatia Co-authored-by: William A Rowe Jr Signed-off-by: William A Rowe Jr --- .azure-pipelines/pipelines.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 14cbb044ca5d..25a9d0e20bb0 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -391,7 +391,7 @@ stages: path: $(Build.StagingDirectory)/repository_cache continueOnError: true - bash: ci/run_envoy_docker.sh ci/windows_ci_steps.sh - displayName: "Run Windows CI" + displayName: "Run Windows msvc-cl CI" env: CI_TARGET: "windows" ENVOY_DOCKER_BUILD_DIR: "$(Build.StagingDirectory)" @@ -415,9 +415,29 @@ stages: artifactName: windows.release condition: always() - - job: docker + - job: clang_cl dependsOn: ["release"] timeoutInMinutes: 120 + pool: + vmImage: "windows-latest" + steps: + - bash: ci/run_envoy_docker.sh ci/windows_ci_steps.sh + displayName: "Run Windows clang-cl CI" + env: + ENVOY_DOCKER_BUILD_DIR: "$(Build.StagingDirectory)" + ENVOY_RBE: "true" + BAZEL_BUILD_EXTRA_OPTIONS: "--config=remote-ci --config=remote-clang-cl --jobs=$(RbeJobs)" + BAZEL_REMOTE_CACHE: grpcs://remotebuildexecution.googleapis.com + BAZEL_REMOTE_INSTANCE: projects/envoy-ci/instances/default_instance + GCP_SERVICE_ACCOUNT_KEY: $(GcpServiceAccountKey) + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: "$(Build.StagingDirectory)/envoy" + artifactName: windows.clang-cl + condition: always() + + - job: docker + dependsOn: ["release"] pool: vmImage: "windows-latest" steps: From 93c72874a7c1fb78585e7a4fa863ed0ca1937640 Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Fri, 8 Jan 2021 07:52:32 -0600 Subject: [PATCH 02/16] Experiment: attempt to inject flake publishing+reporting Signed-off-by: William A Rowe Jr --- .azure-pipelines/pipelines.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 25a9d0e20bb0..b4dd274fd8ba 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -425,11 +425,20 @@ stages: displayName: "Run Windows clang-cl CI" env: ENVOY_DOCKER_BUILD_DIR: "$(Build.StagingDirectory)" + SLACK_TOKEN: $(SLACK_TOKEN) + REPO_URI: $(Build.Repository.Uri) + BUILD_URI: $(Build.BuildUri) ENVOY_RBE: "true" - BAZEL_BUILD_EXTRA_OPTIONS: "--config=remote-ci --config=remote-clang-cl --jobs=$(RbeJobs)" + BAZEL_BUILD_EXTRA_OPTIONS: "--config=remote-ci --config=remote-clang-cl --jobs=$(RbeJobs) --flaky_test_attempts=2" BAZEL_REMOTE_CACHE: grpcs://remotebuildexecution.googleapis.com BAZEL_REMOTE_INSTANCE: projects/envoy-ci/instances/default_instance GCP_SERVICE_ACCOUNT_KEY: $(GcpServiceAccountKey) + - task: PublishTestResults@2 + inputs: + testResultsFiles: "**/bazel-out/**/testlogs/**/test.xml" + testRunTitle: "clang-cl" + searchFolder: $(Build.StagingDirectory)/tmp + condition: always() - task: PublishBuildArtifacts@1 inputs: pathtoPublish: "$(Build.StagingDirectory)/envoy" From 90c24165eaba7b3983ba058c60c7390397ee823d Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Tue, 12 Jan 2021 07:57:02 -0600 Subject: [PATCH 03/16] Mark known-problem clang-cl tests Signed-off-by: William A Rowe Jr --- test/common/network/BUILD | 4 ++++ .../filters/network/sni_dynamic_forward_proxy/BUILD | 2 ++ 2 files changed, 6 insertions(+) diff --git a/test/common/network/BUILD b/test/common/network/BUILD index 539ba78aff39..a0be2d530882 100644 --- a/test/common/network/BUILD +++ b/test/common/network/BUILD @@ -105,6 +105,10 @@ envoy_cc_test( "//conditions:default": [], }), external_deps = ["abseil_synchronization"], + # TODO(envoyproxy/windows-dev): Under winsock2, reverse lookup of ::1/127.0.0.1 may not + # resolve to localhost, even when explicitly defined in Windows\System32\drivers\etc\hosts + # depending on the DNS provider and domain configuration + tags = ["flaky_on_clang-cl"], deps = [ "//include/envoy/event:dispatcher_interface", "//include/envoy/network:dns_interface", diff --git a/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD b/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD index 66d033ebfb87..f270180d6999 100644 --- a/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD +++ b/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD @@ -33,6 +33,8 @@ envoy_extension_cc_test( "//test/config/integration/certs", ], extension_name = "envoy.filters.network.sni_dynamic_forward_proxy", + # TODO(envoyproxy/windows-dev): Diagnose failure building ith clang-cl (msvc shows no issues) + tags = ["skip_on_clang-cl"], deps = [ "//source/extensions/clusters/dynamic_forward_proxy:cluster", "//source/extensions/filters/listener/tls_inspector:config", From 4e358af5068b53cf674cef735191646e60073d03 Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Tue, 12 Jan 2021 22:00:41 -0600 Subject: [PATCH 04/16] Distinguish clang-cl from msvc ('windows') failures - Drop the distinction between flaky_ and fails_, now that flakes have been addressed, and very few true problems remain. Signed-off-by: William A Rowe Jr --- ci/windows_ci_steps.sh | 18 +++++++++++++----- test/common/network/BUILD | 2 +- .../network/sni_dynamic_forward_proxy/BUILD | 4 ++-- .../quic_listeners/quiche/integration/BUILD | 2 +- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ci/windows_ci_steps.sh b/ci/windows_ci_steps.sh index 3a8f5bb3ae12..10d4159ef811 100755 --- a/ci/windows_ci_steps.sh +++ b/ci/windows_ci_steps.sh @@ -62,6 +62,11 @@ mkdir -p "${ENVOY_BUILD_DIR}" ENVOY_DELIVERY_DIR="${ENVOY_BUILD_DIR}"/source/exe mkdir -p "${ENVOY_DELIVERY_DIR}" +FAIL_GROUP=windows +if [[ "${BAZEL_BUILD_EXTRA_OPTIONS}" =~ "--config=clang-cl" ]]; then + FAIL_GROUP=clang_cl +fi + # Test to validate updates of all dependency libraries in bazel/external and bazel/foreign_cc # bazel "${BAZEL_STARTUP_OPTIONS[@]}" build "${BAZEL_BUILD_OPTIONS[@]}" //bazel/... --build_tag_filters=-skip_on_windows @@ -75,15 +80,18 @@ cp -f bazel-bin/source/exe/envoy-static.exe "${ENVOY_DELIVERY_DIR}/envoy.exe" tar czf "${ENVOY_BUILD_DIR}"/envoy_binary.tar.gz -C "${ENVOY_DELIVERY_DIR}" envoy.exe # Test invocations of known-working tests on Windows -bazel "${BAZEL_STARTUP_OPTIONS[@]}" test "${BAZEL_BUILD_OPTIONS[@]}" //test/... --test_tag_filters=-skip_on_windows,-fails_on_windows,-flaky_on_windows --build_tests_only +bazel "${BAZEL_STARTUP_OPTIONS[@]}" test "${BAZEL_BUILD_OPTIONS[@]}" //test/... --test_tag_filters=-skip_on_windows,-fails_on_${FAIL_GROUP} --build_tests_only echo "running flaky test reporting script" "${ENVOY_SRCDIR}"/ci/flaky_test/run_process_xml.sh "$CI_TARGET" -# Build tests that are known-flaky or known-failing to ensure no compilation regressions -bazel "${BAZEL_STARTUP_OPTIONS[@]}" build "${BAZEL_BUILD_OPTIONS[@]}" //test/... --test_tag_filters=-skip_on_windows,fails_on_windows,flaky_on_windows --build_tests_only +# Build tests that are known flaky or failing to ensure no compilation regressions +bazel "${BAZEL_STARTUP_OPTIONS[@]}" build "${BAZEL_BUILD_OPTIONS[@]}" //test/... --test_tag_filters=-skip_on_windows,fails_on_${FAIL_GROUP} --build_tests_only # Summarize tests bypasssed to monitor the progress of porting to Windows echo "Tests bypassed as skip_on_windows: $(bazel "${BAZEL_STARTUP_OPTIONS[@]}" query 'kind(".*test rule", attr("tags", "skip_on_windows", //test/...))' 2>/dev/null | sort | wc -l) known unbuildable or inapplicable tests" -echo "Tests bypassed as fails_on_windows: $(bazel "${BAZEL_STARTUP_OPTIONS[@]}" query 'kind(".*test rule", attr("tags", "fails_on_windows", //test/...))' 2>/dev/null | sort | wc -l) known incompatible tests" -echo "Tests bypassed as flaky_on_windows: $(bazel "${BAZEL_STARTUP_OPTIONS[@]}" query 'kind(".*test rule", attr("tags", "flaky_on_windows", //test/...))' 2>/dev/null | sort | wc -l) known unstable tests" +if [[ "${FAIL_GROUP}" == "clang_cl" ]]; then + echo "Tests bypassed as fails_on_clang_cl} $(bazel "${BAZEL_STARTUP_OPTIONS[@]}" query 'kind(".*test rule", attr("tags", "fails_on_clang_cl}", //test/...))' 2>/dev/null | sort | wc -l) known incompatible tests" +else + echo "Tests bypassed as fails_on_windows} $(bazel "${BAZEL_STARTUP_OPTIONS[@]}" query 'kind(".*test rule", attr("tags", "fails_on_windows}", //test/...))' 2>/dev/null | sort | wc -l) known incompatible tests" +fi diff --git a/test/common/network/BUILD b/test/common/network/BUILD index a0be2d530882..8f4dfddf183a 100644 --- a/test/common/network/BUILD +++ b/test/common/network/BUILD @@ -108,7 +108,7 @@ envoy_cc_test( # TODO(envoyproxy/windows-dev): Under winsock2, reverse lookup of ::1/127.0.0.1 may not # resolve to localhost, even when explicitly defined in Windows\System32\drivers\etc\hosts # depending on the DNS provider and domain configuration - tags = ["flaky_on_clang-cl"], + tags = ["fails_on_clang_cl"], deps = [ "//include/envoy/event:dispatcher_interface", "//include/envoy/network:dns_interface", diff --git a/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD b/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD index f270180d6999..8e73513841c2 100644 --- a/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD +++ b/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD @@ -33,8 +33,8 @@ envoy_extension_cc_test( "//test/config/integration/certs", ], extension_name = "envoy.filters.network.sni_dynamic_forward_proxy", - # TODO(envoyproxy/windows-dev): Diagnose failure building ith clang-cl (msvc shows no issues) - tags = ["skip_on_clang-cl"], + # TODO(envoyproxy/windows-dev): Diagnose failure building with clang-cl (msvc shows no issues) + tags = ["fails_on_clang_cl"], deps = [ "//source/extensions/clusters/dynamic_forward_proxy:cluster", "//source/extensions/filters/listener/tls_inspector:config", diff --git a/test/extensions/quic_listeners/quiche/integration/BUILD b/test/extensions/quic_listeners/quiche/integration/BUILD index 998625c54e72..0bfd43729c04 100644 --- a/test/extensions/quic_listeners/quiche/integration/BUILD +++ b/test/extensions/quic_listeners/quiche/integration/BUILD @@ -19,7 +19,7 @@ envoy_cc_test( # Each of these tests exceeds 20s; # QuicHttpIntegrationTests/QuicHttpIntegrationTest.MultipleQuicConnections[With|No]BPF* tags = [ - "flaky_on_windows", + "fails_on_windows", "nofips", ], deps = [ From 1a0d507646d4fe0c8045a4be3708cb255accb45e Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Tue, 12 Jan 2021 22:06:05 -0600 Subject: [PATCH 05/16] Use the modern syntax for windows preprocessor flag - This may require new logic in bazel itself for msvc version detection Signed-off-by: William A Rowe Jr --- bazel/envoy_internal.bzl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bazel/envoy_internal.bzl b/bazel/envoy_internal.bzl index 221ebc725ea5..80b427e7d484 100644 --- a/bazel/envoy_internal.bzl +++ b/bazel/envoy_internal.bzl @@ -69,8 +69,9 @@ def envoy_copts(repository, test = False): ], repository + "//bazel:gcc_build": ["-Wno-maybe-uninitialized"], # Allow 'nodiscard' function results values to be discarded for test code only - # TODO(envoyproxy/windows-dev): Replace with /Zc:preprocessor for cl.exe versions >= 16.5 - repository + "//bazel:windows_x86_64": ["-wd4834", "-experimental:preprocessor", "-Wv:19.4"] if test else ["-experimental:preprocessor", "-Wv:19.4"], + # TODO(envoyproxy/windows-dev): Replace /Zc:preprocessor with /experimental:preprocessor + # for msvc cl.exe versions < 16.5 + repository + "//bazel:windows_x86_64": ["-wd4834", "-Zc:preprocessor", "-Wv:19.4"] if test else ["-Zc:preprocessor", "-Wv:19.4"], repository + "//bazel:clang_cl_build": ["-Wno-unused-result"] if test else [], "//conditions:default": [], }) + select({ From 6e7e28b8dab9162beacfa00740ac034e164acaf7 Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Wed, 13 Jan 2021 10:08:58 -0600 Subject: [PATCH 06/16] Format spelling mystery, clarify comment Signed-off-by: William A Rowe Jr --- bazel/envoy_internal.bzl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bazel/envoy_internal.bzl b/bazel/envoy_internal.bzl index 80b427e7d484..edb099578f79 100644 --- a/bazel/envoy_internal.bzl +++ b/bazel/envoy_internal.bzl @@ -70,7 +70,8 @@ def envoy_copts(repository, test = False): repository + "//bazel:gcc_build": ["-Wno-maybe-uninitialized"], # Allow 'nodiscard' function results values to be discarded for test code only # TODO(envoyproxy/windows-dev): Replace /Zc:preprocessor with /experimental:preprocessor - # for msvc cl.exe versions < 16.5 + # for msvc versions between 15.8 through 16.4.x. see + # https://docs.microsoft.com/en-us/cpp/build/reference/zc-preprocessor repository + "//bazel:windows_x86_64": ["-wd4834", "-Zc:preprocessor", "-Wv:19.4"] if test else ["-Zc:preprocessor", "-Wv:19.4"], repository + "//bazel:clang_cl_build": ["-Wno-unused-result"] if test else [], "//conditions:default": [], From e19f9eef227c6d304243442e2ade9b078fd5057e Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Wed, 13 Jan 2021 16:30:16 -0600 Subject: [PATCH 07/16] Expand all args testing for --config=clang-cl Signed-off-by: William A Rowe Jr --- ci/windows_ci_steps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/windows_ci_steps.sh b/ci/windows_ci_steps.sh index 10d4159ef811..f934f2573a14 100755 --- a/ci/windows_ci_steps.sh +++ b/ci/windows_ci_steps.sh @@ -63,7 +63,7 @@ ENVOY_DELIVERY_DIR="${ENVOY_BUILD_DIR}"/source/exe mkdir -p "${ENVOY_DELIVERY_DIR}" FAIL_GROUP=windows -if [[ "${BAZEL_BUILD_EXTRA_OPTIONS}" =~ "--config=clang-cl" ]]; then +if [[ "${BAZEL_BUILD_EXTRA_OPTIONS[@]}" =~ "--config=clang-cl" ]]; then FAIL_GROUP=clang_cl fi From e3ff0cf812a6c379b3864755db742b5cd598ca69 Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Wed, 13 Jan 2021 16:45:35 -0600 Subject: [PATCH 08/16] Work around odd format check Signed-off-by: William A Rowe Jr --- ci/windows_ci_steps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/windows_ci_steps.sh b/ci/windows_ci_steps.sh index f934f2573a14..8f6409de400e 100755 --- a/ci/windows_ci_steps.sh +++ b/ci/windows_ci_steps.sh @@ -63,7 +63,7 @@ ENVOY_DELIVERY_DIR="${ENVOY_BUILD_DIR}"/source/exe mkdir -p "${ENVOY_DELIVERY_DIR}" FAIL_GROUP=windows -if [[ "${BAZEL_BUILD_EXTRA_OPTIONS[@]}" =~ "--config=clang-cl" ]]; then +if [[ "${BAZEL_BUILD_EXTRA_OPTIONS[*]}" =~ "--config=clang-cl" ]]; then FAIL_GROUP=clang_cl fi From a781595e9807f601a9b35284eb38c251209e47c5 Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Wed, 13 Jan 2021 21:30:22 -0600 Subject: [PATCH 09/16] Add repository cache to avoid download/sync failures Author: Sunjay Bhatia Signed-off-by: William A Rowe Jr --- .azure-pipelines/pipelines.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index b4dd274fd8ba..0f9de2bd81cd 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -421,6 +421,11 @@ stages: pool: vmImage: "windows-latest" steps: + - task: Cache@2 + inputs: + key: '"windows.release" | ./WORKSPACE | **/*.bzl' + path: $(Build.StagingDirectory)/repository_cache + continueOnError: true - bash: ci/run_envoy_docker.sh ci/windows_ci_steps.sh displayName: "Run Windows clang-cl CI" env: From 14de8cd60e9bd43d25542914c9053347d55260fe Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Wed, 13 Jan 2021 21:34:58 -0600 Subject: [PATCH 10/16] Adjust for 2nd build schema/target clang-cl Signed-off-by: William A Rowe Jr --- .azure-pipelines/pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 0f9de2bd81cd..bd49f07e2031 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -423,12 +423,13 @@ stages: steps: - task: Cache@2 inputs: - key: '"windows.release" | ./WORKSPACE | **/*.bzl' + key: '"windows.clang-cl" | ./WORKSPACE | **/*.bzl' path: $(Build.StagingDirectory)/repository_cache continueOnError: true - bash: ci/run_envoy_docker.sh ci/windows_ci_steps.sh displayName: "Run Windows clang-cl CI" env: + CI_TARGET: "windows" ENVOY_DOCKER_BUILD_DIR: "$(Build.StagingDirectory)" SLACK_TOKEN: $(SLACK_TOKEN) REPO_URI: $(Build.Repository.Uri) From 3a3f80cd7a8a0c2421e58a97475e19cece43cf51 Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Wed, 13 Jan 2021 21:42:58 -0600 Subject: [PATCH 11/16] Simplify test, trigger on all clang-cl flavors including remote Signed-off-by: William A Rowe Jr --- ci/windows_ci_steps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/windows_ci_steps.sh b/ci/windows_ci_steps.sh index 8f6409de400e..16f2556d989b 100755 --- a/ci/windows_ci_steps.sh +++ b/ci/windows_ci_steps.sh @@ -63,7 +63,7 @@ ENVOY_DELIVERY_DIR="${ENVOY_BUILD_DIR}"/source/exe mkdir -p "${ENVOY_DELIVERY_DIR}" FAIL_GROUP=windows -if [[ "${BAZEL_BUILD_EXTRA_OPTIONS[*]}" =~ "--config=clang-cl" ]]; then +if [[ "${BAZEL_BUILD_EXTRA_OPTIONS[*]}" =~ "clang-cl" ]]; then FAIL_GROUP=clang_cl fi From 59f10592e8b2c6714fbd917014272dc3f6cb8be3 Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Thu, 14 Jan 2021 13:55:16 -0600 Subject: [PATCH 12/16] Add explanation of failures with logs - retest sni_dynamic_forward_proxy for error output Signed-off-by: William A Rowe Jr --- test/common/network/BUILD | 8 ++++---- test/extensions/filters/http/dynamic_forward_proxy/BUILD | 3 +++ .../filters/network/sni_dynamic_forward_proxy/BUILD | 2 -- test/extensions/quic_listeners/quiche/integration/BUILD | 5 ++++- test/integration/BUILD | 5 ++++- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/test/common/network/BUILD b/test/common/network/BUILD index 8f4dfddf183a..3909f129b1f4 100644 --- a/test/common/network/BUILD +++ b/test/common/network/BUILD @@ -105,10 +105,6 @@ envoy_cc_test( "//conditions:default": [], }), external_deps = ["abseil_synchronization"], - # TODO(envoyproxy/windows-dev): Under winsock2, reverse lookup of ::1/127.0.0.1 may not - # resolve to localhost, even when explicitly defined in Windows\System32\drivers\etc\hosts - # depending on the DNS provider and domain configuration - tags = ["fails_on_clang_cl"], deps = [ "//include/envoy/event:dispatcher_interface", "//include/envoy/network:dns_interface", @@ -139,6 +135,10 @@ envoy_cc_test( # Used in createDnsResolver to force creation of DnsResolverImpl when running test on macOS. "--runtime-feature-disable-for-tests=envoy.restart_features.use_apple_api_for_dns_lookups", ], + # TODO(envoyproxy/windows-dev): Under winsock2 this is behaving unusually for windows, even as + # 127.0.0.1 and ::1 are explicitly added to `c:\windows\system32\drivers\etc\hosts` ... see: + # https://gist.github.com/wrowe/24fe5b93b58bb444bce7ecc134905395 + tags = ["fails_on_clang_cl"], deps = [ "//include/envoy/event:dispatcher_interface", "//include/envoy/network:address_interface", diff --git a/test/extensions/filters/http/dynamic_forward_proxy/BUILD b/test/extensions/filters/http/dynamic_forward_proxy/BUILD index bf2a85ad0146..85b2553f2e33 100644 --- a/test/extensions/filters/http/dynamic_forward_proxy/BUILD +++ b/test/extensions/filters/http/dynamic_forward_proxy/BUILD @@ -51,6 +51,9 @@ envoy_extension_cc_test( "//test/config/integration/certs", ], extension_name = "envoy.filters.http.dynamic_forward_proxy", + # TODO(envoyproxy/windows-dev): Diagnose failure shown on clang-cl build, see: + # https://gist.github.com/wrowe/a152cb1d12c2f751916122aed39d8517 + tags = ["fails_on_clang_cl"], deps = [ "//source/extensions/clusters/dynamic_forward_proxy:cluster", "//source/extensions/filters/http/dynamic_forward_proxy:config", diff --git a/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD b/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD index 8e73513841c2..66d033ebfb87 100644 --- a/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD +++ b/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD @@ -33,8 +33,6 @@ envoy_extension_cc_test( "//test/config/integration/certs", ], extension_name = "envoy.filters.network.sni_dynamic_forward_proxy", - # TODO(envoyproxy/windows-dev): Diagnose failure building with clang-cl (msvc shows no issues) - tags = ["fails_on_clang_cl"], deps = [ "//source/extensions/clusters/dynamic_forward_proxy:cluster", "//source/extensions/filters/listener/tls_inspector:config", diff --git a/test/extensions/quic_listeners/quiche/integration/BUILD b/test/extensions/quic_listeners/quiche/integration/BUILD index 0bfd43729c04..1f5ad0d2e807 100644 --- a/test/extensions/quic_listeners/quiche/integration/BUILD +++ b/test/extensions/quic_listeners/quiche/integration/BUILD @@ -13,12 +13,15 @@ envoy_cc_test( size = "medium", srcs = ["quic_http_integration_test.cc"], data = ["//test/config/integration/certs"], - # TODO(envoyproxy/windows-dev): Diagnose why opt build test under Windows GCP RBE + # TODO(envoyproxy/windows-dev): Diagnose failure shown only on clang-cl build, see: + # https://gist.github.com/wrowe/a152cb1d12c2f751916122aed39d8517 + # TODO(envoyproxy/windows-dev): Diagnose timeout, why opt build test under Windows GCP RBE # takes 10x as long as on linux (>300s vs ~30s). Shards = 2 solves for windows, see: # https://github.com/envoyproxy/envoy/pull/13713/files#r512160087 # Each of these tests exceeds 20s; # QuicHttpIntegrationTests/QuicHttpIntegrationTest.MultipleQuicConnections[With|No]BPF* tags = [ + "fails_on_clang_cl", "fails_on_windows", "nofips", ], diff --git a/test/integration/BUILD b/test/integration/BUILD index e3e1549221ca..c133a1330e9c 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -1129,7 +1129,10 @@ envoy_cc_test( # TODO(envoyproxy/windows-dev): The key rotation in SdsDynamicKeyRotationIntegrationTest via # TestEnvironment::renameFile() fails on Windows. The renameFile() implementation does not # correctly handle symlinks. - tags = ["fails_on_windows"], + tags = [ + "fails_on_clang_cl", + "fails_on_windows", + ], deps = [ ":http_integration_lib", "//source/common/config:api_version_lib", From 2e289890c32927833653c4f5cd2d1182133b6119 Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Thu, 14 Jan 2021 16:10:20 -0600 Subject: [PATCH 13/16] Job changes per PR review - msvc-cl 'release' and 'clang-cl' jobs in parallel - share repository cache since they share identical dependencies Signed-off-by: William A Rowe Jr --- .azure-pipelines/pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index bd49f07e2031..281070912ec3 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -416,14 +416,13 @@ stages: condition: always() - job: clang_cl - dependsOn: ["release"] timeoutInMinutes: 120 pool: vmImage: "windows-latest" steps: - task: Cache@2 inputs: - key: '"windows.clang-cl" | ./WORKSPACE | **/*.bzl' + key: '"windows.release" | ./WORKSPACE | **/*.bzl' path: $(Build.StagingDirectory)/repository_cache continueOnError: true - bash: ci/run_envoy_docker.sh ci/windows_ci_steps.sh From e7ecf59eee5701c83cb567bc29a9ac34be289f3a Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Thu, 14 Jan 2021 19:53:48 -0600 Subject: [PATCH 14/16] Remaining test case failing in CI under clang-cl build Signed-off-by: William A Rowe Jr --- .../extensions/filters/network/sni_dynamic_forward_proxy/BUILD | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD b/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD index 66d033ebfb87..4fa3f7db3569 100644 --- a/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD +++ b/test/extensions/filters/network/sni_dynamic_forward_proxy/BUILD @@ -33,6 +33,9 @@ envoy_extension_cc_test( "//test/config/integration/certs", ], extension_name = "envoy.filters.network.sni_dynamic_forward_proxy", + # TODO(envoyproxy/windows-dev): Diagnose failure shown only on clang-cl build, see: + # https://gist.github.com/wrowe/12b0b7579791c541c789c98563999a2e + tags = ["fails_on_clang_cl"], deps = [ "//source/extensions/clusters/dynamic_forward_proxy:cluster", "//source/extensions/filters/listener/tls_inspector:config", From f153afd00fb981aed7480732fd9f9fc4763f90a1 Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Sun, 17 Jan 2021 00:07:08 -0600 Subject: [PATCH 15/16] Restore windows-docker job timeout - suggested by sunjayBhatia as Windows docker images are rather large and can take significant time to compose. Signed-off-by: William A Rowe Jr --- .azure-pipelines/pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 35ac90f6fb95..bdc7908fa18e 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -452,6 +452,7 @@ stages: - job: docker dependsOn: ["release"] + timeoutInMinutes: 120 pool: vmImage: "windows-latest" steps: From 82cd4a7016641f848902f05243a5c6eb391c3939 Mon Sep 17 00:00:00 2001 From: William A Rowe Jr Date: Thu, 21 Jan 2021 10:45:28 -0600 Subject: [PATCH 16/16] Simplify summary output as it is unused - This was put place with a gross of test failures, we are down to a handful of test failures and a dozen and a half deliberately skipped tests on the windows architecture - Leave an example of how to list all tests with a given tag Signed-off-by: William A Rowe Jr --- ci/windows_ci_steps.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ci/windows_ci_steps.sh b/ci/windows_ci_steps.sh index 16f2556d989b..466b5b771f8b 100755 --- a/ci/windows_ci_steps.sh +++ b/ci/windows_ci_steps.sh @@ -88,10 +88,5 @@ echo "running flaky test reporting script" # Build tests that are known flaky or failing to ensure no compilation regressions bazel "${BAZEL_STARTUP_OPTIONS[@]}" build "${BAZEL_BUILD_OPTIONS[@]}" //test/... --test_tag_filters=-skip_on_windows,fails_on_${FAIL_GROUP} --build_tests_only -# Summarize tests bypasssed to monitor the progress of porting to Windows -echo "Tests bypassed as skip_on_windows: $(bazel "${BAZEL_STARTUP_OPTIONS[@]}" query 'kind(".*test rule", attr("tags", "skip_on_windows", //test/...))' 2>/dev/null | sort | wc -l) known unbuildable or inapplicable tests" -if [[ "${FAIL_GROUP}" == "clang_cl" ]]; then - echo "Tests bypassed as fails_on_clang_cl} $(bazel "${BAZEL_STARTUP_OPTIONS[@]}" query 'kind(".*test rule", attr("tags", "fails_on_clang_cl}", //test/...))' 2>/dev/null | sort | wc -l) known incompatible tests" -else - echo "Tests bypassed as fails_on_windows} $(bazel "${BAZEL_STARTUP_OPTIONS[@]}" query 'kind(".*test rule", attr("tags", "fails_on_windows}", //test/...))' 2>/dev/null | sort | wc -l) known incompatible tests" -fi +# Summarize known unbuildable or inapplicable tests (example) +# bazel "${BAZEL_STARTUP_OPTIONS[@]}" query 'kind(".*test rule", attr("tags", "skip_on_windows", //test/...))' 2>/dev/null | sort