-
Notifications
You must be signed in to change notification settings - Fork 325
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
Feature flag refactoring (part 1) #4181
Conversation
1253d97
to
fb2ba8b
Compare
5030c22
to
0d7768d
Compare
e854929
to
3c485c4
Compare
b6e5ffb
to
f1f92c3
Compare
f0d7159
to
c67a907
Compare
c67a907
to
9a033f1
Compare
0d7768d
to
7c5ee3c
Compare
9a033f1
to
a8d7ff9
Compare
a8d7ff9
to
550f357
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kind of a big one, was really nice working on it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is so nice
c23ceca
to
a49cdf2
Compare
0bf9e91
to
1fa5fe1
Compare
class AllArbitraryFeatures cfgs where | ||
allArbitraryFeatures :: [Gen A.Value] | ||
|
||
instance AllArbitraryFeatures '[] where | ||
allArbitraryFeatures = [] | ||
|
||
instance | ||
( IsFeatureConfig cfg, | ||
ToSchema cfg, | ||
Arbitrary cfg, | ||
AllArbitraryFeatures cfgs | ||
) => | ||
AllArbitraryFeatures (cfg : cfgs) | ||
where | ||
allArbitraryFeatures = arbitraryFeature @cfg : allArbitraryFeatures @cfgs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be possible with recursion on SList
which reifies the type level list. You also need a csontraint on all elements, so perhaps smth like cpara_SList
might work this time.
- rewrite boilerplate to NP combinators - regeneate nix derivations - format all - make galley, wire-subsystems and wire-api compile
Also rename FeatureSingletonMlsMigration{Config}
Co-authored-by: Mango The Fourth <[email protected]>
Co-authored-by: Mango The Fourth <[email protected]>
Also get rid of LiftForF constraint, which required `UndecidableSuperClasses`.
Also remove unnecessary parenthesis.
1fa5fe1
to
ca74ec3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If @MangoIV has no pending comments, LGTM.
dbFeatureConfig, | ||
dbFeatureModConfig, | ||
WithStatus, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
First stab at refactoring feature flags and removing code duplication.
Highlights of changes:
Feature
,LockableFeature
andLockableFeaturePatch
.unlimited
.AllFeatures
into an extensible record type.WithStatusBase
barbie.computeFeatureConfigForTeamUser
.getFeature
andsetFeature
.getAllTeamFeatures
.https://wearezeta.atlassian.net/browse/WPB-10323
Checklist
changelog.d