Don't pass tenant_id in location_config requests from storage controller (#7476)

Tested this locally via a simple patch, the `tenant_id` is now gone from
the json.

Follow-up of #7055, prerequisite for #7469.
This commit is contained in:
Arpad Müller
2024-04-23 13:42:58 +02:00
committed by GitHub
parent d551bfee09
commit fa12d60237
2 changed files with 2 additions and 1 deletions

View File

@@ -429,6 +429,7 @@ pub struct StatusResponse {
#[derive(Serialize, Deserialize, Debug)]
#[serde(deny_unknown_fields)]
pub struct TenantLocationConfigRequest {
#[serde(skip_serializing_if = "Option::is_none")]
pub tenant_id: Option<TenantShardId>,
#[serde(flatten)]
pub config: LocationConfig, // as we have a flattened field, we should reject all unknown fields in it

View File

@@ -279,7 +279,7 @@ impl Client {
lazy: bool,
) -> Result<()> {
let req_body = TenantLocationConfigRequest {
tenant_id: Some(tenant_shard_id),
tenant_id: None,
config,
};