diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7019c22a..912be560 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "istio build-tools", - "image": "gcr.io/istio-testing/build-tools:release-1.22-02098ccc0766fde1c577cf9f9258fb43a08ec8c8", + "image": "gcr.io/istio-testing/build-tools:release-1.22-70caecf3832f7f72fccfc9aaa536acb3a69bdc6a", "privileged": true, "remoteEnv": { "USE_GKE_GCLOUD_AUTH_PLUGIN": "True", diff --git a/WORKSPACE b/WORKSPACE index 63cd4128..8f437718 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -22,10 +22,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # 1. Determine SHA256 `wget https://github.com/envoyproxy/envoy/archive/$COMMIT.tar.gz && sha256sum $COMMIT.tar.gz` # 2. Update .bazelversion, envoy.bazelrc and .bazelrc if needed. # -# Commit date: 2024-07-23 -ENVOY_SHA = "fa2490559658e10ecd6f963fae500ecbbed54cc2" +# Commit date: 2025-01-02 +ENVOY_SHA = "583d388e5f7175453ab0acd7fc8c6f31732c2747" -ENVOY_SHA256 = "222a61a21e4e21d24059a6789f03e4bb3fce199c13d84c274caa7dcd6fe49fe2" +ENVOY_SHA256 = "a92e968ef1bfbd8eed052c7f82a95123bda1bb8b20c4150bd1689afd6a75486c" ENVOY_ORG = "envoyproxy" diff --git a/common/.commonfiles.sha b/common/.commonfiles.sha index 4a156537..452450a3 100644 --- a/common/.commonfiles.sha +++ b/common/.commonfiles.sha @@ -1 +1 @@ -2f988bb7f975a3426624f4d9e92ea26d542b1b6f +2c0d7e2143bb1e1f698b4ec4c2d586340a8d21b9 diff --git a/common/scripts/setup_env.sh b/common/scripts/setup_env.sh index 604671c1..3409c24b 100755 --- a/common/scripts/setup_env.sh +++ b/common/scripts/setup_env.sh @@ -75,7 +75,7 @@ fi TOOLS_REGISTRY_PROVIDER=${TOOLS_REGISTRY_PROVIDER:-gcr.io} PROJECT_ID=${PROJECT_ID:-istio-testing} if [[ "${IMAGE_VERSION:-}" == "" ]]; then - IMAGE_VERSION=release-1.22-02098ccc0766fde1c577cf9f9258fb43a08ec8c8 + IMAGE_VERSION=release-1.22-70caecf3832f7f72fccfc9aaa536acb3a69bdc6a fi if [[ "${IMAGE_NAME:-}" == "" ]]; then IMAGE_NAME=build-tools diff --git a/envoy.bazelrc b/envoy.bazelrc index b693a902..6a59914c 100644 --- a/envoy.bazelrc +++ b/envoy.bazelrc @@ -42,10 +42,6 @@ build:windows --action_env=PATH --host_action_env=PATH # Requires setting `BAZEL_VOLATILE_DIRTY` in the env. build --action_env=BAZEL_VOLATILE_DIRTY --host_action_env=BAZEL_VOLATILE_DIRTY -# Prevent stamped caches from busting (eg in PRs) -# Requires setting `BAZEL_FAKE_SCM_REVISION` in the env. -build --action_env=BAZEL_FAKE_SCM_REVISION --host_action_env=BAZEL_FAKE_SCM_REVISION - build --test_summary=terse build:docs-ci --action_env=DOCS_RST_CHECK=1 --host_action_env=DOCS_RST_CHECK=1 @@ -406,9 +402,9 @@ build:remote-ci --config=ci build:remote-ci --remote_download_minimal # Note this config is used by mobile CI also. -build:ci --noshow_progress -build:ci --noshow_loading_progress -build:ci --test_output=errors +common:ci --noshow_progress +common:ci --noshow_loading_progress +common:ci --test_output=errors # Fuzz builds @@ -523,19 +519,29 @@ build:rbe-engflow --bes_timeout=3600s build:rbe-engflow --bes_upload_mode=fully_async build:rbe-engflow --nolegacy_important_outputs -build:cache-envoy-engflow --google_default_credentials=false -build:cache-envoy-engflow --remote_cache=grpcs://morganite.cluster.engflow.com -build:cache-envoy-engflow --remote_timeout=3600s -build:cache-envoy-engflow --credential_helper=*.engflow.com=%workspace%/bazel/engflow-bazel-credential-helper.sh -build:cache-envoy-engflow --grpc_keepalive_time=30s -build:bes-envoy-engflow --bes_backend=grpcs://morganite.cluster.engflow.com/ -build:bes-envoy-engflow --bes_results_url=https://morganite.cluster.engflow.com/invocation/ -build:bes-envoy-engflow --bes_timeout=3600s -build:bes-envoy-engflow --bes_upload_mode=fully_async -build:rbe-envoy-engflow --config=cache-envoy-engflow -build:rbe-envoy-engflow --config=bes-envoy-engflow -build:rbe-envoy-engflow --remote_executor=grpcs://morganite.cluster.engflow.com -build:rbe-envoy-engflow --remote_default_exec_properties=container-image=docker://docker.io/envoyproxy/envoy-build-ubuntu:f94a38f62220a2b017878b790b6ea98a0f6c5f9c@sha256:2dd96b6f43c08ccabd5f4747fce5854f5f96af509b32e5cf6493f136e9833649 +# RBE (Engflow Envoy) +common:common-envoy-engflow --google_default_credentials=false +common:common-envoy-engflow --credential_helper=*.engflow.com=%workspace%/bazel/engflow-bazel-credential-helper.sh +common:common-envoy-engflow --grpc_keepalive_time=30s + +common:cache-envoy-engflow --remote_cache=grpcs://mordenite.cluster.engflow.com +common:cache-envoy-engflow --remote_timeout=3600s +common:bes-envoy-engflow --bes_backend=grpcs://mordenite.cluster.engflow.com/ +common:bes-envoy-engflow --bes_results_url=https://mordenite.cluster.engflow.com/invocation/ +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 --jobs=200 +common:rbe-envoy-engflow --define=engflow_rbe=true + +common:remote-envoy-engflow --config=common-envoy-engflow +common:remote-envoy-engflow --config=cache-envoy-engflow +common:remote-envoy-engflow --config=rbe-envoy-engflow + +common:remote-cache-envoy-engflow --config=common-envoy-engflow +common:remote-cache-envoy-engflow --config=cache-envoy-engflow ############################################################################# # debug: Various Bazel debugging flags @@ -559,6 +565,7 @@ common:debug --config=debug-sandbox common:debug --config=debug-coverage common:debug --config=debug-tests +try-import %workspace%/repo.bazelrc try-import %workspace%/clang.bazelrc try-import %workspace%/user.bazelrc try-import %workspace%/local_tsan.bazelrc diff --git a/source/extensions/filters/http/istio_stats/istio_stats.cc b/source/extensions/filters/http/istio_stats/istio_stats.cc index c98cec8f..95160bf8 100644 --- a/source/extensions/filters/http/istio_stats/istio_stats.cc +++ b/source/extensions/filters/http/istio_stats/istio_stats.cc @@ -493,6 +493,7 @@ struct Config : public Logger::Loggable { disable_host_header_fallback_(proto_config.disable_host_header_fallback()), report_duration_( PROTOBUF_GET_MS_OR_DEFAULT(proto_config, tcp_reporting_duration, /* 5s */ 5000)) { + recordVersion(factory_context); reporter_ = Reporter::ClientSidecar; switch (proto_config.reporter()) { case stats::Reporter::UNSPECIFIED: @@ -763,13 +764,13 @@ struct Config : public Logger::Loggable { bool evaluated_{false}; }; - void recordVersion() { + void recordVersion(Server::Configuration::FactoryContext& factory_context) { Stats::StatNameTagVector tags; tags.push_back({context_->component_, context_->proxy_}); tags.push_back({context_->tag_, context_->istio_version_.empty() ? context_->unknown_ : context_->istio_version_}); - Stats::Utility::gaugeFromStatNames(*scope(), + Stats::Utility::gaugeFromStatNames(factory_context.scope(), {context_->stat_namespace_, context_->istio_build_}, Stats::Gauge::ImportMode::Accumulate, tags) .set(1); @@ -1266,7 +1267,6 @@ absl::StatusOr IstioStatsFilterConfigFactory::createFilte CustomStatNamespace); ConfigSharedPtr config = std::make_shared( dynamic_cast(proto_config), factory_context); - config->recordVersion(); return [config](Http::FilterChainFactoryCallbacks& callbacks) { auto filter = std::make_shared(config); callbacks.addStreamFilter(filter); @@ -1286,7 +1286,6 @@ IstioStatsNetworkFilterConfigFactory::createFilterFactoryFromProto( CustomStatNamespace); ConfigSharedPtr config = std::make_shared( dynamic_cast(proto_config), factory_context); - config->recordVersion(); return [config](Network::FilterManager& filter_manager) { filter_manager.addReadFilter(std::make_shared(config)); }; diff --git a/test/envoye2e/stats_plugin/stats_test.go b/test/envoye2e/stats_plugin/stats_test.go index f701f4a0..2505f33a 100644 --- a/test/envoye2e/stats_plugin/stats_test.go +++ b/test/envoye2e/stats_plugin/stats_test.go @@ -799,6 +799,7 @@ func TestStatsExpiry(t *testing.T) { &driver.Sleep{Duration: 4 * time.Second}, &driver.Stats{AdminPort: params.Ports.ClientAdmin, Matchers: map[string]driver.StatMatcher{ "istio_requests_total": &driver.MissingStat{Metric: "istio_requests_total"}, + "istio_build": &driver.ExactStat{Metric: "testdata/metric/istio_build.yaml"}, }}, }, }).Run(params); err != nil {