From 9cf26ef488fbdd0daed9f034b7f4ab2ee39290a1 Mon Sep 17 00:00:00 2001 From: Volo Kluev Date: Thu, 19 Sep 2024 11:53:28 -0700 Subject: [PATCH] add version argument, move endpoints to v1alpha --- snuba/web/rpc/{ => v1alpha}/__init__.py | 0 snuba/web/rpc/{ => v1alpha}/common.py | 0 snuba/web/rpc/{ => v1alpha}/exceptions.py | 0 snuba/web/rpc/{ => v1alpha}/span_samples.py | 0 snuba/web/rpc/{ => v1alpha}/timeseries.py | 0 snuba/web/rpc/{ => v1alpha}/trace_item_attribute_list.py | 0 snuba/web/rpc/{ => v1alpha}/trace_item_attribute_values.py | 0 snuba/web/views.py | 4 ++-- 8 files changed, 2 insertions(+), 2 deletions(-) rename snuba/web/rpc/{ => v1alpha}/__init__.py (100%) rename snuba/web/rpc/{ => v1alpha}/common.py (100%) rename snuba/web/rpc/{ => v1alpha}/exceptions.py (100%) rename snuba/web/rpc/{ => v1alpha}/span_samples.py (100%) rename snuba/web/rpc/{ => v1alpha}/timeseries.py (100%) rename snuba/web/rpc/{ => v1alpha}/trace_item_attribute_list.py (100%) rename snuba/web/rpc/{ => v1alpha}/trace_item_attribute_values.py (100%) diff --git a/snuba/web/rpc/__init__.py b/snuba/web/rpc/v1alpha/__init__.py similarity index 100% rename from snuba/web/rpc/__init__.py rename to snuba/web/rpc/v1alpha/__init__.py diff --git a/snuba/web/rpc/common.py b/snuba/web/rpc/v1alpha/common.py similarity index 100% rename from snuba/web/rpc/common.py rename to snuba/web/rpc/v1alpha/common.py diff --git a/snuba/web/rpc/exceptions.py b/snuba/web/rpc/v1alpha/exceptions.py similarity index 100% rename from snuba/web/rpc/exceptions.py rename to snuba/web/rpc/v1alpha/exceptions.py diff --git a/snuba/web/rpc/span_samples.py b/snuba/web/rpc/v1alpha/span_samples.py similarity index 100% rename from snuba/web/rpc/span_samples.py rename to snuba/web/rpc/v1alpha/span_samples.py diff --git a/snuba/web/rpc/timeseries.py b/snuba/web/rpc/v1alpha/timeseries.py similarity index 100% rename from snuba/web/rpc/timeseries.py rename to snuba/web/rpc/v1alpha/timeseries.py diff --git a/snuba/web/rpc/trace_item_attribute_list.py b/snuba/web/rpc/v1alpha/trace_item_attribute_list.py similarity index 100% rename from snuba/web/rpc/trace_item_attribute_list.py rename to snuba/web/rpc/v1alpha/trace_item_attribute_list.py diff --git a/snuba/web/rpc/trace_item_attribute_values.py b/snuba/web/rpc/v1alpha/trace_item_attribute_values.py similarity index 100% rename from snuba/web/rpc/trace_item_attribute_values.py rename to snuba/web/rpc/v1alpha/trace_item_attribute_values.py diff --git a/snuba/web/views.py b/snuba/web/views.py index 1861f28937..ce50b5f6e9 100644 --- a/snuba/web/views.py +++ b/snuba/web/views.py @@ -272,8 +272,8 @@ def unqualified_query_view(*, timer: Timer) -> Union[Response, str, WerkzeugResp assert False, "unexpected fallthrough" -@application.route("/rpc/", methods=["POST"]) -@util.time_request("timeseries") +@application.route("/rpc//", methods=["POST"]) +@util.time_request("rpc") def rpc(*, name: str, timer: Timer) -> Response: try: endpoint, req_class = ALL_RPCS[name]