From 1b04fbfe8dbeebe8d97b9879c69be208e6d1fc36 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Tue, 16 Jun 2026 14:30:09 +0000 Subject: [PATCH 1/5] added totalLimitBytes to cellsInternal config --- .../src/developer/reference/config-options.md | 8 ++- .../test/Test/FeatureFlags/CellsInternal.hs | 18 +++++-- integration/test/Test/FeatureFlags/Util.hs | 12 ++++- libs/wire-api/src/Wire/API/Team/Feature.hs | 53 ++++++++++++++++--- services/galley/galley.integration.yaml | 3 +- tools/stern/test/integration/API.hs | 9 +++- 6 files changed, 87 insertions(+), 16 deletions(-) diff --git a/docs/src/developer/reference/config-options.md b/docs/src/developer/reference/config-options.md index b8f1d4e5c27..6905d5387aa 100644 --- a/docs/src/developer/reference/config-options.md +++ b/docs/src/developer/reference/config-options.md @@ -661,7 +661,10 @@ cells: ### Cells Internal -Cells configuration is intentionally split: `cells` is controlled by the team admin, while `cellsInternal` is set by the site operator/customer support via the internal API only. For `cellsInternal`, the `status` and `lockStatus` fields are *required* to be set to `enabled` and `unlocked` respectively, as enforced by validation logic. Failure to set these values will result in a configuration error. This block holds the backend URL, Collabora edition, and a storage quota. The quota must be provided as a positive decimal string. +Cells configuration is intentionally split: `cells` is controlled by the team admin, while `cellsInternal` is set by the site operator/customer support via the internal API only. For `cellsInternal`, the `status` and `lockStatus` fields are *required* to be set to `enabled` and `unlocked` respectively, as enforced by validation logic. Failure to set these values will result in a configuration error. This block holds the backend URL, Collabora edition, and two storage quota settings: + +- `totalLimitBytes` is the total team data limit. It is optional for backward compatibility with existing records, and any negative value means unlimited. +- `perUserQuotaBytes` is the per-user quota. `-1` means unlimited. ```yaml # galley.yaml @@ -678,7 +681,8 @@ config: collabora: edition: COOL storage: - perUserQuotaBytes: "1000000000000" # 1 TB + totalLimitBytes: "1000000000000" # 1 TB + perUserQuotaBytes: "-1" ``` ### Allowed Global Operations diff --git a/integration/test/Test/FeatureFlags/CellsInternal.hs b/integration/test/Test/FeatureFlags/CellsInternal.hs index c202004789d..460afbddc2e 100644 --- a/integration/test/Test/FeatureFlags/CellsInternal.hs +++ b/integration/test/Test/FeatureFlags/CellsInternal.hs @@ -27,8 +27,9 @@ testCellsInternalEvent :: (HasCallStack) => App () testCellsInternalEvent = do (alice, tid, _) <- createTeam OwnDomain 0 q <- watchCellsEventsForTeam tid def - let quota = "234723984" - update = mkFt "enabled" "unlocked" defConf {quota} + let totalLimit = "234723984" + quota = "-1" + update = mkFt "enabled" "unlocked" defConf {totalLimit, quota} setFeature InternalAPI alice tid "cellsInternal" update >>= assertSuccess event <- getMessage q %. "payload.0" event %. "name" `shouldMatch` "cellsInternal" @@ -38,6 +39,7 @@ testCellsInternalEvent = do event %. "data.status" `shouldMatch` "enabled" event %. "data.config.backend.url" `shouldMatch` "https://cells-beta.wire.com" event %. "data.config.collabora.edition" `shouldMatch` "COOL" + event %. "data.config.storage.totalLimitBytes" `shouldMatch` totalLimit event %. "data.config.storage.perUserQuotaBytes" `shouldMatch` quota testCellsInternal :: (HasCallStack) => App () @@ -59,6 +61,8 @@ validCellsInternalUpdates = mkFt "enabled" "unlocked" defConf {collabora = "NO"}, mkFt "enabled" "unlocked" defConf {collabora = "COOL"}, mkFt "enabled" "unlocked" defConf {url = "https://wire.com"}, + mkFt "enabled" "unlocked" defConf {totalLimit = "-1"}, + mkFt "enabled" "unlocked" defConf {totalLimit = "-2"}, mkFt "enabled" "unlocked" defConf {quota = "92346832946243"} ] @@ -81,7 +85,11 @@ mkFt s ls c = .= object [ "backend" .= object ["url" .= c.url], "collabora" .= object ["edition" .= c.collabora], - "storage" .= object ["perUserQuotaBytes" .= c.quota] + "storage" + .= object + [ "totalLimitBytes" .= c.totalLimit, + "perUserQuotaBytes" .= c.quota + ] ] ] @@ -90,7 +98,8 @@ defConf = CellsInternalConfig { url = "https://cells-beta.wire.com", collabora = "COOL", - quota = "1000000000000" + totalLimit = "1000000000000", + quota = "-1" } testPatchCellsInternal :: (HasCallStack) => App () @@ -104,5 +113,6 @@ testPatchCellsInternal = do data CellsInternalConfig = CellsInternalConfig { url :: String, collabora :: String, + totalLimit :: String, quota :: String } diff --git a/integration/test/Test/FeatureFlags/Util.hs b/integration/test/Test/FeatureFlags/Util.hs index 88b10c965ab..3595be386f9 100644 --- a/integration/test/Test/FeatureFlags/Util.hs +++ b/integration/test/Test/FeatureFlags/Util.hs @@ -238,7 +238,11 @@ defAllFeatures = .= object [ "backend" .= object ["url" .= "https://cells-beta.wire.com"], "collabora" .= object ["edition" .= "COOL"], - "storage" .= object ["perUserQuotaBytes" .= "1000000000000"] + "storage" + .= object + [ "totalLimitBytes" .= "1000000000000", + "perUserQuotaBytes" .= "-1" + ] ] ], "meetings" .= enabled, @@ -439,7 +443,11 @@ defAllConfiguredFeatures = .= object [ "backend" .= object ["url" .= "https://cells-beta.wire.com"], "collabora" .= object ["edition" .= "COOL"], - "storage" .= object ["perUserQuotaBytes" .= "1000000000000"] + "storage" + .= object + [ "totalLimitBytes" .= "1000000000000", + "perUserQuotaBytes" .= "-1" + ] ] ] ), diff --git a/libs/wire-api/src/Wire/API/Team/Feature.hs b/libs/wire-api/src/Wire/API/Team/Feature.hs index 8df1b695559..67bdeb71c5a 100644 --- a/libs/wire-api/src/Wire/API/Team/Feature.hs +++ b/libs/wire-api/src/Wire/API/Team/Feature.hs @@ -108,6 +108,7 @@ module Wire.API.Team.Feature CellsCollabora (..), CollaboraEdition (..), CellsBackend (..), + QuotaBytes (..), CellsStorage (..), NumBytes (..), AllowedGlobalOperationsConfig (..), @@ -168,13 +169,14 @@ import Data.Text.Encoding qualified as T import Data.Text.Encoding.Error import Data.Text.Lazy qualified as TL import Data.Text.Lazy.Encoding qualified as TL +import Data.Text.Read qualified as TR import Data.Time import Deriving.Aeson import GHC.TypeLits import Generics.SOP qualified as GSOP import Imports hiding (All, First) import Servant (FromHttpApiData (..), ToHttpApiData (..)) -import Test.QuickCheck (choose, getPrintableString) +import Test.QuickCheck (choose, frequency, getPrintableString) import Test.QuickCheck.Arbitrary (arbitrary) import Test.QuickCheck.Gen (suchThat) import URI.ByteString.QQ qualified as URI.QQ @@ -1910,18 +1912,53 @@ instance ToSchema NumBytes where pure n ) -newtype CellsStorage = CellsStorage - { perUserQuotaBytes :: NumBytes +data QuotaBytes + = QuotaBytesFinite NumBytes + | QuotaBytesUnlimited + deriving stock (Show, Eq) + +instance Arbitrary QuotaBytes where + arbitrary = + frequency + [ (1, pure QuotaBytesUnlimited), + (9, QuotaBytesFinite <$> arbitrary) + ] + +instance ToSchema QuotaBytes where + schema = mkSchema quotaBytesDoc parseQuotaBytes quotaBytesToValue + where + quotaBytesDoc :: NamedSwaggerDoc + quotaBytesDoc = swaggerDoc @Text & S.schema . S.example ?~ "-1" + + quotaBytesToValue :: QuotaBytes -> Maybe A.Value + quotaBytesToValue QuotaBytesUnlimited = Just $ A.String "-1" + quotaBytesToValue (QuotaBytesFinite n) = Just $ A.toJSON n + + parseQuotaBytes :: A.Value -> A.Parser QuotaBytes + parseQuotaBytes = A.withText "QuotaBytes" $ \txt -> + case TR.signed TR.decimal txt :: Either String (Integer, Text) of + Left err -> fail err + Right (n, rest) -> do + unless (T.null rest) $ + fail "value must be an integer string without decimals" + if n < 0 + then pure QuotaBytesUnlimited + else QuotaBytesFinite <$> schemaParseJSON (A.String txt) + +data CellsStorage = CellsStorage + { totalLimitBytes :: Maybe QuotaBytes, + perUserQuotaBytes :: QuotaBytes } deriving (Show, Eq, Generic) deriving (ToJSON, FromJSON, S.ToSchema) via Schema CellsStorage - deriving newtype (Arbitrary) + deriving (Arbitrary) via (GenericUniform CellsStorage) instance ToSchema CellsStorage where schema = object $ CellsStorage - <$> perUserQuotaBytes .= field "perUserQuotaBytes" schema + <$> totalLimitBytes .= maybe_ (optField "totalLimitBytes" schema) + <*> perUserQuotaBytes .= field "perUserQuotaBytes" schema data CellsInternalConfigB t f = CellsInternalConfig { backend :: Wear t f CellsBackend, @@ -1955,7 +1992,11 @@ instance Default CellsInternalConfig where CellsInternalConfig { backend = CellsBackend $ HttpsUrl [URI.QQ.uri|https://cells-beta.wire.com|], collabora = CellsCollabora Cool, - storage = CellsStorage $ NumBytes $ BigIntString 1000000000000 -- 1 TB + storage = + CellsStorage + { totalLimitBytes = Just $ QuotaBytesFinite $ NumBytes $ BigIntString 1000000000000, -- 1 TB + perUserQuotaBytes = QuotaBytesUnlimited + } } instance (Typeable f, FieldF f) => ToSchema (CellsInternalConfigB Covered f) where diff --git a/services/galley/galley.integration.yaml b/services/galley/galley.integration.yaml index 8aa4ef069e6..0afa9ef8940 100644 --- a/services/galley/galley.integration.yaml +++ b/services/galley/galley.integration.yaml @@ -208,7 +208,8 @@ settings: collabora: edition: COOL storage: - perUserQuotaBytes: "1000000000000" + totalLimitBytes: "1000000000000" + perUserQuotaBytes: "-1" allowedGlobalOperations: status: enabled config: diff --git a/tools/stern/test/integration/API.hs b/tools/stern/test/integration/API.hs index 62af047dc32..9193906b66f 100644 --- a/tools/stern/test/integration/API.hs +++ b/tools/stern/test/integration/API.hs @@ -399,6 +399,9 @@ testCellsInternalConfig :: TestM () testCellsInternalConfig = do (_, tid, _) <- createTeamWithNMembers 1 cfg <- getFeatureConfig @CellsInternalConfig tid + liftIO $ do + cfg.config.storage.totalLimitBytes @?= Just (QuotaBytesFinite (NumBytes (BigIntString 1000000000000))) + cfg.config.storage.perUserQuotaBytes @?= QuotaBytesUnlimited let newBackend :: HttpsUrl newBackend = fromMaybe (error "invalid url") . fromByteString $ "https://cells-internal.example.com" newCfg = @@ -407,7 +410,11 @@ testCellsInternalConfig = do cfg.config { backend = CellsBackend newBackend, collabora = CellsCollabora Cool, - storage = CellsStorage (NumBytes (BigIntString 2000000000000)) + storage = + CellsStorage + { totalLimitBytes = Just (QuotaBytesFinite (NumBytes (BigIntString 2000000000000))), + perUserQuotaBytes = QuotaBytesUnlimited + } } } :: LockableFeature CellsInternalConfig From 2f9c4639a4fe9d5712ce9fbe422afa8508e79d04 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Tue, 16 Jun 2026 14:53:23 +0000 Subject: [PATCH 2/5] any negative quota mean unlimited, added api changelog --- changelog.d/1-api-changes/WPB-26118 | 1 + docs/src/developer/reference/config-options.md | 2 +- integration/test/Test/FeatureFlags/CellsInternal.hs | 2 +- libs/wire-api/src/Wire/API/Team/Feature.hs | 10 +++++----- tools/stern/test/integration/API.hs | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 changelog.d/1-api-changes/WPB-26118 diff --git a/changelog.d/1-api-changes/WPB-26118 b/changelog.d/1-api-changes/WPB-26118 new file mode 100644 index 00000000000..c6dd3c3b9c1 --- /dev/null +++ b/changelog.d/1-api-changes/WPB-26118 @@ -0,0 +1 @@ +`cellsInternal` in API version `v17` now exposes storage quotas as `totalLimitBytes` and `perUserQuotaBytes`. `totalLimitBytes` is optional for backward compatibility with existing records, and any negative value for either field means unlimited. diff --git a/docs/src/developer/reference/config-options.md b/docs/src/developer/reference/config-options.md index 6905d5387aa..a4582951cee 100644 --- a/docs/src/developer/reference/config-options.md +++ b/docs/src/developer/reference/config-options.md @@ -664,7 +664,7 @@ cells: Cells configuration is intentionally split: `cells` is controlled by the team admin, while `cellsInternal` is set by the site operator/customer support via the internal API only. For `cellsInternal`, the `status` and `lockStatus` fields are *required* to be set to `enabled` and `unlocked` respectively, as enforced by validation logic. Failure to set these values will result in a configuration error. This block holds the backend URL, Collabora edition, and two storage quota settings: - `totalLimitBytes` is the total team data limit. It is optional for backward compatibility with existing records, and any negative value means unlimited. -- `perUserQuotaBytes` is the per-user quota. `-1` means unlimited. +- `perUserQuotaBytes` is the per-user quota. Any negative value means unlimited. ```yaml # galley.yaml diff --git a/integration/test/Test/FeatureFlags/CellsInternal.hs b/integration/test/Test/FeatureFlags/CellsInternal.hs index 460afbddc2e..c73593b9098 100644 --- a/integration/test/Test/FeatureFlags/CellsInternal.hs +++ b/integration/test/Test/FeatureFlags/CellsInternal.hs @@ -63,6 +63,7 @@ validCellsInternalUpdates = mkFt "enabled" "unlocked" defConf {url = "https://wire.com"}, mkFt "enabled" "unlocked" defConf {totalLimit = "-1"}, mkFt "enabled" "unlocked" defConf {totalLimit = "-2"}, + mkFt "enabled" "unlocked" defConf {quota = "-2"}, mkFt "enabled" "unlocked" defConf {quota = "92346832946243"} ] @@ -70,7 +71,6 @@ invalidCellsInternalUpdates :: [Value] invalidCellsInternalUpdates = [ mkFt "enabled" "unlocked" defConf {collabora = "FOO"}, mkFt "enabled" "unlocked" defConf {url = "http://wire.com"}, - mkFt "enabled" "unlocked" defConf {quota = "-92346832946243"}, mkFt "enabled" "unlocked" defConf {quota = "1 TB"}, mkFt "disabled" "unlocked" defConf ] diff --git a/libs/wire-api/src/Wire/API/Team/Feature.hs b/libs/wire-api/src/Wire/API/Team/Feature.hs index 67bdeb71c5a..429e267a5cf 100644 --- a/libs/wire-api/src/Wire/API/Team/Feature.hs +++ b/libs/wire-api/src/Wire/API/Team/Feature.hs @@ -1914,13 +1914,13 @@ instance ToSchema NumBytes where data QuotaBytes = QuotaBytesFinite NumBytes - | QuotaBytesUnlimited + | QuotaBytesUnlimited BigIntString deriving stock (Show, Eq) instance Arbitrary QuotaBytes where arbitrary = frequency - [ (1, pure QuotaBytesUnlimited), + [ (1, QuotaBytesUnlimited . BigIntString <$> choose (-99999999999999999999999999, -1)), (9, QuotaBytesFinite <$> arbitrary) ] @@ -1931,7 +1931,7 @@ instance ToSchema QuotaBytes where quotaBytesDoc = swaggerDoc @Text & S.schema . S.example ?~ "-1" quotaBytesToValue :: QuotaBytes -> Maybe A.Value - quotaBytesToValue QuotaBytesUnlimited = Just $ A.String "-1" + quotaBytesToValue (QuotaBytesUnlimited (BigIntString n)) = Just $ A.String (T.pack (show n)) quotaBytesToValue (QuotaBytesFinite n) = Just $ A.toJSON n parseQuotaBytes :: A.Value -> A.Parser QuotaBytes @@ -1942,7 +1942,7 @@ instance ToSchema QuotaBytes where unless (T.null rest) $ fail "value must be an integer string without decimals" if n < 0 - then pure QuotaBytesUnlimited + then pure $ QuotaBytesUnlimited (BigIntString n) else QuotaBytesFinite <$> schemaParseJSON (A.String txt) data CellsStorage = CellsStorage @@ -1995,7 +1995,7 @@ instance Default CellsInternalConfig where storage = CellsStorage { totalLimitBytes = Just $ QuotaBytesFinite $ NumBytes $ BigIntString 1000000000000, -- 1 TB - perUserQuotaBytes = QuotaBytesUnlimited + perUserQuotaBytes = QuotaBytesUnlimited (BigIntString (-1)) } } diff --git a/tools/stern/test/integration/API.hs b/tools/stern/test/integration/API.hs index 9193906b66f..e77ecd87116 100644 --- a/tools/stern/test/integration/API.hs +++ b/tools/stern/test/integration/API.hs @@ -401,7 +401,7 @@ testCellsInternalConfig = do cfg <- getFeatureConfig @CellsInternalConfig tid liftIO $ do cfg.config.storage.totalLimitBytes @?= Just (QuotaBytesFinite (NumBytes (BigIntString 1000000000000))) - cfg.config.storage.perUserQuotaBytes @?= QuotaBytesUnlimited + cfg.config.storage.perUserQuotaBytes @?= QuotaBytesUnlimited (BigIntString (-1)) let newBackend :: HttpsUrl newBackend = fromMaybe (error "invalid url") . fromByteString $ "https://cells-internal.example.com" newCfg = @@ -413,7 +413,7 @@ testCellsInternalConfig = do storage = CellsStorage { totalLimitBytes = Just (QuotaBytesFinite (NumBytes (BigIntString 2000000000000))), - perUserQuotaBytes = QuotaBytesUnlimited + perUserQuotaBytes = QuotaBytesUnlimited (BigIntString (-1)) } } } :: From b47f1c29c8737cf0ebfd5478d42cd3a4e03b314b Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Tue, 16 Jun 2026 15:29:24 +0000 Subject: [PATCH 3/5] do not store original negative number user input --- changelog.d/1-api-changes/WPB-26118 | 2 +- docs/src/developer/reference/config-options.md | 4 ++-- integration/test/Test/FeatureFlags/CellsInternal.hs | 2 -- libs/wire-api/src/Wire/API/Team/Feature.hs | 12 ++++++------ tools/stern/test/integration/API.hs | 4 ++-- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/changelog.d/1-api-changes/WPB-26118 b/changelog.d/1-api-changes/WPB-26118 index c6dd3c3b9c1..73ce923af8f 100644 --- a/changelog.d/1-api-changes/WPB-26118 +++ b/changelog.d/1-api-changes/WPB-26118 @@ -1 +1 @@ -`cellsInternal` in API version `v17` now exposes storage quotas as `totalLimitBytes` and `perUserQuotaBytes`. `totalLimitBytes` is optional for backward compatibility with existing records, and any negative value for either field means unlimited. +`cellsInternal` in API version `v17` now exposes storage quotas as `totalLimitBytes` and `perUserQuotaBytes`. `totalLimitBytes` is optional for backward compatibility with existing records, any negative value for either field is accepted as unlimited, and unlimited values are returned as `-1`. diff --git a/docs/src/developer/reference/config-options.md b/docs/src/developer/reference/config-options.md index a4582951cee..ba9a12d04a9 100644 --- a/docs/src/developer/reference/config-options.md +++ b/docs/src/developer/reference/config-options.md @@ -663,8 +663,8 @@ cells: Cells configuration is intentionally split: `cells` is controlled by the team admin, while `cellsInternal` is set by the site operator/customer support via the internal API only. For `cellsInternal`, the `status` and `lockStatus` fields are *required* to be set to `enabled` and `unlocked` respectively, as enforced by validation logic. Failure to set these values will result in a configuration error. This block holds the backend URL, Collabora edition, and two storage quota settings: -- `totalLimitBytes` is the total team data limit. It is optional for backward compatibility with existing records, and any negative value means unlimited. -- `perUserQuotaBytes` is the per-user quota. Any negative value means unlimited. +- `totalLimitBytes` is the total team data limit. It is optional for backward compatibility with existing records, and any negative value is accepted as unlimited. The API returns `-1` for unlimited. +- `perUserQuotaBytes` is the per-user quota. Any negative value is accepted as unlimited. The API returns `-1` for unlimited. ```yaml # galley.yaml diff --git a/integration/test/Test/FeatureFlags/CellsInternal.hs b/integration/test/Test/FeatureFlags/CellsInternal.hs index c73593b9098..573ba9c8809 100644 --- a/integration/test/Test/FeatureFlags/CellsInternal.hs +++ b/integration/test/Test/FeatureFlags/CellsInternal.hs @@ -62,8 +62,6 @@ validCellsInternalUpdates = mkFt "enabled" "unlocked" defConf {collabora = "COOL"}, mkFt "enabled" "unlocked" defConf {url = "https://wire.com"}, mkFt "enabled" "unlocked" defConf {totalLimit = "-1"}, - mkFt "enabled" "unlocked" defConf {totalLimit = "-2"}, - mkFt "enabled" "unlocked" defConf {quota = "-2"}, mkFt "enabled" "unlocked" defConf {quota = "92346832946243"} ] diff --git a/libs/wire-api/src/Wire/API/Team/Feature.hs b/libs/wire-api/src/Wire/API/Team/Feature.hs index 429e267a5cf..eca776482fc 100644 --- a/libs/wire-api/src/Wire/API/Team/Feature.hs +++ b/libs/wire-api/src/Wire/API/Team/Feature.hs @@ -1914,13 +1914,13 @@ instance ToSchema NumBytes where data QuotaBytes = QuotaBytesFinite NumBytes - | QuotaBytesUnlimited BigIntString + | QuotaBytesUnlimited deriving stock (Show, Eq) instance Arbitrary QuotaBytes where arbitrary = frequency - [ (1, QuotaBytesUnlimited . BigIntString <$> choose (-99999999999999999999999999, -1)), + [ (1, pure QuotaBytesUnlimited), (9, QuotaBytesFinite <$> arbitrary) ] @@ -1931,7 +1931,7 @@ instance ToSchema QuotaBytes where quotaBytesDoc = swaggerDoc @Text & S.schema . S.example ?~ "-1" quotaBytesToValue :: QuotaBytes -> Maybe A.Value - quotaBytesToValue (QuotaBytesUnlimited (BigIntString n)) = Just $ A.String (T.pack (show n)) + quotaBytesToValue QuotaBytesUnlimited = Just $ A.String "-1" quotaBytesToValue (QuotaBytesFinite n) = Just $ A.toJSON n parseQuotaBytes :: A.Value -> A.Parser QuotaBytes @@ -1942,7 +1942,7 @@ instance ToSchema QuotaBytes where unless (T.null rest) $ fail "value must be an integer string without decimals" if n < 0 - then pure $ QuotaBytesUnlimited (BigIntString n) + then pure QuotaBytesUnlimited else QuotaBytesFinite <$> schemaParseJSON (A.String txt) data CellsStorage = CellsStorage @@ -1993,9 +1993,9 @@ instance Default CellsInternalConfig where { backend = CellsBackend $ HttpsUrl [URI.QQ.uri|https://cells-beta.wire.com|], collabora = CellsCollabora Cool, storage = - CellsStorage + CellsStorage { totalLimitBytes = Just $ QuotaBytesFinite $ NumBytes $ BigIntString 1000000000000, -- 1 TB - perUserQuotaBytes = QuotaBytesUnlimited (BigIntString (-1)) + perUserQuotaBytes = QuotaBytesUnlimited } } diff --git a/tools/stern/test/integration/API.hs b/tools/stern/test/integration/API.hs index e77ecd87116..9193906b66f 100644 --- a/tools/stern/test/integration/API.hs +++ b/tools/stern/test/integration/API.hs @@ -401,7 +401,7 @@ testCellsInternalConfig = do cfg <- getFeatureConfig @CellsInternalConfig tid liftIO $ do cfg.config.storage.totalLimitBytes @?= Just (QuotaBytesFinite (NumBytes (BigIntString 1000000000000))) - cfg.config.storage.perUserQuotaBytes @?= QuotaBytesUnlimited (BigIntString (-1)) + cfg.config.storage.perUserQuotaBytes @?= QuotaBytesUnlimited let newBackend :: HttpsUrl newBackend = fromMaybe (error "invalid url") . fromByteString $ "https://cells-internal.example.com" newCfg = @@ -413,7 +413,7 @@ testCellsInternalConfig = do storage = CellsStorage { totalLimitBytes = Just (QuotaBytesFinite (NumBytes (BigIntString 2000000000000))), - perUserQuotaBytes = QuotaBytesUnlimited (BigIntString (-1)) + perUserQuotaBytes = QuotaBytesUnlimited } } } :: From 8399bbbb63c933ec47b9f75a616179ac3cb25e99 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Tue, 16 Jun 2026 15:41:56 +0000 Subject: [PATCH 4/5] helm defaults and CI settings --- charts/wire-server/values.yaml | 3 ++- hack/helm_vars/wire-server/values.yaml.gotmpl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/wire-server/values.yaml b/charts/wire-server/values.yaml index 1692ffb9b37..7f2c5a6831f 100644 --- a/charts/wire-server/values.yaml +++ b/charts/wire-server/values.yaml @@ -284,7 +284,8 @@ galley: collabora: edition: COOL storage: - perUserQuotaBytes: "1000000000000" + totalLimitBytes: "1000000000000" + perUserQuotaBytes: "-1" allowedGlobalOperations: status: enabled config: diff --git a/hack/helm_vars/wire-server/values.yaml.gotmpl b/hack/helm_vars/wire-server/values.yaml.gotmpl index d3922380f9d..d5b4c7ad883 100644 --- a/hack/helm_vars/wire-server/values.yaml.gotmpl +++ b/hack/helm_vars/wire-server/values.yaml.gotmpl @@ -391,7 +391,8 @@ galley: collabora: edition: COOL storage: - perUserQuotaBytes: "1000000000000" + totalLimitBytes: "1000000000000" + perUserQuotaBytes: "-1" allowedGlobalOperations: status: enabled config: From c309d2dc4e4a1aa21bd618206deca14c30819a44 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Tue, 16 Jun 2026 16:22:26 +0000 Subject: [PATCH 5/5] formattting --- libs/wire-api/src/Wire/API/Team/Feature.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/wire-api/src/Wire/API/Team/Feature.hs b/libs/wire-api/src/Wire/API/Team/Feature.hs index eca776482fc..67bdeb71c5a 100644 --- a/libs/wire-api/src/Wire/API/Team/Feature.hs +++ b/libs/wire-api/src/Wire/API/Team/Feature.hs @@ -1993,7 +1993,7 @@ instance Default CellsInternalConfig where { backend = CellsBackend $ HttpsUrl [URI.QQ.uri|https://cells-beta.wire.com|], collabora = CellsCollabora Cool, storage = - CellsStorage + CellsStorage { totalLimitBytes = Just $ QuotaBytesFinite $ NumBytes $ BigIntString 1000000000000, -- 1 TB perUserQuotaBytes = QuotaBytesUnlimited }