Skip to content

Commit e0b6fa0

Browse files
authored
Merge branch 'master' into lcian/feat/add-logs
2 parents 1b67ebc + f5bb169 commit e0b6fa0

File tree

9 files changed

+64
-60
lines changed

9 files changed

+64
-60
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 25.6.1
4+
5+
### Various fixes & improvements
6+
7+
- feat(capman): Fix model ID for workflow querying referrer (#7243) by @kcons
8+
- Revert "feat(capman): Fix model ID for workflow querying referrer (#7239)" (b8889e71) by @getsentry-bot
9+
- feat(capman): Fix model ID for workflow querying referrer (#7239) by @kcons
10+
- meta: Bump new development version (57f19402)
11+
312
## 25.6.0
413

514
### Various fixes & improvements

devservices/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ x-sentry-service-config:
4444
containerized-uptime: [clickhouse, redis, kafka, snuba, uptime-consumer]
4545
containerized-metrics-dev: [clickhouse, redis, kafka, snuba, metrics-consumer, generic-metrics-distributions-consumer, generic-metrics-sets-consumer, generic-metrics-counters-consumer, generic-metrics-gauges-consumer]
4646

47+
x-programs:
48+
devserver:
49+
command: snuba devserver
50+
4751
services:
4852
clickhouse:
4953
image: ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:23.8.11.29.altinitystable

devservices/programs.conf

Lines changed: 0 additions & 3 deletions
This file was deleted.

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ click==8.1.7
66
clickhouse-driver==0.2.9
77
confluent-kafka==2.7.0
88
datadog==0.21.0
9-
devservices==1.1.5
9+
devservices==1.2.1
1010
flake8==7.0.0
1111
Flask==2.2.5
1212
google-cloud-storage==2.18.0
@@ -29,7 +29,7 @@ python-rapidjson==1.8
2929
redis==4.5.4
3030
sentry-arroyo==2.22.0
3131
sentry-kafka-schemas==1.3.7
32-
sentry-protos==0.2.0
32+
sentry-protos==0.3.0
3333
sentry-redis-tools==0.5.0
3434
sentry-relay==0.9.5
3535
sentry-sdk==2.18.0

rust_snuba/Cargo.lock

Lines changed: 33 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust_snuba/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ md5 = "0.7.0"
3535
parking_lot = "0.12.1"
3636
procspawn = { version = "1.0.0", features = ["json"] }
3737
prost = "0.13"
38-
prost-types = "0.13.3"
3938
pyo3 = { version = "0.18.1", features = ["chrono"] }
4039
regex = "1.11.1"
4140
reqwest = { version = "0.11.11", features = ["stream"] }
@@ -54,7 +53,7 @@ sentry = { version = "0.41.0", default-features = false, features = [
5453
] }
5554
sentry-kafka-schemas = "1.3.7"
5655
sentry_arroyo = { version = "2.22.0", features = ["ssl"] }
57-
sentry_protos = "0.2.0"
56+
sentry_protos = "0.3.0"
5857
sentry_usage_accountant = { version = "0.1.0", features = ["kafka"] }
5958
seq-macro = "0.3"
6059
serde = { version = "1.0", features = ["derive"] }
@@ -65,7 +64,6 @@ statsdproxy = { version = "0.1.2", features = ["cadence-adapter", "sentry"] }
6564
thiserror = "1.0"
6665
tokio = { version = "1.38.2", features = ["full"] }
6766
tokio-stream = "0.1.15"
68-
tonic = "0.12.3"
6967
tracing = "0.1.40"
7068
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json"] }
7169
uuid = { version = "1.5.0", features = ["v4", "v7"] }
@@ -76,6 +74,7 @@ zstd = "0.12.3"
7674
scopeguard = "1.2.0"
7775
criterion = "0.5.1"
7876
httpmock = "0.7.0"
77+
prost-types = "0.13.3"
7978
insta = { version = "1.34.0", features = ["json", "redactions"] }
8079
once_cell = "1.18.0"
8180
procspawn = { version = "1.0.0", features = ["test-support", "json"] }

snuba/web/rpc/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ def execute(self, in_msg: Tin) -> Tout:
157157
span = scope.span
158158
if span is not None:
159159
span.description = self.config_key()
160-
self.routing_context = RoutingContext(timer=self._timer, in_msg=in_msg)
160+
self.routing_decision.routing_context = RoutingContext(
161+
timer=self._timer, in_msg=in_msg
162+
)
161163

162164
self.__before_execute(in_msg)
163165
error = None
@@ -218,7 +220,7 @@ def __before_execute(self, in_msg: Tin) -> None:
218220
)
219221
self.routing_decision.strategy = selected_strategy
220222
self.routing_decision = selected_strategy.get_routing_decision(
221-
self.routing_context
223+
self.routing_decision.routing_context
222224
)
223225
self._timer.mark("rpc_start")
224226
self._before_execute(in_msg)

snuba/web/rpc/storage_routing/routing_strategy_selector.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
import sentry_sdk
77
from google.protobuf.message import Message as ProtobufMessage
88

9+
from snuba import settings
910
from snuba.state import get_config
11+
from snuba.web.rpc.storage_routing.common import extract_message_meta
1012
from snuba.web.rpc.storage_routing.routing_strategies.outcomes_based import (
1113
OutcomesBasedRoutingStrategy,
1214
)
@@ -88,7 +90,8 @@ class RoutingStrategySelector:
8890
def get_storage_routing_config(
8991
self, in_msg: ProtobufMessage
9092
) -> StorageRoutingConfig:
91-
organization_id = str(in_msg.meta.organization_id) # type: ignore
93+
in_msg_meta = extract_message_meta(in_msg)
94+
organization_id = str(in_msg_meta.organization_id)
9295
try:
9396
overrides = json.loads(
9497
str(get_config(_STORAGE_ROUTING_CONFIG_OVERRIDE_KEY, "{}"))
@@ -106,7 +109,8 @@ def select_routing_strategy(
106109
self, routing_context: RoutingContext
107110
) -> BaseRoutingStrategy:
108111
try:
109-
combined_org_and_project_ids = f"{routing_context.in_msg.meta.organization_id}:{'.'.join(str(pid) for pid in sorted(routing_context.in_msg.meta.project_ids))}" # type: ignore
112+
in_msg_meta = extract_message_meta(routing_context.in_msg)
113+
combined_org_and_project_ids = f"{in_msg_meta.organization_id}:{'.'.join(str(pid) for pid in sorted(in_msg_meta.project_ids))}"
110114
bucket = (
111115
int(hashlib.md5(combined_org_and_project_ids.encode()).hexdigest(), 16)
112116
% _NUM_BUCKETS
@@ -121,6 +125,8 @@ def select_routing_strategy(
121125
if bucket < cumulative_buckets:
122126
return BaseRoutingStrategy.get_from_name(strategy_name)()
123127
except Exception as e:
128+
if settings.RAISE_ON_ROUTING_STRATEGY_FAILURES:
129+
raise e
124130
sentry_sdk.capture_message(f"Error selecting routing strategy: {e}")
125131
return OutcomesBasedRoutingStrategy()
126132

snuba/web/rpc/v1/endpoint_time_series.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
]
3838
)
3939

40-
# MAX 15 minute granularity over 28 days
41-
_MAX_BUCKETS_IN_REQUEST = 2688
40+
# MAX 15 minute granularity over 28 days (2688 buckets) + 1 bucket to allow for partial time buckets on
41+
_MAX_BUCKETS_IN_REQUEST = 2689
4242

4343

4444
def _enforce_no_duplicate_labels(request: TimeSeriesRequest) -> None:

0 commit comments

Comments
 (0)