diff --git a/changelog.d/0-release-notes/WPB-27912-background-effects b/changelog.d/0-release-notes/WPB-27912-background-effects new file mode 100644 index 00000000000..379491a3272 --- /dev/null +++ b/changelog.d/0-release-notes/WPB-27912-background-effects @@ -0,0 +1,9 @@ +* The `backgroundEffects` team feature flag is **deprecated** (WPB-27912). Its + default is now **enabled and locked**, and the Helm configuration override for + `backgroundEffects` has been removed from `charts/wire-server`. The flag's + data type and its public/internal HTTP endpoints are retained for backward + compatibility; any Helm overrides for `backgroundEffects` are now ignored and + can be removed. The public/internal HTTP endpoints return 404 at API version + v17 and remain available through v16; the flag type remains deprecated. The + aggregate `GET /feature-configs` and `GET /teams/:tid/features` endpoints + continue to include `backgroundEffects` at all API versions, including v17. diff --git a/changelog.d/1-api-changes/WPB-27912-background-effects-endpoint b/changelog.d/1-api-changes/WPB-27912-background-effects-endpoint new file mode 100644 index 00000000000..e7c75238edd --- /dev/null +++ b/changelog.d/1-api-changes/WPB-27912-background-effects-endpoint @@ -0,0 +1,7 @@ +The `backgroundEffects` team feature endpoints are deprecated and return 404 for +clients on API version v17: the public `GET`/`PUT /teams/:tid/features/backgroundEffects` +and the internal legacy lock `PUT /i/teams/:tid/features/backgroundEffects/(un)?locked`. +They remain available through v16. The aggregate endpoints +`GET /feature-configs` and `GET /teams/:tid/features` are unaffected and continue +to include `backgroundEffects` at all API versions: the aggregate feature list is +version-agnostic, like other version-gated features such as MLS. diff --git a/charts/wire-server/templates/galley/configmap.yaml b/charts/wire-server/templates/galley/configmap.yaml index 90ed86d571f..006b6a83521 100644 --- a/charts/wire-server/templates/galley/configmap.yaml +++ b/charts/wire-server/templates/galley/configmap.yaml @@ -256,9 +256,5 @@ data: meetings: {{- toYaml .settings.featureFlags.meetings | nindent 10 }} {{- end }} - {{- if .settings.featureFlags.backgroundEffects }} - backgroundEffects: - {{- toYaml .settings.featureFlags.backgroundEffects | nindent 10 }} - {{- end }} {{- end }} {{- end }} diff --git a/charts/wire-server/values.yaml b/charts/wire-server/values.yaml index 89e688a2ef0..0e14993cf88 100644 --- a/charts/wire-server/values.yaml +++ b/charts/wire-server/values.yaml @@ -341,10 +341,6 @@ galley: defaults: status: disabled lockStatus: locked - backgroundEffects: - defaults: - status: disabled - lockStatus: locked aws: region: "eu-west-1" proxy: {} diff --git a/docs/src/developer/reference/config-options.md b/docs/src/developer/reference/config-options.md index 066637dbb07..3a0dbd9d19a 100644 --- a/docs/src/developer/reference/config-options.md +++ b/docs/src/developer/reference/config-options.md @@ -300,19 +300,20 @@ The aggregate list endpoints (`GET /feature-configs`, `GET /teams/:tid/features`) continue to include `meetingsPremium` at all API versions, including v17. -### Background Effects +### Background Effects (deprecated) -The `backgroundEffects` feature flag controls whether background effects are available in meetings. It is disabled and locked by default. If you want a different configuration, use the following syntax: -```yaml -backgroundEffects: - defaults: - status: disabled|enabled - lockStatus: locked|unlocked -``` +> **Deprecated (WPB-27912).** The `backgroundEffects` feature flag no longer +> affects meeting behaviour. The flag, its data type and its public/internal +> endpoints are retained for backward compatibility and are scheduled for +> removal in a future release. -The lock status for individual teams can be changed via the internal API (`PUT /i/teams/:tid/features/backgroundEffects/(un)?locked`). - -The feature status for individual teams can be changed via the public API (if the feature is unlocked). +The flag now defaults to **enabled and locked** and the Helm configuration +override has been removed (operators can no longer change it via Helm). The +`GET/PUT /teams/:tid/features/backgroundEffects` and internal lock-status +endpoints return 404 at API version v17; they remain available through v16. +The aggregate endpoints `GET /feature-configs` and +`GET /teams/:tid/features` continue to include `backgroundEffects` at all API +versions, including v17. ### File Sharing diff --git a/integration/test/Test/FeatureFlags.hs b/integration/test/Test/FeatureFlags.hs index 7dc7c59f5b6..d93c15df60e 100644 --- a/integration/test/Test/FeatureFlags.hs +++ b/integration/test/Test/FeatureFlags.hs @@ -96,7 +96,7 @@ testNonMemberAccess (Feature featureName) = do -- authz check (403 no-team-member) is still exercised. let getFeature = Public.getTeamFeature nonMember tid featureName resp <- - if featureName == "meetingsPremium" + if featureName `elem` ["meetingsPremium", "backgroundEffects"] then withAPIVersion 16 getFeature else getFeature assertForbidden resp diff --git a/integration/test/Test/FeatureFlags/BackgroundEffects.hs b/integration/test/Test/FeatureFlags/BackgroundEffects.hs index c2a568a0b84..5db0a5a6e2c 100644 --- a/integration/test/Test/FeatureFlags/BackgroundEffects.hs +++ b/integration/test/Test/FeatureFlags/BackgroundEffects.hs @@ -17,14 +17,49 @@ module Test.FeatureFlags.BackgroundEffects where +import SetupHelpers (createTeam) import Test.FeatureFlags.Util import Testlib.Prelude testPatchBackgroundEffects :: (HasCallStack) => App () -testPatchBackgroundEffects = checkPatch OwnDomain "backgroundEffects" enabled +testPatchBackgroundEffects = withAPIVersion 16 $ checkPatch OwnDomain "backgroundEffects" enabled testBackgroundEffects :: (HasCallStack) => APIAccess -> App () testBackgroundEffects access = - mkFeatureTests "backgroundEffects" + withAPIVersion 16 + $ mkFeatureTests "backgroundEffects" & addUpdate enabled & runFeatureTests OwnDomain access + +-- | WPB-27912: the public backgroundEffects endpoints are gated at v17 (404) +-- while remaining available through v16. Only the v16 GET is asserted here: +-- v16 PUT success is covered by 'testBackgroundEffects' (whose runFeatureTests +-- unlocks the feature first), and a public PUT in this test would 409 +-- feature-locked against the default enabled+locked state. +testBackgroundEffectsRemovedAtV17 :: (HasCallStack) => App () +testBackgroundEffectsRemovedAtV17 = do + (owner, tid, []) <- createTeam OwnDomain 0 + let p = joinHttpPath ["teams", tid, "features", "backgroundEffects"] + body = object ["status" .= "enabled", "lockStatus" .= "locked"] + bindResponse (baseRequest owner Galley (ExplicitVersion 17) p >>= submit "GET") $ assertStatus 404 + bindResponse (baseRequest owner Galley (ExplicitVersion 17) p <&> addJSON body >>= submit "PUT") $ assertStatus 404 + bindResponse (baseRequest owner Galley (ExplicitVersion 16) p >>= submit "GET") $ \resp -> do + resp.status `shouldMatchInt` 200 + resp.json %. "status" `shouldMatch` "enabled" + resp.json %. "lockStatus" `shouldMatch` "locked" + +-- | Test version agnostic feature endpoints for `backgroundEffects` +-- +-- Across versions, `backgroundEffects` is always set to `enabled` and `locked` to provide backwards compatibility. +-- From `V17` on, the feature itself has been removed. +testBackgroundEffectsListedAtV17 :: (HasCallStack) => App () +testBackgroundEffectsListedAtV17 = do + (owner, tid, []) <- createTeam OwnDomain 0 + let assertBackgroundEffects resp = do + resp.status `shouldMatchInt` 200 + be <- resp.json %. "backgroundEffects" + be %. "status" `shouldMatch` "enabled" + be %. "lockStatus" `shouldMatch` "locked" + teamFeatures = joinHttpPath ["teams", tid, "features"] + bindResponse (baseRequest owner Galley (ExplicitVersion 17) "/feature-configs" >>= submit "GET") assertBackgroundEffects + bindResponse (baseRequest owner Galley (ExplicitVersion 17) teamFeatures >>= submit "GET") assertBackgroundEffects diff --git a/integration/test/Test/FeatureFlags/Util.hs b/integration/test/Test/FeatureFlags/Util.hs index da69f27a415..58d7da16cff 100644 --- a/integration/test/Test/FeatureFlags/Util.hs +++ b/integration/test/Test/FeatureFlags/Util.hs @@ -250,7 +250,7 @@ defAllFeatures = ], "meetings" .= enabled, "meetingsPremium" .= enabledLocked, - "backgroundEffects" .= disabledLocked, + "backgroundEffects" .= enabledLocked, "preventAdminlessGroups" .= object [ "lockStatus" .= "unlocked", diff --git a/libs/wire-api/src/Wire/API/Routes/Internal/Galley.hs b/libs/wire-api/src/Wire/API/Routes/Internal/Galley.hs index 5cee430ea52..793e66d23d7 100644 --- a/libs/wire-api/src/Wire/API/Routes/Internal/Galley.hs +++ b/libs/wire-api/src/Wire/API/Routes/Internal/Galley.hs @@ -100,7 +100,7 @@ type IFeatureAPI = :<|> IFeatureStatusLockStatusPut StealthUsersConfig :<|> IFeatureStatusLockStatusPut MeetingsConfig :<|> Until 'V17 ::> IFeatureStatusLockStatusPut MeetingsPremiumConfig - :<|> IFeatureStatusLockStatusPut BackgroundEffectsConfig + :<|> Until 'V17 ::> IFeatureStatusLockStatusPut BackgroundEffectsConfig -- all feature configs :<|> Named "feature-configs-internal" diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Galley/Feature.hs b/libs/wire-api/src/Wire/API/Routes/Public/Galley/Feature.hs index 30033a50f9b..47d3524bf0c 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Galley/Feature.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Galley/Feature.hs @@ -86,7 +86,7 @@ type FeatureAPI = :<|> FeatureAPIGetPut MeetingsConfig :<|> Deprecated ::> Until 'V17 ::> FeatureAPIGet MeetingsPremiumConfig :<|> Deprecated ::> Until 'V17 ::> FeatureAPIPut MeetingsPremiumConfig - :<|> FeatureAPIGetPut BackgroundEffectsConfig + :<|> Deprecated ::> Until 'V17 ::> FeatureAPIGetPut BackgroundEffectsConfig type VersionedFeatureAPIPut named reqBodyVersion cfg = Named diff --git a/libs/wire-api/src/Wire/API/Team/Feature.hs b/libs/wire-api/src/Wire/API/Team/Feature.hs index 741ba022b9e..c9f8eef1b09 100644 --- a/libs/wire-api/src/Wire/API/Team/Feature.hs +++ b/libs/wire-api/src/Wire/API/Team/Feature.hs @@ -2428,9 +2428,12 @@ instance ToObjectSchema MeetingsPremiumConfig where -------------------------------------------------------------------------------- -- BackgroundEffects Feature --- --- Controls whether background effects are available in meetings. +{-# DEPRECATED BackgroundEffectsConfig "Deprecated (WPB-27912): no longer affects meeting behaviour; kept for API compatibility." #-} + +-- | /Deprecated (WPB-27912)./ This feature flag no longer affects meeting +-- behaviour and is kept solely for API compatibility. It defaults to +-- /enabled and locked/. Scheduled for removal in a future release. data BackgroundEffectsConfig = BackgroundEffectsConfig deriving (Eq, Show, Generic, GSOP.Generic) deriving (Arbitrary) via (GenericUniform BackgroundEffectsConfig) @@ -2441,7 +2444,7 @@ instance ToSchema BackgroundEffectsConfig where schema = object objectSchema instance Default (LockableFeature BackgroundEffectsConfig) where - def = defLockedFeature + def = defLockedFeature {status = FeatureStatusEnabled} instance IsFeatureConfig BackgroundEffectsConfig where type FeatureSymbol BackgroundEffectsConfig = "backgroundEffects" diff --git a/services/galley/src/Galley/API/Public/Feature.hs b/services/galley/src/Galley/API/Public/Feature.hs index 29613cc0267..580e65a48a3 100644 --- a/services/galley/src/Galley/API/Public/Feature.hs +++ b/services/galley/src/Galley/API/Public/Feature.hs @@ -86,7 +86,7 @@ featureAPI = <@> featureAPIGetPut @MeetingsConfig <@> mkNamedAPI @'("get", MeetingsPremiumConfig) getFeature <@> mkNamedAPI @'("put", MeetingsPremiumConfig) setFeature - <@> featureAPIGetPut @BackgroundEffectsConfig + <@> hoistAPI id featureAPIGetPut deprecatedFeatureConfigAPI :: API DeprecatedFeatureAPI GalleyEffects deprecatedFeatureConfigAPI =