From e267585a0ab29cb54f2560278f7ef7ecb9c13e4a Mon Sep 17 00:00:00 2001 From: David Herberth Date: Tue, 27 Aug 2024 14:45:06 +0200 Subject: [PATCH] improve docs --- relay-server/src/endpoints/project_configs.rs | 1 - relay-server/src/services/project_upstream.rs | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/relay-server/src/endpoints/project_configs.rs b/relay-server/src/endpoints/project_configs.rs index c42b892583..0e9ebe677d 100644 --- a/relay-server/src/endpoints/project_configs.rs +++ b/relay-server/src/endpoints/project_configs.rs @@ -152,7 +152,6 @@ async fn inner( }) .collect(); - // Skip unparsable public keys. The downstream Relay will consider them `ProjectState::missing`. let (global, global_status) = if inner.global { match state.global_config().send(global_config::Get).await? { global_config::Status::Ready(config) => (Some(config), Some(StatusResponse::Ready)), diff --git a/relay-server/src/services/project_upstream.rs b/relay-server/src/services/project_upstream.rs index 4b588bf6ab..157e4cda88 100644 --- a/relay-server/src/services/project_upstream.rs +++ b/relay-server/src/services/project_upstream.rs @@ -35,9 +35,18 @@ use crate::utils::{RetryBackoff, SleepHandle}; #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct GetProjectStates { + /// List of requested project keys. public_keys: Vec, + /// List of revisions for each project key. + /// + /// The revisions are mapped by index to the project key, + /// this is a separate field to keep the API compatible. revisions: Vec>, + /// If `true` the upstream should return a full configuration. + /// + /// Upstreams will ignore this for non-internal Relays. full_config: bool, + /// If `true` the upstream should not serve from cache. no_cache: bool, } @@ -54,6 +63,10 @@ pub struct GetProjectStatesResponse { /// The [`ProjectKey`]'s that couldn't be immediately retrieved from the upstream. #[serde(default)] pending: HashSet, + /// The [`ProjectKey`]'s that the upstream has no updates for. + /// + /// List is only populated when the request contains revision information + /// for all requested configurations. #[serde(default)] unchanged: HashSet, }