Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One to one SFT feature flag config #4164

Merged
merged 43 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2ef27b5
Restore weeded-out wsPatch
pcapriotti Jul 31, 2024
cd59a39
Add field to ConferenceCallingConfig
pcapriotti Jul 19, 2024
021cdfd
Use patch endpoint to set feature status in stern
pcapriotti Jul 22, 2024
42020fa
Remove FeatureTrivialConfig class
pcapriotti Jul 22, 2024
b0da923
Add migration to add conference calling sft flag
pcapriotti Jul 22, 2024
ee0f55d
Implement get/set conference calling feature flag
pcapriotti Jul 22, 2024
d701da5
Fix golden tests
pcapriotti Jul 22, 2024
b7f2ea1
Add endpoint to put ConferenceCallingConfig.
elland Jul 22, 2024
40f18d9
Added lock status to conf. calling.
elland Jul 22, 2024
33ed08e
Fix golden test cases
pcapriotti Jul 23, 2024
74a425d
Update conference call ttl test
pcapriotti Jul 23, 2024
df96f2d
Fix conference calling patch test
pcapriotti Jul 23, 2024
694ce7c
Update CHANGELOG entry
pcapriotti Jul 23, 2024
64f0d3c
Fix assertions in conferenceCalling TTL test
pcapriotti Jul 23, 2024
74c4724
Move user feature test to integration
pcapriotti Jul 23, 2024
2fd5dbe
Remove dead code
pcapriotti Jul 24, 2024
6451292
Update cassandra schema file
pcapriotti Jul 24, 2024
4405f15
Change how conferenceCalling is stored and loaded
pcapriotti Jul 24, 2024
c25f044
Add general AllFeatures for any type constructor
pcapriotti Jul 25, 2024
7ce939f
Return Maybe values from FeatureStore
pcapriotti Jul 25, 2024
3e640d9
Compute feature values in a uniform manner
pcapriotti Jul 25, 2024
b3b1730
Unify logic for fetching features from db
pcapriotti Jul 26, 2024
f433ec8
Use adhoc DbFeature type instead of WithStatusBase
pcapriotti Jul 26, 2024
6189811
Fix default logic of MlsE2EI flag
pcapriotti Jul 26, 2024
f190fd8
Implement getAllFeatureConfigs
pcapriotti Jul 26, 2024
a560f05
Lint
pcapriotti Jul 26, 2024
d70c97f
Change conference option from boolean to int
pcapriotti Jul 29, 2024
6167ddc
Repurpose conference_calling column for lock status
pcapriotti Jul 29, 2024
d460a81
Ignore TTL for conferenceCalling
pcapriotti Jul 29, 2024
1efa0b5
Add default logic for conference calling
pcapriotti Jul 30, 2024
bcd39a8
Remove feature ttl tests
pcapriotti Jul 30, 2024
1eab35e
Add CHANGELOG entry about TTL
pcapriotti Jul 30, 2024
c6f4e2d
Add note about unsettable features
pcapriotti Jul 31, 2024
40ce551
Lint
pcapriotti Jul 31, 2024
9c705f9
Conference calling flag should be locked by default
pcapriotti Jul 31, 2024
4b5d140
Make lockStatus field optional in galley's conf
pcapriotti Jul 31, 2024
6f49b90
Remove unused ToJSON instance
pcapriotti Jul 31, 2024
ae08ff6
Lint
pcapriotti Jul 31, 2024
8eda399
Align conferenceCalling setting in CI
pcapriotti Aug 1, 2024
515a6b3
Fix stern integration tests
pcapriotti Aug 1, 2024
6c6c133
Update cassandra schema
pcapriotti Aug 5, 2024
7899f01
Use bindResponse in tests
pcapriotti Aug 5, 2024
5f3cdc2
Revert default lock status when parsing feature
pcapriotti Aug 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cassandra-schema.cql
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,8 @@ CREATE TABLE galley_test.team_features (
app_lock_inactivity_timeout_secs int,
app_lock_status int,
conference_calling int,
conference_calling_one_to_one int,
conference_calling_status int,
digital_signatures int,
enforce_file_download_location text,
enforce_file_download_location_lock_status int,
Expand Down
1 change: 1 addition & 0 deletions changelog.d/1-api-changes/ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove the ability to set the TTL of a feature flag. Existing TTLs are still retrieved and returned as before. Note that this only applies to the conferenceCalling feature, as none of the others supported TTL anyway.
1 change: 1 addition & 0 deletions changelog.d/1-api-changes/wpb-10235
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add useSFTForOneToOneCalls as a config option for the Conference Calling feature flag and make its lock status explicit.
1 change: 1 addition & 0 deletions charts/galley/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ config:
conferenceCalling:
defaults:
status: enabled
lockStatus: locked
conversationGuestLinks:
defaults:
lockStatus: unlocked
Expand Down
9 changes: 9 additions & 0 deletions hack/helm_vars/wire-server/values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ brig:
setMaxConvSize: 16
# See helmfile for the real value
setFederationDomain: integration.example.com
setFeatureFlags:
conferenceCalling:
defaultForNew:
status: disabled
defaultForNull:
status: disabled
setFederationStrategy: allowAll
setFederationDomainConfigsUpdateFreq: 10
setDisabledAPIVersions: []
Expand Down Expand Up @@ -256,6 +262,9 @@ galley:
sso: disabled-by-default # this needs to be the default; tests can enable it when needed.
legalhold: whitelist-teams-and-implicit-consent
teamSearchVisibility: disabled-by-default
conferenceCalling:
defaults:
status: disabled
classifiedDomains:
status: enabled
config:
Expand Down
1 change: 1 addition & 0 deletions integration/integration.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ library
Test.Errors
Test.ExternalPartner
Test.FeatureFlags
Test.FeatureFlags.User
Test.FeatureFlags.Util
Test.Federation
Test.Federator
Expand Down
2 changes: 1 addition & 1 deletion integration/test/API/Brig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ getCallsConfigV2 user = do
req <- baseRequest user Brig Versioned $ joinHttpPath ["calls", "config", "v2"]
submit "GET" req

addBot :: (MakesValue user) => user -> String -> String -> String -> App Response
addBot :: (HasCallStack, MakesValue user) => user -> String -> String -> String -> App Response
addBot user providerId serviceId convId = do
req <- baseRequest user Brig Versioned $ joinHttpPath ["conversations", convId, "bots"]
submit "POST" $
Expand Down
29 changes: 28 additions & 1 deletion integration/test/API/BrigInternal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,37 @@ getEJPDInfo dom handles mode = do
bad -> error $ show bad
submit "POST" $ req & addJSONObject ["EJPDRequest" .= handles] & addQueryParams query

-- https://staging-nginz-https.zinfra.io/api-internal/swagger-ui/brig/#/brig/get_i_users__uid__verification_code__action_
-- | https://staging-nginz-https.zinfra.io/api-internal/swagger-ui/brig/#/brig/get_i_users__uid__verification_code__action_
getVerificationCode :: (HasCallStack, MakesValue user) => user -> String -> App Response
getVerificationCode user action = do
uid <- objId user
domain <- objDomain user
req <- baseRequest domain Brig Unversioned $ joinHttpPath ["i", "users", uid, "verification-code", action]
submit "GET" req

-- | http://staging-nginz-https.zinfra.io/api-internal/swagger-ui/brig/#/brig/get_i_users__uid__features_conferenceCalling
getFeatureForUser :: (HasCallStack, MakesValue user) => user -> String -> App Response
getFeatureForUser user featureName = do
uid <- objId user
req <- baseRequest user Brig Unversioned $ joinHttpPath ["i", "users", uid, "features", featureName]
submit "GET" req

-- | http://staging-nginz-https.zinfra.io/api-internal/swagger-ui/brig/#/brig/put_i_users__uid__features_conferenceCalling
putFeatureForUser ::
(HasCallStack, MakesValue user, MakesValue config) =>
user ->
String ->
config ->
App Response
putFeatureForUser user featureName config = do
pcapriotti marked this conversation as resolved.
Show resolved Hide resolved
uid <- objId user
req <- baseRequest user Brig Unversioned $ joinHttpPath ["i", "users", uid, "features", featureName]
configValue <- make config
submit "PUT" $ req & addJSON configValue

-- | http://staging-nginz-https.zinfra.io/api-internal/swagger-ui/brig/#/brig/delete_i_users__uid__features_conferenceCalling
deleteFeatureForUser :: (HasCallStack, MakesValue user) => user -> String -> App Response
deleteFeatureForUser user featureName = do
uid <- objId user
req <- baseRequest user Brig Unversioned $ joinHttpPath ["i", "users", uid, "features", featureName]
submit "DELETE" req
4 changes: 4 additions & 0 deletions integration/test/API/Galley.hs
Original file line number Diff line number Diff line change
Expand Up @@ -705,3 +705,7 @@ setTeamFeatureConfigVersioned versioned user team featureName payload = do
p <- make payload
req <- baseRequest user Galley versioned $ joinHttpPath ["teams", tid, "features", fn]
submit "PUT" $ req & addJSON p

-- | http://staging-nginz-https.zinfra.io/v6/api/swagger-ui/#/default/get_feature_configs
getFeaturesForUser :: (HasCallStack, MakesValue user) => user -> App Response
getFeaturesForUser user = baseRequest user Galley Versioned "feature-configs" >>= submit "GET"
8 changes: 8 additions & 0 deletions integration/test/API/GalleyInternal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ setTeamFeatureConfig domain team featureName payload = do
req <- baseRequest domain Galley Unversioned $ joinHttpPath ["i", "teams", tid, "features", fn]
submit "PUT" $ req & addJSON p

patchTeamFeatureConfig :: (HasCallStack, MakesValue domain, MakesValue team, MakesValue featureName, MakesValue payload) => domain -> team -> featureName -> payload -> App Response
patchTeamFeatureConfig domain team featureName payload = do
tid <- asString team
fn <- asString featureName
p <- make payload
req <- baseRequest domain Galley Unversioned $ joinHttpPath ["i", "teams", tid, "features", fn]
submit "PATCH" $ req & addJSON p

-- https://staging-nginz-https.zinfra.io/api-internal/swagger-ui/galley/#/galley/post_i_features_multi_teams_searchVisibilityInbound
getFeatureStatusMulti :: (HasCallStack, MakesValue domain, MakesValue featureName) => domain -> featureName -> [String] -> App Response
getFeatureStatusMulti domain featureName tids = do
Expand Down
Loading
Loading