From 86a8e199e3abe0568aca7acadb6906aebb8210bb Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Fri, 20 Dec 2024 19:27:32 +0000 Subject: [PATCH 01/30] Update Envoy to 66cc217 (Dec 20, 2024) Signed-off-by: Sebastian Avila --- .bazelrc | 10 ++++++++-- .bazelversion | 2 +- bazel/repositories.bzl | 4 ++-- ci/do_ci.sh | 1 - tools/code_format/config.yaml | 4 +--- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.bazelrc b/.bazelrc index 0d6df178d..367a2bef1 100644 --- a/.bazelrc +++ b/.bazelrc @@ -19,6 +19,8 @@ build:macos --copt -UDEBUG # Startup options cannot be selected via config. startup --host_jvm_args=-Xmx3g +common --noenable_bzlmod + fetch --color=yes run --color=yes @@ -98,6 +100,7 @@ build:clang --action_env=BAZEL_COMPILER=clang build:clang --linkopt=-fuse-ld=lld build:clang --action_env=CC=clang --host_action_env=CC=clang build:clang --action_env=CXX=clang++ --host_action_env=CXX=clang++ +build:clang --incompatible_enable_cc_toolchain_resolution=false # Flags for Clang + PCH build:clang-pch --spawn_strategy=local @@ -123,6 +126,7 @@ build:gcc --cxxopt=-Wno-missing-requires # not in GCC 11 and GCC 11 is what is used in docker-gcc # configuration currently build:gcc --cxxopt=-Wno-unknown-warning +build:gcc --incompatible_enable_cc_toolchain_resolution=false # Clang-tidy # TODO(phlax): enable this, its throwing some errors as well as finding more issues @@ -232,6 +236,7 @@ build:libc++ --action_env=BAZEL_LINKLIBS=-l%:libc++.a:-l%:libc++abi.a build:libc++ --action_env=BAZEL_LINKOPTS=-lm:-pthread build:libc++ --define force_libcpp=enabled build:clang-libc++ --config=libc++ +build:clang-libc++ --action_env=ARFLAGS=r build:libc++20 --config=libc++ # gRPC has a lot of deprecated-enum-enum-conversion warning. Remove once it is addressed @@ -283,6 +288,7 @@ build:cache-local --remote_cache=grpc://localhost:9092 # Remote execution: https://docs.bazel.build/versions/master/remote-execution.html build:rbe-toolchain --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 +build:rbe-toolchain --incompatible_enable_cc_toolchain_resolution=false build:rbe-toolchain-clang --config=rbe-toolchain build:rbe-toolchain-clang --platforms=@envoy//bazel/rbe/toolchains:rbe_linux_clang_platform @@ -390,7 +396,7 @@ build:compile-time-options --@envoy//source/extensions/filters/http/kill_request # Docker sandbox # NOTE: Update this from https://github.com/envoyproxy/envoy-build-tools/blob/main/toolchains/rbe_toolchains_config.bzl#L8 -build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:f94a38f62220a2b017878b790b6ea98a0f6c5f9c@sha256:2dd96b6f43c08ccabd5f4747fce5854f5f96af509b32e5cf6493f136e9833649 +build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:d2be0c198feda0c607fa33209da01bf737ef373f@sha256:026fb6710a3e55716cc1aba129f613f9834212d2deb4ea875ac9d2c37ca19aa3 build:docker-sandbox --spawn_strategy=docker build:docker-sandbox --strategy=Javac=docker build:docker-sandbox --strategy=Closure=docker @@ -559,7 +565,7 @@ common:bes-envoy-engflow --bes_timeout=3600s common:bes-envoy-engflow --bes_upload_mode=fully_async common:bes-envoy-engflow --nolegacy_important_outputs common:rbe-envoy-engflow --remote_executor=grpcs://mordenite.cluster.engflow.com -common:rbe-envoy-engflow --remote_default_exec_properties=container-image=docker://gcr.io/envoy-ci/envoy-build@sha256:7adc40c09508f957624c4d2e0f5aeecb73a59207ee6ded53b107eac828c091b2 +common:rbe-envoy-engflow --remote_default_exec_properties=container-image=docker://gcr.io/envoy-ci/envoy-build@sha256:6e494ff9bcfa96868cb43f1200f2126cdab39d62db52a5dda80c8ec1694a93ee common:rbe-envoy-engflow --jobs=200 common:rbe-envoy-engflow --define=engflow_rbe=true diff --git a/.bazelversion b/.bazelversion index f22d756da..a8a188756 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.5.0 +7.1.2 diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 3e28a68b9..7f09171a1 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -1,7 +1,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -ENVOY_COMMIT = "6c6f6200b7d3236ea1de96dfcf7ac78b81d1452f" -ENVOY_SHA = "c9abbdd6973ebe69cd21989dceed79b56bc81e2a3bab1e6c8db86bbf28e6bec5" +ENVOY_COMMIT = "66cc2175fe5044117c9f00af8d09293012778000" +ENVOY_SHA = "7afe1aca43b540aa6dcddb3c50e87baf087e0f52ea3d9407351726e421b11e53" HDR_HISTOGRAM_C_VERSION = "0.11.2" # October 12th, 2020 HDR_HISTOGRAM_C_SHA = "637f28b5f64de2e268131e4e34e6eef0b91cf5ff99167db447d9b2825eae6bad" diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 8bbc7cb66..a102ad8f5 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -279,7 +279,6 @@ fi export BAZEL_EXTRA_TEST_OPTIONS="--test_env=ENVOY_IP_TEST_VERSIONS=v4only ${BAZEL_EXTRA_TEST_OPTIONS}" export BAZEL_BUILD_OPTIONS=" \ --verbose_failures ${BAZEL_OPTIONS} --action_env=HOME --action_env=PYTHONUSERBASE \ ---experimental_local_memory_estimate \ --experimental_generate_json_trace_profile ${BAZEL_BUILD_EXTRA_OPTIONS}" echo "Running with ${NUM_CPUS} cpus and BAZEL_BUILD_OPTIONS: ${BAZEL_BUILD_OPTIONS}" diff --git a/tools/code_format/config.yaml b/tools/code_format/config.yaml index d428968ec..87668bf80 100644 --- a/tools/code_format/config.yaml +++ b/tools/code_format/config.yaml @@ -169,9 +169,7 @@ paths: - source/extensions/compression/zstd/common/dictionary_manager.h - source/extensions/filters/http/adaptive_concurrency/controller - source/extensions/filters/http/admission_control - - source/extensions/filters/http/api_key_auth - source/extensions/filters/http/aws_lambda - - source/extensions/filters/http/bandwidth_limit - source/extensions/filters/http/basic_auth - source/extensions/filters/http/cache - source/extensions/filters/http/cdn_loop @@ -185,7 +183,6 @@ paths: - source/extensions/filters/http/grpc_json_reverse_transcoder - source/extensions/filters/http/grpc_json_transcoder - source/extensions/filters/http/grpc_stats - - source/extensions/filters/http/header_mutation - source/extensions/filters/http/header_to_metadata - source/extensions/filters/http/health_check - source/extensions/filters/http/ip_tagging @@ -477,6 +474,7 @@ visibility_excludes: - source/extensions/clusters/static/ - source/extensions/clusters/original_dst/ - source/extensions/clusters/logical_dns/ +- source/extensions/clusters/dns/ - source/extensions/early_data/BUILD - source/extensions/filters/http/buffer/BUILD - source/extensions/filters/network/common/BUILD From ffdcecc0d523673022512d67c57679c4c3fc4651 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Fri, 20 Dec 2024 22:32:39 +0000 Subject: [PATCH 02/30] Retrigger CI Signed-off-by: Sebastian Avila From 588a2a1437e5877c92de5f21a57c80aa71f5c35b Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Sat, 21 Dec 2024 07:02:04 +0000 Subject: [PATCH 03/30] Debugging benchmark in pipeline. Signed-off-by: Sebastian Avila --- ci/do_ci.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/do_ci.sh b/ci/do_ci.sh index a102ad8f5..82408f8a1 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -212,6 +212,7 @@ function do_benchmark_with_own_binaries() { --test_arg=--log-cli-level=info \ --test_env=HEAPPROFILE= \ --test_env=HEAPCHECK= \ + --test_output=all \ --compilation_mode=opt \ --cxxopt=-g \ --cxxopt=-ggdb3 \ From dbef6ae8f412ba38a57b81175c6dff3c4b784a2a Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 16:36:51 +0000 Subject: [PATCH 04/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 0e819d825..a9f3ac690 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -43,6 +43,16 @@ stages: - template: bazel.yml parameters: ciTarget: $(CI_TARGET) + - bash: | + echo "File ls:" + ls -l + displayName: "ls" + - task: PublishPipelineArtifact@1 + condition: always() + displayName: 'Publish Benchmark Test Log' + inputs: + targetPath: $(ENVOY_FAILED_TEST_LOGS)/**/test.log + artifactName: BenchmarkTestLog-$(System.JobAttempt) - stage: test_gcc dependsOn: ["check"] From 4eeffb45c555e58c9ab9a641bc4c04d4e0e64352 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 17:07:23 +0000 Subject: [PATCH 05/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index a9f3ac690..f339e4aca 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -51,7 +51,7 @@ stages: condition: always() displayName: 'Publish Benchmark Test Log' inputs: - targetPath: $(ENVOY_FAILED_TEST_LOGS)/**/test.log + targetPath: bazel-testlogs artifactName: BenchmarkTestLog-$(System.JobAttempt) - stage: test_gcc From bb54df68f583fa866988c0182af4625ed08c3345 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 17:28:14 +0000 Subject: [PATCH 06/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index f339e4aca..b08e6ddf8 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -51,7 +51,7 @@ stages: condition: always() displayName: 'Publish Benchmark Test Log' inputs: - targetPath: bazel-testlogs + targetPath: bazel-testlogs/**/test.log artifactName: BenchmarkTestLog-$(System.JobAttempt) - stage: test_gcc From 0d1c393b26e888e4e3a7d1a88007ccf220ffc34b Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 17:53:23 +0000 Subject: [PATCH 07/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .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 b08e6ddf8..d1973c22e 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -46,12 +46,13 @@ stages: - bash: | echo "File ls:" ls -l + condition: always() displayName: "ls" - task: PublishPipelineArtifact@1 condition: always() displayName: 'Publish Benchmark Test Log' inputs: - targetPath: bazel-testlogs/**/test.log + targetPath: bazel-testlogs/benchmarks/test_dynamic_benchmarks/test.log artifactName: BenchmarkTestLog-$(System.JobAttempt) - stage: test_gcc From 1bbb4b08fd1e8008c2b16f1beafe04d89287e5dc Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 18:32:33 +0000 Subject: [PATCH 08/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 46 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index d1973c22e..4c28f767c 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -4,28 +4,28 @@ trigger: - "main" stages: -- stage: check - dependsOn: [] - pool: "envoy-x64-large" - jobs: - - job: build_and_format - displayName: "do_ci.sh" - dependsOn: [] - strategy: - maxParallel: 2 - matrix: - build: - CI_TARGET: "build" - format: - CI_TARGET: "check_format" - timeoutInMinutes: 120 - steps: - - template: bazel.yml - parameters: - ciTarget: $(CI_TARGET) +#- stage: check +# dependsOn: [] +# pool: "envoy-x64-large" +# jobs: +# - job: build_and_format +# displayName: "do_ci.sh" +# dependsOn: [] +# strategy: +# maxParallel: 2 +# matrix: +# build: +# CI_TARGET: "build" +# format: +# CI_TARGET: "check_format" +# timeoutInMinutes: 120 +# steps: +# - template: bazel.yml +# parameters: +# ciTarget: $(CI_TARGET) - stage: test - dependsOn: ["check"] + dependsOn: [] pool: "envoy-x64-large" jobs: - job: test_and_benchmark @@ -34,8 +34,8 @@ stages: # Both test and benchmark need dedicated resources for stability. maxParallel: 1 matrix: - test: - CI_TARGET: "test" +# test: +# CI_TARGET: "test" benchmark: CI_TARGET: "benchmark_with_own_binaries" timeoutInMinutes: 120 @@ -45,7 +45,7 @@ stages: ciTarget: $(CI_TARGET) - bash: | echo "File ls:" - ls -l + ls -l bazel-testlogs condition: always() displayName: "ls" - task: PublishPipelineArtifact@1 From 3e803c651dbb2c25fd21af0f93d02b8ee3743416 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 18:45:01 +0000 Subject: [PATCH 09/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 4c28f767c..c35a42bc4 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -4,28 +4,28 @@ trigger: - "main" stages: -#- stage: check -# dependsOn: [] -# pool: "envoy-x64-large" -# jobs: -# - job: build_and_format -# displayName: "do_ci.sh" -# dependsOn: [] -# strategy: -# maxParallel: 2 -# matrix: -# build: -# CI_TARGET: "build" -# format: -# CI_TARGET: "check_format" -# timeoutInMinutes: 120 -# steps: -# - template: bazel.yml -# parameters: -# ciTarget: $(CI_TARGET) +- stage: check + dependsOn: [] + pool: "envoy-x64-large" + jobs: + - job: build_and_format + displayName: "do_ci.sh" + dependsOn: [] + strategy: + maxParallel: 2 + matrix: + build: + CI_TARGET: "build" + format: + CI_TARGET: "check_format" + timeoutInMinutes: 120 + steps: + - template: bazel.yml + parameters: + ciTarget: $(CI_TARGET) - stage: test - dependsOn: [] + dependsOn: ["check"] pool: "envoy-x64-large" jobs: - job: test_and_benchmark From d6d5f974ace289312a6565a3070847cbedd52aee Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 19:12:22 +0000 Subject: [PATCH 10/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index c35a42bc4..9f31457ba 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -45,6 +45,7 @@ stages: ciTarget: $(CI_TARGET) - bash: | echo "File ls:" + ls -l ls -l bazel-testlogs condition: always() displayName: "ls" From 62ef62638d8210ccd9d79edef85a3ce4f74ecd08 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 19:45:30 +0000 Subject: [PATCH 11/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 9f31457ba..234bcc8f5 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -46,6 +46,9 @@ stages: - bash: | echo "File ls:" ls -l + echo "File ls bazel out" + ls -l bazel-out + echo "File ls testlogs:" ls -l bazel-testlogs condition: always() displayName: "ls" From 45fbbfff742ea53d458ad5dec7eef50079aac428 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 20:05:50 +0000 Subject: [PATCH 12/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 234bcc8f5..82607ed96 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -50,13 +50,17 @@ stages: ls -l bazel-out echo "File ls testlogs:" ls -l bazel-testlogs + BAZEL_OUT=$(readlink bazel-testlogs) + echo "readlink" + ls -l $BAZEL_OUT + echo "##vso[task.setvariable variable=TARGET_LOG_PATH]$BAZEL_OUT" condition: always() displayName: "ls" - task: PublishPipelineArtifact@1 condition: always() displayName: 'Publish Benchmark Test Log' inputs: - targetPath: bazel-testlogs/benchmarks/test_dynamic_benchmarks/test.log + targetPath: $(TARGET_LOG_PATH)/benchmarks/test_dynamic_benchmarks/test.log artifactName: BenchmarkTestLog-$(System.JobAttempt) - stage: test_gcc From 442b552533a4f52947c47c22dedfd99160491497 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 20:51:13 +0000 Subject: [PATCH 13/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 82607ed96..ae06c447f 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -51,16 +51,20 @@ stages: echo "File ls testlogs:" ls -l bazel-testlogs BAZEL_OUT=$(readlink bazel-testlogs) + echo "Listing docker cotnainers" + docker ps + CONTAINER_ID=$(docker ps -aqf "name=envoy_ci") + # Copy the testlogs directory to the host + docker cp $CONTAINER_ID:$BAZEL_OUT $(Build.SourcesDirectory) echo "readlink" - ls -l $BAZEL_OUT - echo "##vso[task.setvariable variable=TARGET_LOG_PATH]$BAZEL_OUT" + ls -l condition: always() displayName: "ls" - task: PublishPipelineArtifact@1 condition: always() displayName: 'Publish Benchmark Test Log' inputs: - targetPath: $(TARGET_LOG_PATH)/benchmarks/test_dynamic_benchmarks/test.log + targetPath: $(Build.SourcesDirectory)/testlogs artifactName: BenchmarkTestLog-$(System.JobAttempt) - stage: test_gcc From 9eee1aa30b85d210eb1e7048a81b2a715dc8f93e Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 21:22:51 +0000 Subject: [PATCH 14/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index ae06c447f..e534b19bc 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -46,8 +46,8 @@ stages: - bash: | echo "File ls:" ls -l - echo "File ls bazel out" - ls -l bazel-out + echo "File ls bechmarks" + ls -l benchmarks echo "File ls testlogs:" ls -l bazel-testlogs BAZEL_OUT=$(readlink bazel-testlogs) From 3cf866d40d7f13a534bfb3f78004e3a97551aabd Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 21:43:16 +0000 Subject: [PATCH 15/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 44 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index e534b19bc..5693c5dbd 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -4,28 +4,28 @@ trigger: - "main" stages: -- stage: check - dependsOn: [] - pool: "envoy-x64-large" - jobs: - - job: build_and_format - displayName: "do_ci.sh" - dependsOn: [] - strategy: - maxParallel: 2 - matrix: - build: - CI_TARGET: "build" - format: - CI_TARGET: "check_format" - timeoutInMinutes: 120 - steps: - - template: bazel.yml - parameters: - ciTarget: $(CI_TARGET) +#- stage: check +# dependsOn: [] +# pool: "envoy-x64-large" +# jobs: +# - job: build_and_format +# displayName: "do_ci.sh" +# dependsOn: [] +# strategy: +# maxParallel: 2 +# matrix: +# build: +# CI_TARGET: "build" +# format: +# CI_TARGET: "check_format" +# timeoutInMinutes: 120 +# steps: +# - template: bazel.yml +# parameters: +# ciTarget: $(CI_TARGET) - stage: test - dependsOn: ["check"] + dependsOn: [] pool: "envoy-x64-large" jobs: - job: test_and_benchmark @@ -64,11 +64,11 @@ stages: condition: always() displayName: 'Publish Benchmark Test Log' inputs: - targetPath: $(Build.SourcesDirectory)/testlogs + targetPath: $ENVOY_FAILED_TEST_LOGS artifactName: BenchmarkTestLog-$(System.JobAttempt) - stage: test_gcc - dependsOn: ["check"] + dependsOn: [] pool: "envoy-x64-large" jobs: - job: test_gcc From 8a849590926562a026fc2f3781060e304ed698ea Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 21:54:21 +0000 Subject: [PATCH 16/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 5693c5dbd..2c27857a3 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -64,7 +64,7 @@ stages: condition: always() displayName: 'Publish Benchmark Test Log' inputs: - targetPath: $ENVOY_FAILED_TEST_LOGS + targetPath: $(ENVOY_FAILED_TEST_LOGS) artifactName: BenchmarkTestLog-$(System.JobAttempt) - stage: test_gcc From af42203bd2015e96b675a0c7650820384b8dca60 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 22:07:30 +0000 Subject: [PATCH 17/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 2c27857a3..d29cf3f77 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -46,8 +46,8 @@ stages: - bash: | echo "File ls:" ls -l - echo "File ls bechmarks" - ls -l benchmarks + echo "File ls generated" + ls -l generated echo "File ls testlogs:" ls -l bazel-testlogs BAZEL_OUT=$(readlink bazel-testlogs) From b01b1ca7e74339a834c8171e37a0646b5ebf62f0 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 22:16:12 +0000 Subject: [PATCH 18/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index d29cf3f77..c0b890263 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -50,6 +50,7 @@ stages: ls -l generated echo "File ls testlogs:" ls -l bazel-testlogs + echo "$ENVOY_FAILED_TEST_LOGS" BAZEL_OUT=$(readlink bazel-testlogs) echo "Listing docker cotnainers" docker ps From 338e700ae79be711d0cbdea45c31205c869149e0 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 22:33:36 +0000 Subject: [PATCH 19/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- ci/do_ci.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 82408f8a1..37f7a68ca 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -20,6 +20,9 @@ export NIGHTHAWK_BUILD_ARCH=$(uname -m) export BAZEL_REMOTE_CACHE=${BAZEL_REMOTE_CACHE:=""} # The directory to copy built binaries to. export BUILD_DIR="" +# This is where we dump failed test logs for CI collection. +export ENVOY_FAILED_TEST_LOGS="${SRCDIR}"/generated/failed-testlogs +mkdir -p "${ENVOY_FAILED_TEST_LOGS}" # We build in steps to avoid running out of memory in CI. # This list doesn't have to be complete, execution of bazel test will build any From ece7d15ae22de78fd962a25bcb8a7a23cfcb5294 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 23:09:43 +0000 Subject: [PATCH 20/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index c0b890263..a3888cf5c 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -47,7 +47,7 @@ stages: echo "File ls:" ls -l echo "File ls generated" - ls -l generated + ls -l generated/failed-testlogs echo "File ls testlogs:" ls -l bazel-testlogs echo "$ENVOY_FAILED_TEST_LOGS" @@ -65,7 +65,7 @@ stages: condition: always() displayName: 'Publish Benchmark Test Log' inputs: - targetPath: $(ENVOY_FAILED_TEST_LOGS) + targetPath: $(Build.SourcesDirectory)/generated/failed-testlogs artifactName: BenchmarkTestLog-$(System.JobAttempt) - stage: test_gcc From 4b7e4fa7cd227f2ada4aa77d12d10561fd153362 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Mon, 23 Dec 2024 23:27:56 +0000 Subject: [PATCH 21/30] Debugging benchmark by pusblishing test log artifact Signed-off-by: Sebastian Avila --- .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 a3888cf5c..88b93dac5 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -48,8 +48,7 @@ stages: ls -l echo "File ls generated" ls -l generated/failed-testlogs - echo "File ls testlogs:" - ls -l bazel-testlogs + cat bazel.output.txt echo "$ENVOY_FAILED_TEST_LOGS" BAZEL_OUT=$(readlink bazel-testlogs) echo "Listing docker cotnainers" From 16539f12c51305566602dbf65ba215fbbc09e473 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Tue, 24 Dec 2024 05:17:51 +0000 Subject: [PATCH 22/30] Triggering benchmark with bazel 6.5.0 Signed-off-by: Sebastian Avila --- .bazelversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelversion b/.bazelversion index a8a188756..f22d756da 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.1.2 +6.5.0 From 5b0b2fc2d14774b9534c8a9e622b8e9ac4363fe0 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Tue, 24 Dec 2024 06:16:55 +0000 Subject: [PATCH 23/30] Verbose failures Signed-off-by: Sebastian Avila --- .bazelversion | 2 +- ci/do_ci.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.bazelversion b/.bazelversion index f22d756da..a8a188756 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.5.0 +7.1.2 diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 37f7a68ca..ea738294f 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -216,6 +216,8 @@ function do_benchmark_with_own_binaries() { --test_env=HEAPPROFILE= \ --test_env=HEAPCHECK= \ --test_output=all \ + --verbose_failures \ + --verbose_explanations \ --compilation_mode=opt \ --cxxopt=-g \ --cxxopt=-ggdb3 \ From cb46052d46b8dcdf9f4bc246f20bd14c69ac2a48 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Tue, 24 Dec 2024 06:41:42 +0000 Subject: [PATCH 24/30] printing env Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 88b93dac5..62dbb6b8e 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -48,16 +48,10 @@ stages: ls -l echo "File ls generated" ls -l generated/failed-testlogs + echo "env vars" + env + echo "bazel output" cat bazel.output.txt - echo "$ENVOY_FAILED_TEST_LOGS" - BAZEL_OUT=$(readlink bazel-testlogs) - echo "Listing docker cotnainers" - docker ps - CONTAINER_ID=$(docker ps -aqf "name=envoy_ci") - # Copy the testlogs directory to the host - docker cp $CONTAINER_ID:$BAZEL_OUT $(Build.SourcesDirectory) - echo "readlink" - ls -l condition: always() displayName: "ls" - task: PublishPipelineArtifact@1 From 830d9b64fa4c9571a622f531d62ba2ed94386c2f Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Tue, 24 Dec 2024 06:59:05 +0000 Subject: [PATCH 25/30] setting log level to debug Signed-off-by: Sebastian Avila --- benchmarks/dynamic_benchmarks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/dynamic_benchmarks.py b/benchmarks/dynamic_benchmarks.py index 540087c53..a8edfed0a 100644 --- a/benchmarks/dynamic_benchmarks.py +++ b/benchmarks/dynamic_benchmarks.py @@ -14,6 +14,6 @@ path = os.path.dirname(os.path.realpath(__file__)) r = pytest.main([ "--rootdir=" + path, "-x", (path + '/dynamic_test/'), "-p", "no:cacheprovider", "--log-level", - "INFO", "--log-cli-level", "INFO", *sys.argv + "DEBUG", "--log-cli-level", "DEBUG", *sys.argv ]) exit(r) From 7f9235c5efc418be502f7b1547d57b9f9ac965fb Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Wed, 25 Dec 2024 17:16:28 +0000 Subject: [PATCH 26/30] Increasing stdout size Signed-off-by: Sebastian Avila --- .bazelrc | 2 +- benchmarks/dynamic_benchmarks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bazelrc b/.bazelrc index 367a2bef1..ef1f20d57 100644 --- a/.bazelrc +++ b/.bazelrc @@ -67,7 +67,7 @@ build --incompatible_config_setting_private_default_visibility build --incompatible_enforce_config_setting_visibility test --test_verbose_timeout_warnings -test --experimental_ui_max_stdouterr_bytes=11712829 #default 1048576 +test --experimental_ui_max_stdouterr_bytes=83886080 #default 1048576 # Allow tags to influence execution requirements common --experimental_allow_tags_propagation diff --git a/benchmarks/dynamic_benchmarks.py b/benchmarks/dynamic_benchmarks.py index a8edfed0a..540087c53 100644 --- a/benchmarks/dynamic_benchmarks.py +++ b/benchmarks/dynamic_benchmarks.py @@ -14,6 +14,6 @@ path = os.path.dirname(os.path.realpath(__file__)) r = pytest.main([ "--rootdir=" + path, "-x", (path + '/dynamic_test/'), "-p", "no:cacheprovider", "--log-level", - "DEBUG", "--log-cli-level", "DEBUG", *sys.argv + "INFO", "--log-cli-level", "INFO", *sys.argv ]) exit(r) From 459b178c0a1ecff50a33104fa0d73e13ebb2602b Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Wed, 25 Dec 2024 19:00:59 +0000 Subject: [PATCH 27/30] Removing hack Signed-off-by: Sebastian Avila --- benchmarks/dynamic_benchmarks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/dynamic_benchmarks.py b/benchmarks/dynamic_benchmarks.py index 540087c53..f0af64395 100644 --- a/benchmarks/dynamic_benchmarks.py +++ b/benchmarks/dynamic_benchmarks.py @@ -8,7 +8,7 @@ import sys # Workaround for https://github.com/bazelbuild/rules_python/issues/1221 -sys.path += [os.path.dirname(__file__)] +# sys.path += [os.path.dirname(__file__)] if __name__ == '__main__': path = os.path.dirname(os.path.realpath(__file__)) From c2b13d75a7a3e9664b4946331e12fcc90c3863a8 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Thu, 26 Dec 2024 05:53:53 +0000 Subject: [PATCH 28/30] Removing hack Signed-off-by: Sebastian Avila --- benchmarks/dynamic_benchmarks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/benchmarks/dynamic_benchmarks.py b/benchmarks/dynamic_benchmarks.py index f0af64395..d571da286 100644 --- a/benchmarks/dynamic_benchmarks.py +++ b/benchmarks/dynamic_benchmarks.py @@ -8,10 +8,13 @@ import sys # Workaround for https://github.com/bazelbuild/rules_python/issues/1221 -# sys.path += [os.path.dirname(__file__)] +sys.path += [os.path.dirname(__file__)] if __name__ == '__main__': path = os.path.dirname(os.path.realpath(__file__)) + print("printing sys.path") + for p in sys.path: + print(p) r = pytest.main([ "--rootdir=" + path, "-x", (path + '/dynamic_test/'), "-p", "no:cacheprovider", "--log-level", "INFO", "--log-cli-level", "INFO", *sys.argv From c1fb674eb7e2614e8ebf916affb5b0271bea5f32 Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Thu, 26 Dec 2024 06:25:40 +0000 Subject: [PATCH 29/30] Removing hack Signed-off-by: Sebastian Avila --- benchmarks/dynamic_benchmarks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/benchmarks/dynamic_benchmarks.py b/benchmarks/dynamic_benchmarks.py index d571da286..c78e2739e 100644 --- a/benchmarks/dynamic_benchmarks.py +++ b/benchmarks/dynamic_benchmarks.py @@ -11,10 +11,11 @@ sys.path += [os.path.dirname(__file__)] if __name__ == '__main__': - path = os.path.dirname(os.path.realpath(__file__)) + print(os.path.dirname(os.path.realpath(__file__))) print("printing sys.path") for p in sys.path: print(p) + path = os.path.dirname(__file__) r = pytest.main([ "--rootdir=" + path, "-x", (path + '/dynamic_test/'), "-p", "no:cacheprovider", "--log-level", "INFO", "--log-cli-level", "INFO", *sys.argv From 61841b4e0ce7a0ca33b99b5c681885d6fea398fe Mon Sep 17 00:00:00 2001 From: Sebastian Avila Date: Thu, 26 Dec 2024 06:44:01 +0000 Subject: [PATCH 30/30] Cleaning up, final commit. Signed-off-by: Sebastian Avila --- .azure-pipelines/pipelines.yml | 63 ++++++++++++-------------------- .bazelrc | 2 +- benchmarks/dynamic_benchmarks.py | 4 -- ci/do_ci.sh | 6 --- 4 files changed, 24 insertions(+), 51 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 62dbb6b8e..0e819d825 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -4,28 +4,28 @@ trigger: - "main" stages: -#- stage: check -# dependsOn: [] -# pool: "envoy-x64-large" -# jobs: -# - job: build_and_format -# displayName: "do_ci.sh" -# dependsOn: [] -# strategy: -# maxParallel: 2 -# matrix: -# build: -# CI_TARGET: "build" -# format: -# CI_TARGET: "check_format" -# timeoutInMinutes: 120 -# steps: -# - template: bazel.yml -# parameters: -# ciTarget: $(CI_TARGET) +- stage: check + dependsOn: [] + pool: "envoy-x64-large" + jobs: + - job: build_and_format + displayName: "do_ci.sh" + dependsOn: [] + strategy: + maxParallel: 2 + matrix: + build: + CI_TARGET: "build" + format: + CI_TARGET: "check_format" + timeoutInMinutes: 120 + steps: + - template: bazel.yml + parameters: + ciTarget: $(CI_TARGET) - stage: test - dependsOn: [] + dependsOn: ["check"] pool: "envoy-x64-large" jobs: - job: test_and_benchmark @@ -34,8 +34,8 @@ stages: # Both test and benchmark need dedicated resources for stability. maxParallel: 1 matrix: -# test: -# CI_TARGET: "test" + test: + CI_TARGET: "test" benchmark: CI_TARGET: "benchmark_with_own_binaries" timeoutInMinutes: 120 @@ -43,26 +43,9 @@ stages: - template: bazel.yml parameters: ciTarget: $(CI_TARGET) - - bash: | - echo "File ls:" - ls -l - echo "File ls generated" - ls -l generated/failed-testlogs - echo "env vars" - env - echo "bazel output" - cat bazel.output.txt - condition: always() - displayName: "ls" - - task: PublishPipelineArtifact@1 - condition: always() - displayName: 'Publish Benchmark Test Log' - inputs: - targetPath: $(Build.SourcesDirectory)/generated/failed-testlogs - artifactName: BenchmarkTestLog-$(System.JobAttempt) - stage: test_gcc - dependsOn: [] + dependsOn: ["check"] pool: "envoy-x64-large" jobs: - job: test_gcc diff --git a/.bazelrc b/.bazelrc index ef1f20d57..367a2bef1 100644 --- a/.bazelrc +++ b/.bazelrc @@ -67,7 +67,7 @@ build --incompatible_config_setting_private_default_visibility build --incompatible_enforce_config_setting_visibility test --test_verbose_timeout_warnings -test --experimental_ui_max_stdouterr_bytes=83886080 #default 1048576 +test --experimental_ui_max_stdouterr_bytes=11712829 #default 1048576 # Allow tags to influence execution requirements common --experimental_allow_tags_propagation diff --git a/benchmarks/dynamic_benchmarks.py b/benchmarks/dynamic_benchmarks.py index c78e2739e..972045c45 100644 --- a/benchmarks/dynamic_benchmarks.py +++ b/benchmarks/dynamic_benchmarks.py @@ -11,10 +11,6 @@ sys.path += [os.path.dirname(__file__)] if __name__ == '__main__': - print(os.path.dirname(os.path.realpath(__file__))) - print("printing sys.path") - for p in sys.path: - print(p) path = os.path.dirname(__file__) r = pytest.main([ "--rootdir=" + path, "-x", (path + '/dynamic_test/'), "-p", "no:cacheprovider", "--log-level", diff --git a/ci/do_ci.sh b/ci/do_ci.sh index ea738294f..a102ad8f5 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -20,9 +20,6 @@ export NIGHTHAWK_BUILD_ARCH=$(uname -m) export BAZEL_REMOTE_CACHE=${BAZEL_REMOTE_CACHE:=""} # The directory to copy built binaries to. export BUILD_DIR="" -# This is where we dump failed test logs for CI collection. -export ENVOY_FAILED_TEST_LOGS="${SRCDIR}"/generated/failed-testlogs -mkdir -p "${ENVOY_FAILED_TEST_LOGS}" # We build in steps to avoid running out of memory in CI. # This list doesn't have to be complete, execution of bazel test will build any @@ -215,9 +212,6 @@ function do_benchmark_with_own_binaries() { --test_arg=--log-cli-level=info \ --test_env=HEAPPROFILE= \ --test_env=HEAPCHECK= \ - --test_output=all \ - --verbose_failures \ - --verbose_explanations \ --compilation_mode=opt \ --cxxopt=-g \ --cxxopt=-ggdb3 \