From 95beeb2409ebfc44983689ed92250d89dd526714 Mon Sep 17 00:00:00 2001 From: Chenyu <10610892+BinaryFiddler@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:56:40 -0800 Subject: [PATCH] remove label service proto and smite ref in coordinator (#61) --- osprey_coordinator/build.rs | 5 -- osprey_coordinator/src/discovery/mod.rs | 2 - osprey_coordinator/src/discovery/watcher.rs | 2 - osprey_coordinator/src/etcd_config/mod.rs | 1 - osprey_coordinator/src/etcd_watcherd/mod.rs | 3 +- .../src/etcd_watcherd/rpc/mod.rs | 6 -- osprey_coordinator/src/gcloud/kms.rs | 2 +- .../src/label_service_client.rs | 75 ------------------- osprey_coordinator/src/main.rs | 27 +++---- .../src/metrics/counters/mod.rs | 1 - osprey_coordinator/src/metrics/gauges/mod.rs | 1 - .../src/osprey_bidirectional_stream.rs | 2 +- osprey_coordinator/src/pigeon/mod.rs | 1 - osprey_coordinator/src/proto/mod.rs | 7 -- osprey_coordinator/src/pubsub.rs | 18 ++--- osprey_coordinator/src/sync_action_rpc.rs | 43 +++-------- osprey_coordinator/src/tokio_utils/mod.rs | 4 - proto/etcd_watcherd/v1/BUILD | 12 --- proto/etcd_watcherd/v1/etcd_watcherd.proto | 49 ------------ proto/osprey/rpc/actions/v1/action.proto | 10 +-- proto/osprey/rpc/actions/v1/guild.proto | 2 +- proto/osprey/rpc/labels/v1/service.proto | 36 --------- .../sync_action/v1/service.proto | 6 -- 23 files changed, 38 insertions(+), 277 deletions(-) delete mode 100644 osprey_coordinator/src/label_service_client.rs delete mode 100644 proto/etcd_watcherd/v1/BUILD delete mode 100644 proto/etcd_watcherd/v1/etcd_watcherd.proto delete mode 100644 proto/osprey/rpc/labels/v1/service.proto diff --git a/osprey_coordinator/build.rs b/osprey_coordinator/build.rs index 410e52f..86d4802 100644 --- a/osprey_coordinator/build.rs +++ b/osprey_coordinator/build.rs @@ -55,10 +55,5 @@ fn main() -> Result<(), Box> { &[proto_root], )?; - tonic_build::configure().compile( - &[proto_root.join("etcd_watcherd/v1/etcd_watcherd.proto")], - &[proto_root], - )?; - Ok(()) } diff --git a/osprey_coordinator/src/discovery/mod.rs b/osprey_coordinator/src/discovery/mod.rs index a26ea22..4ca3a1a 100644 --- a/osprey_coordinator/src/discovery/mod.rs +++ b/osprey_coordinator/src/discovery/mod.rs @@ -12,7 +12,5 @@ mod watcher; pub use announcer::ServiceAnnouncer; pub use error::DiscoveryError; -pub use limits::{GlobalLimiter, Member, Normal}; -pub use ring::{Config as RingConfig, Ring}; pub use service::ServiceRegistration; pub use watcher::ServiceWatcher; diff --git a/osprey_coordinator/src/discovery/watcher.rs b/osprey_coordinator/src/discovery/watcher.rs index 5560146..4715de7 100644 --- a/osprey_coordinator/src/discovery/watcher.rs +++ b/osprey_coordinator/src/discovery/watcher.rs @@ -1,9 +1,7 @@ -use crate::backoff_utils::{AsyncBackoff, Config as BackoffConfig}; use crate::discovery::error::DiscoveryError; use crate::discovery::ring::{Config as RingConfig, Ring, DEFAULT_NUM_REPLICAS}; use crate::discovery::service::ServiceRegistration; use crate::etcd::{Action, Client, Node, WatchEvent, Watcher}; -use crate::tokio_utils::{AbortOnDrop, UnboundedReceiverChunker}; use anyhow::Result; use arc_swap::ArcSwap; use indexmap::IndexMap; diff --git a/osprey_coordinator/src/etcd_config/mod.rs b/osprey_coordinator/src/etcd_config/mod.rs index bc6a378..1e2ddd1 100644 --- a/osprey_coordinator/src/etcd_config/mod.rs +++ b/osprey_coordinator/src/etcd_config/mod.rs @@ -5,7 +5,6 @@ use crate::etcd_watcherd::{RecursiveKeyWatchEvents, Watcher}; use anyhow::Result; use base64::{engine::general_purpose::STANDARD as BASE64_ENGINE, Engine}; -pub use etcd_config_derive::{Disconfig, FeatureFlags}; use prost::Message; diff --git a/osprey_coordinator/src/etcd_watcherd/mod.rs b/osprey_coordinator/src/etcd_watcherd/mod.rs index 873e001..bc3194e 100644 --- a/osprey_coordinator/src/etcd_watcherd/mod.rs +++ b/osprey_coordinator/src/etcd_watcherd/mod.rs @@ -7,8 +7,7 @@ mod watcher_impl; pub mod rpc; mod stats; -pub use self::api::{WatchHandle, Watcher, WatcherEvents}; -pub use self::metrics::{WatcherMetrics, WatcherMetricsGuard}; +pub use self::api::{WatchHandle, Watcher}; pub use self::watcher_impl::{ key_watcher::KeyWatchEvents, recursive_key_watcher::RecursiveKeyWatchEvents, }; diff --git a/osprey_coordinator/src/etcd_watcherd/rpc/mod.rs b/osprey_coordinator/src/etcd_watcherd/rpc/mod.rs index ec0a014..c07f47e 100644 --- a/osprey_coordinator/src/etcd_watcherd/rpc/mod.rs +++ b/osprey_coordinator/src/etcd_watcherd/rpc/mod.rs @@ -1,8 +1,2 @@ -mod proto { - pub mod v1 { - tonic::include_proto!("discord_common.etcd_watcherd.v1"); - } -} - pub mod client; pub mod server; diff --git a/osprey_coordinator/src/gcloud/kms.rs b/osprey_coordinator/src/gcloud/kms.rs index 98dbb5f..c95a9c5 100644 --- a/osprey_coordinator/src/gcloud/kms.rs +++ b/osprey_coordinator/src/gcloud/kms.rs @@ -1,5 +1,5 @@ use anyhow::{anyhow, Result}; -use base64::engine::{general_purpose, Engine as _}; +use base64::engine::Engine as _; use prost::Message; use tink_aead::subtle::AesGcm; use tink_core::Aead; diff --git a/osprey_coordinator/src/label_service_client.rs b/osprey_coordinator/src/label_service_client.rs deleted file mode 100644 index 1fadec6..0000000 --- a/osprey_coordinator/src/label_service_client.rs +++ /dev/null @@ -1,75 +0,0 @@ -use crate::pigeon::grpc_client::GrpcClient; -use crate::pigeon::Connector; - -use crate::round_robin; -use anyhow::Result; -use tonic::transport::{Channel, Endpoint, Error as TonicError}; - -use crate::proto::label_service_client::LabelServiceClient as LabelServiceClientProto; -use crate::proto::{Entity, EntityKey, GetEntityRequest, GetEntityResponse}; - -use futures::future::try_join_all; -use futures::future::{BoxFuture, FutureExt}; - -pub struct LabelServiceClient { - rpc_client: GrpcClient>, -} - -impl LabelServiceClient { - pub async fn new() -> Result { - let rpc_client = GrpcClient::>::new( - "label_service_client".into(), - "discord_smite_labels".into(), - 2, - Some("smite_coordinator"), - ) - .await?; - Ok(LabelServiceClient { rpc_client }) - } - - pub async fn get_entities(&self, entities: Vec) -> Result> { - let requests: Vec<_> = entities - .into_iter() - .map(|entity_key| GetEntityRequest { - // the routing key is only important client-side ^^ - routing_key: "meow".to_string(), - key: Some(entity_key), - }) - .collect(); - - let mut futures: Vec>> = - Vec::with_capacity(8); - - for request in requests { - let future: BoxFuture> = - round_robin!(self.rpc_client, get_entity, request).boxed(); - futures.push(future); - } - - let get_entity_results: Vec = try_join_all(futures).await?; - - Ok(get_entity_results - .into_iter() - .filter_map(|get_entity_response| get_entity_response.entity) - .collect()) - } -} - -#[tonic::async_trait] -impl Connector for LabelServiceClientProto { - async fn connect(dst: Endpoint) -> Result { - let svc = Self::connect(dst) - .await? - .max_decoding_message_size(20 * 1024 * 1024) - .max_encoding_message_size(20 * 1024 * 1024); - - Ok(svc) - } - fn connect_lazy(dst: Endpoint) -> Self { - let channel = dst.connect_lazy(); - - Self::new(channel) - .max_decoding_message_size(20 * 1024 * 1024) - .max_encoding_message_size(20 * 1024 * 1024) - } -} diff --git a/osprey_coordinator/src/main.rs b/osprey_coordinator/src/main.rs index f9f597c..1d17246 100644 --- a/osprey_coordinator/src/main.rs +++ b/osprey_coordinator/src/main.rs @@ -8,7 +8,6 @@ mod etcd_watcherd; mod future_utils; mod gcloud; mod hashring; -mod label_service_client; mod metrics; mod osprey_bidirectional_stream; mod pigeon; @@ -29,10 +28,8 @@ use proto::osprey_coordinator_sync_action::osprey_coordinator_sync_action_servic use std::sync::Arc; use std::time::Duration; +use crate::coordinator_metrics::OspreyCoordinatorMetrics; use crate::snowflake_client::SnowflakeClient; -use crate::{ - coordinator_metrics::OspreyCoordinatorMetrics, label_service_client::LabelServiceClient, -}; use crate::metrics::emit_worker::SpawnEmitWorker; use crate::metrics::new_client; @@ -50,13 +47,13 @@ struct CliOptions { short, long, default_value = "19950", - env = "SMITE_COORDINATOR_BIDI_STREAM_PORT" + env = "OSPREY_COORDINATOR_BIDI_STREAM_PORT" )] bidi_stream_port: u16, #[arg( long, default_value = "19951", - env = "SMITE_COORDINATOR_SYNC_ACTION_PORT" + env = "OSPREY_COORDINATOR_SYNC_ACTION_PORT" )] sync_action_port: u16, #[arg( @@ -82,24 +79,20 @@ async fn main() -> Result<()> { tracing::info!("starting grpc metrics worker"); let _worker_guard = metrics .clone() - .spawn_emit_worker(new_client("smite_coordinator").unwrap()); + .spawn_emit_worker(new_client("osprey_coordinator").unwrap()); - let smite_coordinator_grpc_bidi_stream_service = + let osprey_coordinator_grpc_bidi_stream_service = OspreyCoordinatorServiceServer::new(OspreyCoordinatorServer::new( priority_queue_sender.clone(), priority_queue_receiver.clone(), metrics.clone(), )); - tracing::info!("starting label service client"); - let label_service_client = LabelServiceClient::new().await?; - - let smite_coordinator_sync_action_service = + let osprey_coordinator_sync_action_service = OspreyCoordinatorSyncActionServiceServer::new(sync_action_rpc::SyncActionServer::new( snowflake_client.clone(), priority_queue_sender.clone(), metrics.clone(), - label_service_client, )); let pubsub_fut = start_pubsub_subscriber( @@ -108,14 +101,14 @@ async fn main() -> Result<()> { metrics.clone(), ); let grpc_bidi_stream_service_fut = pigeon::serve( - smite_coordinator_grpc_bidi_stream_service, - "smite_coordinator", + osprey_coordinator_grpc_bidi_stream_service, + "osprey_coordinator", opts.bidi_stream_port, Duration::from_secs(30), ); let sync_action_service_fut = pigeon::serve( - smite_coordinator_sync_action_service, - "smite_coordinator_sync_action", + osprey_coordinator_sync_action_service, + "osprey_coordinator_sync_action", opts.sync_action_port, Duration::from_secs(60), ); diff --git a/osprey_coordinator/src/metrics/counters/mod.rs b/osprey_coordinator/src/metrics/counters/mod.rs index 8a09992..120b24a 100644 --- a/osprey_coordinator/src/metrics/counters/mod.rs +++ b/osprey_coordinator/src/metrics/counters/mod.rs @@ -1,6 +1,5 @@ pub mod dynamic_counter; pub mod static_counter; -pub use super::{DynamicTagKey, DynamicTagValue}; pub use dynamic_counter::{DynamicCounter, DynamicCounterStorage}; pub use static_counter::StaticCounter; diff --git a/osprey_coordinator/src/metrics/gauges/mod.rs b/osprey_coordinator/src/metrics/gauges/mod.rs index ef9511f..f44d4ed 100644 --- a/osprey_coordinator/src/metrics/gauges/mod.rs +++ b/osprey_coordinator/src/metrics/gauges/mod.rs @@ -2,7 +2,6 @@ pub mod dynamic_gauge; mod gauge_struct; pub mod static_gauge; -pub use super::{DynamicTagKey, DynamicTagValue}; pub use dynamic_gauge::{DynamicGauge, DynamicGaugeStorage}; pub use gauge_struct::{GaugeHandleOwned, GaugeInner, Many, One}; pub use static_gauge::StaticGauge; diff --git a/osprey_coordinator/src/osprey_bidirectional_stream.rs b/osprey_coordinator/src/osprey_bidirectional_stream.rs index 16ccf4b..6ba86cf 100644 --- a/osprey_coordinator/src/osprey_bidirectional_stream.rs +++ b/osprey_coordinator/src/osprey_bidirectional_stream.rs @@ -311,7 +311,7 @@ mod tests { let metrics = OspreyCoordinatorMetrics::new(); let _worker_guard = metrics .clone() - .spawn_emit_worker(new_client("smite_coordinator").unwrap()); + .spawn_emit_worker(new_client("osprey_coordinator").unwrap()); let ackable_action = proto::OspreyCoordinatorAction { ack_id: 1, diff --git a/osprey_coordinator/src/pigeon/mod.rs b/osprey_coordinator/src/pigeon/mod.rs index a9bc96d..34a10a6 100644 --- a/osprey_coordinator/src/pigeon/mod.rs +++ b/osprey_coordinator/src/pigeon/mod.rs @@ -47,7 +47,6 @@ mod utils; use self::utils::Error; use router::Router; -pub use self::utils::Connector; pub use tonic::server::NamedService; pub async fn serve( diff --git a/osprey_coordinator/src/proto/mod.rs b/osprey_coordinator/src/proto/mod.rs index a10ca11..9e23dbc 100644 --- a/osprey_coordinator/src/proto/mod.rs +++ b/osprey_coordinator/src/proto/mod.rs @@ -13,12 +13,6 @@ pub mod osprey { } } - pub mod labels { - pub mod v1 { - include!(concat!(env!("OUT_DIR"), "/osprey.rpc.labels.v1.rs")); - } - } - pub mod osprey_coordinator { pub mod bidirectional_stream { pub mod v1 { @@ -43,7 +37,6 @@ pub mod osprey { pub use osprey::rpc::actions::v1::*; pub use osprey::rpc::common::v1::*; -pub use osprey::rpc::labels::v1::*; pub use osprey::rpc::osprey_coordinator::bidirectional_stream::v1::*; pub use osprey::rpc::osprey_coordinator::sync_action::v1 as osprey_coordinator_sync_action; pub const PB_DESCRIPTOR_BYTES: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/descriptor.bin")); diff --git a/osprey_coordinator/src/pubsub.rs b/osprey_coordinator/src/pubsub.rs index 6aa14ee..52e6cd4 100644 --- a/osprey_coordinator/src/pubsub.rs +++ b/osprey_coordinator/src/pubsub.rs @@ -30,7 +30,7 @@ use serde_json::Value; use tokio::time::{timeout, Duration as TokioDuration, Instant}; use tonic::{codegen::InterceptedService, transport::Channel}; -use crate::proto::Action as SmiteProtoAction; +use crate::proto::Action as OspreyProtoAction; use crate::signals::exit_signal; use crate::snowflake_client::SnowflakeClient; use convert_case::{Case, Casing}; @@ -43,14 +43,14 @@ async fn decode_proto_message( snowflake_client: &SnowflakeClient, metrics: &OspreyCoordinatorMetrics, ) -> Result { - let smite_proto_action = SmiteProtoAction::decode(message_data).unwrap(); - let action_id = if smite_proto_action.id == 0 { + let osprey_proto_action = OspreyProtoAction::decode(message_data).unwrap(); + let action_id = if osprey_proto_action.id == 0 { metrics.action_id_snowflake_generation_proto.incr(); snowflake_client.generate_id().await? } else { - smite_proto_action.id + osprey_proto_action.id }; - let action_name = smite_proto_action + let action_name = osprey_proto_action .data .unwrap() .to_string() @@ -185,7 +185,7 @@ async fn create_pubsub_subscription_client( } else { tracing::info!("Creating subscription client to real pubsub"); let service_account = - std::env::var("SMITE_COORDINATOR_SERVICE_ACCOUNT").unwrap_or("default".to_string()); + std::env::var("OSPREY_COORDINATOR_SERVICE_ACCOUNT").unwrap_or("default".to_string()); let client = GCPMetadataClient::new(service_account).unwrap(); Connection::from_metadata_client( client, @@ -211,8 +211,8 @@ pub async fn start_pubsub_subscriber( let project_id = std::env::var("PUBSUB_SUBSCRIPTION_PROJECT_ID") .unwrap_or("discord-anti-abuse-prd".to_string()); - let subscription_id = - std::env::var("PUBSUB_SUBSCRIPTION_ID").unwrap_or("smite-coordinator-test".to_string()); + let subscription_id = std::env::var("PUBSUB_SUBSCRIPTION_ID") + .unwrap_or("osprey-coordinator-test".to_string()); PubSubSubscription::new(project_id, subscription_id) }; @@ -334,7 +334,7 @@ pub async fn start_pubsub_subscriber( } } }), - MetricsClientBuilder::new("smite_coordinator.pull"), + MetricsClientBuilder::new("osprey_coordinator.pull"), ) .gracefully_stop_on_signal(exit_signal(), Duration::from_secs(30)) .await; diff --git a/osprey_coordinator/src/sync_action_rpc.rs b/osprey_coordinator/src/sync_action_rpc.rs index ded74f6..8b6678e 100644 --- a/osprey_coordinator/src/sync_action_rpc.rs +++ b/osprey_coordinator/src/sync_action_rpc.rs @@ -3,7 +3,6 @@ use crate::metrics::histograms::StaticHistogram; use crate::snowflake_client::SnowflakeClient; use crate::{ coordinator_metrics::OspreyCoordinatorMetrics, - label_service_client::LabelServiceClient, priority_queue::AckableAction, priority_queue::{AckOrNack, PriorityQueueSender}, proto::{self, osprey_coordinator_sync_action}, @@ -20,7 +19,6 @@ pub(crate) struct SyncActionServer { snowflake_client: Arc, priority_queue_sender: PriorityQueueSender, metrics: Arc, - label_service_client: LabelServiceClient, } impl SyncActionServer { @@ -28,22 +26,20 @@ impl SyncActionServer { snowflake_client: Arc, priority_queue_sender: PriorityQueueSender, metrics: Arc, - label_service_client: LabelServiceClient, ) -> SyncActionServer { SyncActionServer { snowflake_client, priority_queue_sender, metrics, - label_service_client, } } } -async fn create_smite_coordinator_action( +async fn create_osprey_coordinator_action( ack_id: u64, action_request: &osprey_coordinator_sync_action::ProcessActionRequest, snowflake_client: &SnowflakeClient, -) -> Result<(proto::OspreyCoordinatorAction, Vec)> { +) -> Result { // generate snowflake if one is not provided, to match the behaviour in pubsub.rs let action_id = match action_request.action_id { Some(id) => match id { @@ -56,7 +52,7 @@ async fn create_smite_coordinator_action( if action_request.action_name.is_empty() { return Err(anyhow!("`action_name` must not be empty")); } - let smite_coordinator_action = proto::OspreyCoordinatorAction { + let osprey_coordinator_action = proto::OspreyCoordinatorAction { ack_id, action_id, action_name: action_request.action_name.clone(), @@ -75,10 +71,7 @@ async fn create_smite_coordinator_action( ), }; - Ok(( - smite_coordinator_action, - action_request.requested_entities.clone(), - )) + Ok(osprey_coordinator_action) } impl SyncActionServer { @@ -90,7 +83,7 @@ impl SyncActionServer { { let unvalidated_action_id = action_request.action_id; - let (smite_coordinator_action, requested_entities) = match create_smite_coordinator_action( + let osprey_coordinator_action = match create_osprey_coordinator_action( ack_id, action_request, self.snowflake_client.as_ref(), @@ -107,9 +100,9 @@ impl SyncActionServer { } }; - let action_id = smite_coordinator_action.action_id; + let action_id = osprey_coordinator_action.action_id; - let (ackable_action, acking_receiver) = AckableAction::new(smite_coordinator_action); + let (ackable_action, acking_receiver) = AckableAction::new(osprey_coordinator_action); let send_start_time = Instant::now(); match self.priority_queue_sender.send_sync(ackable_action).await { @@ -132,25 +125,9 @@ impl SyncActionServer { Ok(ack_or_nack) => match ack_or_nack { AckOrNack::Ack(verdicts) => { tracing::debug!({action_id=%action_id, ack_id=ack_id},"[rpc] acking message"); - let entities = match self - .label_service_client - .get_entities(requested_entities) - .await - { - Ok(entities) => entities, - Err(error) => { - tracing::error!({error=%error},"label service call failed"); - self.metrics - .sync_classification_failure_label_service - .incr(); - return Err(tonic::Status::aborted("label service call failed")); - } - }; - - let response = osprey_coordinator_sync_action::ProcessActionResponse { - entities, - verdicts, - }; + + let response = + osprey_coordinator_sync_action::ProcessActionResponse { verdicts }; self.metrics.sync_classification_result_ack.incr(); self.metrics diff --git a/osprey_coordinator/src/tokio_utils/mod.rs b/osprey_coordinator/src/tokio_utils/mod.rs index fbe2195..2a42f7e 100644 --- a/osprey_coordinator/src/tokio_utils/mod.rs +++ b/osprey_coordinator/src/tokio_utils/mod.rs @@ -8,10 +8,6 @@ use tokio::task::{JoinError, JoinHandle}; mod unbounded_receiver_chunker; -pub use unbounded_receiver_chunker::{ - ChunkSizeConfig as UnboundedReceiverChunkSizeConfig, UnboundedReceiverChunker, -}; - /// A helper struct that will invoke [`JoinHandle::abort`] when dropped. #[derive(Debug)] pub struct AbortOnDrop { diff --git a/proto/etcd_watcherd/v1/BUILD b/proto/etcd_watcherd/v1/BUILD deleted file mode 100644 index c14a7f3..0000000 --- a/proto/etcd_watcherd/v1/BUILD +++ /dev/null @@ -1,12 +0,0 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") - -package(default_visibility = ["//visibility:public"]) - -proto_library( - name = "etcd_watcherd_proto", - srcs = ["etcd_watcherd.proto"], - strip_import_prefix = "/proto/", - deps = [ - "//proto/google:com_google_protobuf", - ], -) diff --git a/proto/etcd_watcherd/v1/etcd_watcherd.proto b/proto/etcd_watcherd/v1/etcd_watcherd.proto deleted file mode 100644 index c2eb9ae..0000000 --- a/proto/etcd_watcherd/v1/etcd_watcherd.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -package discord_common.etcd_watcherd.v1; - -import "google/protobuf/wrappers.proto"; - -service EtcdWatcherdService -{ - rpc WatchKey(WatchKeyRequest) returns (stream WatchKeyResponse); - rpc WatchKeyRecursive(WatchKeyRecursiveRequest) returns (stream WatchKeyRecursiveResponse); -} - -message WatchKeyRequest -{ - string key = 1; -} - -message WatchKeyResponse -{ - google.protobuf.StringValue value = 1; -} -message WatchKeyRecursiveRequest -{ - string key = 1; -} - -message WatchKeyRecursiveResponse -{ - message FullSync { map items = 1; } - - message SyncOne - { - string key = 1; - string value = 2; - } - - message DeleteOne - { - string key = 1; - string prev_value = 2; - } - - oneof event - { - FullSync full_sync = 1; - SyncOne sync_one = 2; - DeleteOne delete_one = 3; - } -} diff --git a/proto/osprey/rpc/actions/v1/action.proto b/proto/osprey/rpc/actions/v1/action.proto index a52cf25..ac2373f 100644 --- a/proto/osprey/rpc/actions/v1/action.proto +++ b/proto/osprey/rpc/actions/v1/action.proto @@ -13,7 +13,7 @@ message Action { fixed64 id = 1; // This oneof denotes the type of action this message is. - // Each field name in this this oneof should match the name of an action that Smite expects. + // Each field name in this this oneof should match the name of an action that Osprey expects. oneof data { AuthSessionCreated auth_session_created = 2; AuthSessionModified auth_session_modified = 3; @@ -23,8 +23,8 @@ message Action { UserBatchMLScore user_batch_ml_score = 7; UserBlocked user_blocked = 8; GuildJoined guild_joined = 9; - SmiteAutoClusteringUser smite_auto_clustering_user = 10; - SmiteAutoClusteringKey smite_auto_clustering_key = 11; + OspreyAutoClusteringUser osprey_auto_clustering_user = 10; + OspreyAutoClusteringKey osprey_auto_clustering_key = 11; HashMatcherIconMatched hash_matcher_icon_matched = 12; SafetyVisualPrediction safety_visual_prediction = 13; } @@ -76,14 +76,14 @@ message UserBatchMLScore { BatchMLSourceEvent source_event = 8; } -message SmiteAutoClusteringUser { +message OspreyAutoClusteringUser { google.protobuf.Timestamp timestamp = 1; uint64 user_id = 2; string pipeline_name = 3; string cluster_id = 4; } -message SmiteAutoClusteringKey { +message OspreyAutoClusteringKey { google.protobuf.Timestamp timestamp = 1; string key = 2; string value = 3; diff --git a/proto/osprey/rpc/actions/v1/guild.proto b/proto/osprey/rpc/actions/v1/guild.proto index 027071c..483c537 100644 --- a/proto/osprey/rpc/actions/v1/guild.proto +++ b/proto/osprey/rpc/actions/v1/guild.proto @@ -5,7 +5,7 @@ package osprey.rpc.actions.v1; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; -// Smite representation of a guild object +// Osprey representation of a guild object message Guild { fixed64 id = 1; GuildOwner owner = 2; diff --git a/proto/osprey/rpc/labels/v1/service.proto b/proto/osprey/rpc/labels/v1/service.proto deleted file mode 100644 index 2475a7d..0000000 --- a/proto/osprey/rpc/labels/v1/service.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package osprey.rpc.labels.v1; - -// Mock proto file for deprecated labels functionality -// These are marked as DEPRECATED in sync_action service -// and will be removed once labels are replaced with verdicts - -message EntityKey { - string entity_type = 1; - string entity_id = 2; -} - -message Label { - string name = 1; - int64 version = 2; - int64 expires_at = 3; -} - -message Entity { - EntityKey key = 1; - repeated Label labels = 2; -} - -message GetEntityRequest { - string routing_key = 1; - EntityKey key = 2; -} - -message GetEntityResponse { - Entity entity = 1; -} - -service LabelService { - rpc GetEntity(GetEntityRequest) returns (GetEntityResponse); -} diff --git a/proto/osprey/rpc/osprey_coordinator/sync_action/v1/service.proto b/proto/osprey/rpc/osprey_coordinator/sync_action/v1/service.proto index e60aa94..0afa97f 100644 --- a/proto/osprey/rpc/osprey_coordinator/sync_action/v1/service.proto +++ b/proto/osprey/rpc/osprey_coordinator/sync_action/v1/service.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package osprey.rpc.osprey_coordinator.sync_action.v1; import "osprey/rpc/common/v1/verdicts.proto"; -import "osprey/rpc/labels/v1/service.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -11,15 +10,10 @@ message ProcessActionRequest { google.protobuf.UInt64Value action_id = 1; string action_name = 2; string action_data_json = 3; - // DEPRECATED: to be removed once labels are replaced with verdicts - repeated osprey.rpc.labels.v1.EntityKey requested_entities = 4; google.protobuf.Timestamp timestamp = 5; } message ProcessActionResponse { - // DEPRECATED: to be removed once labels are replaced with verdicts - repeated osprey.rpc.labels.v1.Entity entities = 1; - // osprey.rpc.common.v1.Verdicts verdicts = 2; } -- 2.51.2