Skip to content

Conversation

elland
Copy link
Contributor

@elland elland commented Jul 14, 2022

The changes to the feature endpoint is backward compatible and shouldn't require any specific deploy order.

Checklist

  • The PR Title explains the impact of the change.
  • The PR description provides context as to why the change should occur and what the code contributes to that effect. This could also be a link to a JIRA ticket or a Github issue, if there is one.
  • changelog.d contains the following bits of information (details):
  • If public end-points have been changed or added: does nginz need un upgrade?
  • If internal end-points have been added or changed: which services have to be deployed in a specific order?

@elland elland force-pushed the SQSERVICES-1627-check-remaining-time-of-an-activated-a-feature-in-back-office branch from 79fa65a to e4a442a Compare July 14, 2022 14:48
@elland elland temporarily deployed to cachix July 14, 2022 14:49 Inactive
@elland elland temporarily deployed to cachix July 18, 2022 07:43 Inactive
@elland elland force-pushed the SQSERVICES-1627-check-remaining-time-of-an-activated-a-feature-in-back-office branch from b99c0b9 to 6e08765 Compare July 18, 2022 11:35
@elland elland temporarily deployed to cachix July 18, 2022 11:35 Inactive
@elland elland force-pushed the SQSERVICES-1627-check-remaining-time-of-an-activated-a-feature-in-back-office branch from 6e08765 to be58c05 Compare August 1, 2022 08:03
@elland elland temporarily deployed to cachix August 1, 2022 08:03 Inactive
@elland elland temporarily deployed to cachix August 1, 2022 08:31 Inactive
@fisx
Copy link
Contributor

fisx commented Aug 1, 2022

did you run the unit tests locally?

==== Testing galley-types...
#10 490.3 Tests
#10 490.3   Tests
#10 490.3     owner has all permissions:                                                          OK
#10 490.3     smaller roles (further to the left/top in the type def) are strictly more powerful: OK
#10 490.3     FeatureFlags:                                                                       FAIL (0.01s)
#10 490.3       *** Failed! Falsified (after 1 test):
#10 490.3       FeatureFlags {_flagSSO = FeatureSSODisabledByDefault, _flagLegalHold = FeatureLegalHoldWhitelistTeamsAndImplicitConsent, _flagTeamSearchVisibility = FeatureTeamSearchVisibilityUnavailableByDefault, _flagAppLockDefaults = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (AppLockConfig {applockEnforceAppLock = EnforceAppLock True, applockInactivityTimeoutSecs = -1}), wsbTTL = Identity FeatureTTLUnlimited}}, _flagClassifiedDomains = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (ClassifiedDomainsConfig {classifiedDomainsDomains = []}), wsbTTL = Identity (FeatureTTLSeconds 0)}, _flagFileSharing = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity FileSharingConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagConferenceCalling = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity ConferenceCallingConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagSelfDeletingMessages = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (SelfDeletingMessagesConfig {sdmEnforcedTimeoutSeconds = 0}), wsbTTL = Identity (FeatureTTLSeconds 0)}}, _flagConversationGuestLinks = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity GuestLinksConfig, wsbTTL = Identity (FeatureTTLSeconds 0)}}, _flagsTeamFeatureValidateSAMLEmailsStatus = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity ValidateSAMLEmailsConfig, wsbTTL = Identity (FeatureTTLSeconds 0)}}, _flagTeamFeatureSndFactorPasswordChallengeStatus = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusLocked, wsbConfig = Identity SndFactorPasswordChallengeConfig, wsbTTL = Identity (FeatureTTLSeconds 0)}}, _flagTeamFeatureSearchVisibilityInbound = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity SearchVisibilityInboundConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagMLS = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (MLSConfig {mlsProtocolToggleUsers = [], mlsDefaultProtocol = ProtocolMLSTag, mlsAllowedCipherSuites = [], mlsDefaultCipherSuite = MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519}), wsbTTL = Identity (FeatureTTLSeconds 0)}}}
#10 490.3       Object (fromList [("appLock",Object (fromList [("defaults",Object (fromList [("config",Object (fromList [("enforceAppLock",Bool True),("inactivityTimeoutSecs",Number (-1.0))])),("status",String "enabled"),("ttl",String "unlimited")]))])),("classifiedDomains",Object (fromList [("config",Object (fromList [("domains",Array [])])),("status",String "disabled"),("ttl",String "unlimited")])),("conferenceCalling",Object (fromList [("defaults",Object (fromList [("status",String "disabled"),("ttl",String "unlimited")]))])),("conversationGuestLinks",Object (fromList [("defaults",Object (fromList [("lockStatus",String "unlocked"),("status",String "enabled"),("ttl",String "unlimited")]))])),("fileSharing",Object (fromList [("defaults",Object (fromList [("lockStatus",String "unlocked"),("status",String "enabled"),("ttl",String "unlimited")]))])),("legalhold",String "whitelist-teams-and-implicit-consent"),("mls",Object (fromList [("defaults",Object (fromList [("config",Object (fromList [("allowedCipherSuites",Array []),("defaultCipherSuite",Number 1.0),("defaultProtocol",String "mls"),("protocolToggleUsers",Array [])])),("status",String "disabled"),("ttl",String "unlimited")]))])),("searchVisibilityInbound",Object (fromList [("defaults",Object (fromList [("status",String "disabled"),("ttl",String "unlimited")]))])),("selfDeletingMessages",Object (fromList [("defaults",Object (fromList [("config",Object (fromList [("enforcedTimeoutSeconds",Number 0.0)])),("lockStatus",String "unlocked"),("status",String "disabled"),("ttl",String "unlimited")]))])),("sndFactorPasswordChallenge",Object (fromList [("defaults",Object (fromList [("lockStatus",String "locked"),("status",String "disabled"),("ttl",String "unlimited")]))])),("sso",String "disabled-by-default"),("teamSearchVisibility",String "disabled-by-default"),("validateSAMLEmails",Object (fromList [("defaults",Object (fromList [("status",String "enabled"),("ttl",String "unlimited")]))]))])
#10 490.3       Right (FeatureFlags {_flagSSO = FeatureSSODisabledByDefault, _flagLegalHold = FeatureLegalHoldWhitelistTeamsAndImplicitConsent, _flagTeamSearchVisibility = FeatureTeamSearchVisibilityUnavailableByDefault, _flagAppLockDefaults = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (AppLockConfig {applockEnforceAppLock = EnforceAppLock True, applockInactivityTimeoutSecs = -1}), wsbTTL = Identity FeatureTTLUnlimited}}, _flagClassifiedDomains = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (ClassifiedDomainsConfig {classifiedDomainsDomains = []}), wsbTTL = Identity (FeatureTTLSeconds 0)}, _flagFileSharing = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity FileSharingConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagConferenceCalling = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity ConferenceCallingConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagSelfDeletingMessages = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (SelfDeletingMessagesConfig {sdmEnforcedTimeoutSeconds = 0}), wsbTTL = Identity (FeatureTTLSeconds 0)}}, _flagConversationGuestLinks = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity GuestLinksConfig, wsbTTL = Identity (FeatureTTLSeconds 0)}}, _flagsTeamFeatureValidateSAMLEmailsStatus = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity ValidateSAMLEmailsConfig, wsbTTL = Identity (FeatureTTLSeconds 0)}}, _flagTeamFeatureSndFactorPasswordChallengeStatus = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusLocked, wsbConfig = Identity SndFactorPasswordChallengeConfig, wsbTTL = Identity (FeatureTTLSeconds 0)}}, _flagTeamFeatureSearchVisibilityInbound = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity SearchVisibilityInboundConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagMLS = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (MLSConfig {mlsProtocolToggleUsers = [], mlsDefaultProtocol = ProtocolMLSTag, mlsAllowedCipherSuites = [], mlsDefaultCipherSuite = MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519}), wsbTTL = Identity (FeatureTTLSeconds 0)}}}) /= Right (FeatureFlags {_flagSSO = FeatureSSODisabledByDefault, _flagLegalHold = FeatureLegalHoldWhitelistTeamsAndImplicitConsent, _flagTeamSearchVisibility = FeatureTeamSearchVisibilityUnavailableByDefault, _flagAppLockDefaults = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (AppLockConfig {applockEnforceAppLock = EnforceAppLock True, applockInactivityTimeoutSecs = -1}), wsbTTL = Identity FeatureTTLUnlimited}}, _flagClassifiedDomains = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (ClassifiedDomainsConfig {classifiedDomainsDomains = []}), wsbTTL = Identity FeatureTTLUnlimited}, _flagFileSharing = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity FileSharingConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagConferenceCalling = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity ConferenceCallingConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagSelfDeletingMessages = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (SelfDeletingMessagesConfig {sdmEnforcedTimeoutSeconds = 0}), wsbTTL = Identity FeatureTTLUnlimited}}, _flagConversationGuestLinks = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity GuestLinksConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagsTeamFeatureValidateSAMLEmailsStatus = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusEnabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity ValidateSAMLEmailsConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagTeamFeatureSndFactorPasswordChallengeStatus = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusLocked, wsbConfig = Identity SndFactorPasswordChallengeConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagTeamFeatureSearchVisibilityInbound = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity SearchVisibilityInboundConfig, wsbTTL = Identity FeatureTTLUnlimited}}, _flagMLS = Defaults {_unDefaults = WithStatusBase {wsbStatus = Identity FeatureStatusDisabled, wsbLockStatus = Identity LockStatusUnlocked, wsbConfig = Identity (MLSConfig {mlsProtocolToggleUsers = [], mlsDefaultProtocol = ProtocolMLSTag, mlsAllowedCipherSuites = [], mlsDefaultCipherSuite = MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519}), wsbTTL = Identity FeatureTTLUnlimited}}})
#10 490.3       Use --quickcheck-replay=237033 to reproduce.
#10 490.3       Use -p '/FeatureFlags/' to rerun this test only.

@elland elland temporarily deployed to cachix August 1, 2022 14:48 Inactive
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Aug 1, 2022
@elland elland temporarily deployed to cachix August 2, 2022 08:32 Inactive
@elland elland force-pushed the SQSERVICES-1627-check-remaining-time-of-an-activated-a-feature-in-back-office branch from 5d5d4a8 to 068a602 Compare August 2, 2022 11:27
@elland elland temporarily deployed to cachix August 2, 2022 11:27 Inactive
@elland elland force-pushed the SQSERVICES-1627-check-remaining-time-of-an-activated-a-feature-in-back-office branch from 068a602 to 4382480 Compare August 2, 2022 11:38
@elland elland temporarily deployed to cachix August 2, 2022 11:38 Inactive
@elland elland temporarily deployed to cachix August 2, 2022 14:28 Inactive
@elland elland temporarily deployed to cachix August 2, 2022 14:30 Inactive
@elland elland force-pushed the SQSERVICES-1627-check-remaining-time-of-an-activated-a-feature-in-back-office branch from 690f0f7 to 5d34298 Compare August 3, 2022 07:17
@elland elland temporarily deployed to cachix August 3, 2022 07:17 Inactive
@elland elland force-pushed the SQSERVICES-1627-check-remaining-time-of-an-activated-a-feature-in-back-office branch from 5d34298 to 32c486d Compare August 3, 2022 07:46
@elland elland temporarily deployed to cachix August 3, 2022 07:46 Inactive
@elland elland temporarily deployed to cachix August 3, 2022 08:20 Inactive
@elland elland force-pushed the SQSERVICES-1627-check-remaining-time-of-an-activated-a-feature-in-back-office branch from 4390eb8 to 6f44ef1 Compare August 3, 2022 08:27
@elland elland temporarily deployed to cachix August 3, 2022 08:27 Inactive
@elland elland temporarily deployed to cachix August 3, 2022 09:34 Inactive
@elland elland temporarily deployed to cachix August 3, 2022 16:19 Inactive
@elland elland temporarily deployed to cachix August 4, 2022 07:06 Inactive
@fisx fisx force-pushed the SQSERVICES-1627-check-remaining-time-of-an-activated-a-feature-in-back-office branch from 3f36ae9 to d3747dc Compare August 11, 2022 13:47
@fisx fisx temporarily deployed to cachix August 11, 2022 13:47 Inactive
@fisx fisx temporarily deployed to cachix August 11, 2022 13:47 Inactive
…eck-remaining-time-of-an-activated-a-feature-in-back-office
@fisx fisx temporarily deployed to cachix August 11, 2022 13:53 Inactive
@fisx fisx temporarily deployed to cachix August 11, 2022 13:53 Inactive
fisx added 2 commits August 12, 2022 12:12
…eck-remaining-time-of-an-activated-a-feature-in-back-office
@fisx fisx temporarily deployed to cachix August 12, 2022 10:27 Inactive
@fisx fisx temporarily deployed to cachix August 12, 2022 10:27 Inactive
@fisx fisx temporarily deployed to cachix August 12, 2022 11:24 Inactive
@fisx fisx temporarily deployed to cachix August 12, 2022 11:24 Inactive
@fisx fisx temporarily deployed to cachix August 12, 2022 11:29 Inactive
@fisx fisx temporarily deployed to cachix August 12, 2022 11:29 Inactive
@fisx fisx temporarily deployed to cachix August 15, 2022 07:41 Inactive
@fisx fisx temporarily deployed to cachix August 15, 2022 07:41 Inactive
@battermann battermann temporarily deployed to cachix August 15, 2022 11:50 Inactive
@battermann battermann temporarily deployed to cachix August 15, 2022 11:50 Inactive

fromTTL :: FeatureTTL -> Maybe A.Value
fromTTL FeatureTTLUnlimited = Just "unlimited"
fromTTL (FeatureTTLSeconds 0) = Nothing -- Should be unlimited
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also impossible, right?

renderFeatureTtl :: FeatureTTL -> String
renderFeatureTtl = \case
FeatureTTLSeconds d | d > 0 -> " using ttl " <> show d
_ -> " using ttl 0" -- 0 or unlimited (delete a column's existing TTL by setting its value to zero)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, i see. i got that wrong earlier, thanks!

@fisx fisx temporarily deployed to cachix August 15, 2022 12:19 Inactive
@fisx fisx temporarily deployed to cachix August 15, 2022 12:19 Inactive
@battermann
Copy link
Contributor

Screenshot from 2022-08-15 14-29-06
Screenshot from 2022-08-15 14-30-19
Screenshot from 2022-08-15 14-30-49
Screenshot from 2022-08-15 14-31-16

@battermann battermann merged commit 211357d into develop Aug 15, 2022
@battermann battermann deleted the SQSERVICES-1627-check-remaining-time-of-an-activated-a-feature-in-back-office branch August 15, 2022 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants