SQSERVICES-1169 New internal endpoint to configure the guest links team feature#1993
Merged
battermann merged 5 commits intodevelopfrom Dec 17, 2021
Conversation
d22ad4e to
c495217
Compare
fisx
approved these changes
Dec 15, 2021
| import Data.Qualified | ||
| import Data.String.Conversions (cs) | ||
| import Data.Time.Clock | ||
| import Debug.Trace |
Contributor
There was a problem hiding this comment.
this is not allowed in prod code. (we really should have hlint checking these things...) if there is some logging you want to do, use tinylog, but I suspect it should just go away?
Comment on lines
635
to
648
| getGuestLinkInternal = \case | ||
| Left _ -> getCfgDefault | ||
| Left _ -> do | ||
| traceM "internal param user" | ||
| getCfgDefault | ||
| Right tid -> do | ||
| cfgDefault <- getCfgDefault | ||
| let defLockStatus = Public.tfwoapsLockStatus cfgDefault | ||
| maybeFeatureStatus <- TeamFeatures.getFeatureStatusNoConfig @'Public.TeamFeatureGuestLinks tid | ||
| pure $ case (defLockStatus, maybeFeatureStatus) of | ||
| (Public.Unlocked, Just featureStatus) -> | ||
| pure $ case maybeFeatureStatus of | ||
| Just featureStatus -> | ||
| Public.TeamFeatureStatusNoConfigAndLockStatus | ||
| (Public.tfwoStatus featureStatus) | ||
| Public.Unlocked | ||
| (Public.Unlocked, Nothing) -> cfgDefault {Public.tfwoapsLockStatus = Public.Unlocked} | ||
| (Public.Locked, _) -> cfgDefault {Public.tfwoapsLockStatus = Public.Locked} | ||
| defLockStatus | ||
| Nothing -> cfgDefault |
Contributor
There was a problem hiding this comment.
I think this is a genuine fix, but it's still not completely correct. Shouldn't the lock status in L647 come from cassandra, not the default?
(Wow, this is complicated, though. Why is this so complicated?)
Contributor
There was a problem hiding this comment.
(And have we been making the same mistake elsewhere?)
c495217 to
bdfc36f
Compare
fisx
requested changes
Dec 17, 2021
| migration = Migration 57 "Add lock status for guest links team feature" $ do | ||
| schema' | ||
| [r| ALTER TABLE team_features ADD ( | ||
| guest_links_lock_status int |
Contributor
There was a problem hiding this comment.
should this be consistent with the symbol?
type KnownTeamFeatureNameSymbol 'TeamFeatureGuestLinks = "conversationGuestLinks"
fisx
approved these changes
Dec 17, 2021
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://wearezeta.atlassian.net/browse/SQSERVICES-1169
Checklist
changelog.d.