support REST deprecation by platform for all requests with % rollout

This commit is contained in:
Jonathan Klabunde Tomer
2025-05-29 16:15:19 -07:00
committed by GitHub
parent 36439b5252
commit 2a7551cca5
4 changed files with 141 additions and 31 deletions

View File

@@ -64,7 +64,7 @@ public class DynamicConfiguration {
@JsonProperty
@Valid
Map<ClientPlatform, Semver> minimumRestFreeVersion = Map.of();
DynamicRestDeprecationConfiguration restDeprecation = new DynamicRestDeprecationConfiguration(Map.of());
public Optional<DynamicExperimentEnrollmentConfiguration> getExperimentEnrollmentConfiguration(
final String experimentName) {
@@ -112,8 +112,8 @@ public class DynamicConfiguration {
return svrStatusCodesToIgnoreForAccountDeletion;
}
public Map<ClientPlatform, Semver> minimumRestFreeVersion() {
return minimumRestFreeVersion;
public DynamicRestDeprecationConfiguration restDeprecation() {
return restDeprecation;
}
}

View File

@@ -0,0 +1,14 @@
/*
* Copyright 2025 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.configuration.dynamic;
import com.vdurmont.semver4j.Semver;
import java.util.Map;
import org.whispersystems.textsecuregcm.util.ua.ClientPlatform;
public record DynamicRestDeprecationConfiguration(Map<ClientPlatform, PlatformConfiguration> platforms) {
public record PlatformConfiguration(Semver minimumRestFreeVersion, int universalRolloutPercent) {}
}