From f2e4ec42fbdf4d99d964f7f07daf11a209273543 Mon Sep 17 00:00:00 2001 From: Vjeran Grozdanic Date: Thu, 11 Sep 2025 09:16:11 +0200 Subject: [PATCH 1/2] fix(metric_stats): Ignore metric stats in tests for now --- tests/sentry/api/endpoints/test_relay_globalconfig_v3.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py b/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py index 1f084f03046d12..4bde6757c27370 100644 --- a/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py +++ b/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py @@ -67,6 +67,15 @@ def test_global_config() -> None: if not config["options"]["relay.span-normalization.allowed_hosts"]: del config["options"]["relay.span-normalization.allowed_hosts"] + # NOTE (vgrozdanic): temporary fix for the test, until metric_stats is completely removed + # from sentry codebase. It has been removed from relay, without being first removed from + # sentry + if "metric_stats" in config["options"]["relay.metric-bucket-distribution-encodings"]: + del config["options"]["relay.metric-bucket-distribution-encodings"]["metric_stats"] + + if "metric_stats" in config["options"]["relay.metric-bucket-set-encodings"]: + del config["options"]["relay.metric-bucket-set-encodings"]["metric_stats"] + assert normalized == config From c1cf0fa9f6e6ee1c0526fee9d7c351c246a5d31d Mon Sep 17 00:00:00 2001 From: Vjeran Grozdanic Date: Thu, 11 Sep 2025 09:39:41 +0200 Subject: [PATCH 2/2] ignore metric_stats from normalized config too --- tests/sentry/api/endpoints/test_relay_globalconfig_v3.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py b/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py index 4bde6757c27370..ff58bfd3db7d2d 100644 --- a/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py +++ b/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py @@ -73,9 +73,15 @@ def test_global_config() -> None: if "metric_stats" in config["options"]["relay.metric-bucket-distribution-encodings"]: del config["options"]["relay.metric-bucket-distribution-encodings"]["metric_stats"] + if "metric_stats" in normalized["options"]["relay.metric-bucket-distribution-encodings"]: + del normalized["options"]["relay.metric-bucket-distribution-encodings"]["metric_stats"] + if "metric_stats" in config["options"]["relay.metric-bucket-set-encodings"]: del config["options"]["relay.metric-bucket-set-encodings"]["metric_stats"] + if "metric_stats" in normalized["options"]["relay.metric-bucket-set-encodings"]: + del normalized["options"]["relay.metric-bucket-set-encodings"]["metric_stats"] + assert normalized == config