-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Implemented guild experiments #389
Draft
BanTheNons
wants to merge
6
commits into
spacebarchat:legacy
Choose a base branch
from
BanTheNons:guild-experiments
base: legacy
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
23468b1
Squashed commit of the following:
BanTheNons 445189c
Update guild_experiments.json
BanTheNons e200c7b
compile json files
BanTheNons e972703
Update experiments.ts
BanTheNons 5a6421f
Delete guild_experiments.json
BanTheNons bd9bd05
Merge branch 'master' into pr/BanTheNons/389
SamuelScheit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"experiments": {"fingerprint": "889800254663311382.rgUouuEkLbQi0SGiEMClnfgNZic", "assignments": [[4047587481, 0, 0, -1, 0], [1865079242, 0, 1, -1, 0], [3816091942, 3, 0, -1, 0], [4130837190, 0, 10, -1, 0], [1861568052, 0, 1, -1, 0], [1578940118, 1, 1, -1, 0], [1571676964, 0, 1, -1, 2], [1658164312, 2, 1, -1, 0], [98883956, 1, 1, -1, 0], [3114091169, 0, 1, -1, 0], [2570684145, 4, 1, -1, 2], [4007615411, 0, 1, -1, 0], [852550504, 3, 1, -1, 0], [4168223991, 0, 1, -1, 0], [478613943, 2, 1, -1, 1], [284670956, 0, 1, -1, 0], [2099185390, 0, 1, -1, 0], [1202202685, 0, 1, -1, 0], [3633864632, 0, 1, -1, 0], [3103053065, 0, 1, -1, 0], [820624960, 0, 1, -1, 0], [2599708267, 0, 1, -1, 0], [2885186814, 0, 1, -1, 0], [221503477, 0, 1, -1, 0], [1054317075, 0, 1, -1, 3], [683872522, 0, 1, -1, 1], [1739278764, 0, 2, -1, 0], [2855249023, 0, 1, -1, 0], [3721841948, 0, 1, -1, 0], [1365487849, 6, 1, -1, 0], [955229746, 0, 1, -1, 0], [3128009767, 0, 10, -1, 0], [441885003, 0, 1, -1, 0], [3433971238, 0, 1, -1, 2], [1038765354, 3, 1, -1, 0], [2973729510, 2, 1, -1, 0], [3884442008, 0, 1, -1, 0], [978673395, 1, 1, -1, 0], [4050927174, 0, 1, -1, 0], [1260103069, 0, 1, -1, 0], [4168894280, 0, 1, -1, 0], [2003494159, 1, 1, -1, 0], [2458926251, 1, 6, -1, 2], [4027800, 1, 6, -1, 3], [51193042, 0, 1, -1, 0], [2063302207, 1, 6, -1, 4], [2634540382, 3, 1, -1, 0], [886364171, 0, 1, -1, 0], [427713714, 0, 1, -1, 0], [3388129398, 0, 1, -1, 0], [446728522, 0, 1, -1, 0], [3305874255, 0, 1, -1, 0], [3316720711, 0, 1, -1, 0], [1126477623, 0, 1, -1, 0], [2617218444, 4, 1, -1, 2], [3615263239, 0, 1, -1, 0], [3035674767, 0, 1, -1, 0], [261678880, 0, 1, -1, 0], [144783748, 0, 1, -1, 0], [2898830675, 0, 1, -1, 0], [2311413706, 0, 1, -1, 0], [1304635016, 0, 1, -1, 0], [3840356350, 4, 1, -1, 0], [1047093347, 0, 1, -1, 2], [3354177721, 0, 1, -1, 0], [3643362751, 0, 1, -1, 0], [698017395, 0, 1, -1, 0], [902020832, 3, 3, -1, 1], [2165627712, 2, 1, -1, 0], [3346844407, 0, 1, -1, 0], [3753034466, 1, 2, -1, 0], [881221695, 1, 1, -1, 0], [2144100145, 0, 1, -1, 0], [3749399219, 0, 0, -1, 0], [55060776, 1, 2, -1, 0], [3125584553, 1, 1, -1, 0], [2906015343, 2, 0, -1, 0], [219203323, 1, 1, -1, 0], [2854861606, 0, 1, -1, 1], [3884403666, 1, 1, -1, 0], [1041569008, 0, 1, -1, 0], [2780619238, 1, 1, -1, 0], [2839301427, 1, 1, -1, 0], [2481496956, 0, 1, -1, 0], [1305004983, 0, 1, -1, 0], [126562871, 2, 2, -1, 0], [3296195750, 0, 0, -1, 0]]}, | ||
"with_guild_experiments": {"fingerprint": "889800328839561216.vZ4Xe0ZSjeF7pcyqPJRxRP6lsFQ", "assignments": [[4047587481, 0, 0, -1, 0], [1865079242, 0, 1, -1, 0], [3816091942, 3, 0, -1, 0], [4130837190, 0, 10, -1, 0], [1861568052, 0, 1, -1, 0], [1578940118, 1, 1, -1, 0], [1571676964, 0, 1, -1, 2], [1658164312, 2, 1, -1, 0], [98883956, 1, 1, -1, 0], [3114091169, 0, 1, -1, 0], [2570684145, 4, 1, -1, 2], [4007615411, 0, 1, -1, 0], [852550504, 3, 1, -1, 0], [4168223991, 0, 1, -1, 0], [478613943, 2, 1, -1, 1], [284670956, 0, 1, -1, 0], [2099185390, 0, 1, -1, 0], [1202202685, 0, 1, -1, 0], [3633864632, 0, 1, -1, 0], [3103053065, 0, 1, -1, 0], [820624960, 0, 1, -1, 0], [2599708267, 0, 1, -1, 0], [2885186814, 0, 1, -1, 0], [221503477, 0, 1, -1, 0], [1054317075, 0, 1, -1, 3], [683872522, 0, 1, -1, 1], [1739278764, 0, 2, -1, 0], [2855249023, 0, 1, -1, 0], [3721841948, 0, 1, -1, 0], [1365487849, 6, 1, -1, 0], [955229746, 0, 1, -1, 0], [3128009767, 0, 10, -1, 0], [441885003, 0, 1, -1, 0], [3433971238, 0, 1, -1, 2], [1038765354, 3, 1, -1, 0], [2973729510, 2, 1, -1, 0], [3884442008, 0, 1, -1, 0], [978673395, 1, 1, -1, 0], [4050927174, 0, 1, -1, 0], [1260103069, 0, 1, -1, 0], [4168894280, 0, 1, -1, 0], [2003494159, 1, 1, -1, 0], [2458926251, 1, 6, -1, 2], [4027800, 1, 6, -1, 3], [51193042, 0, 1, -1, 0], [2063302207, 1, 6, -1, 4], [2634540382, 3, 1, -1, 0], [886364171, 0, 1, -1, 0], [427713714, 0, 1, -1, 0], [3388129398, 0, 1, -1, 0], [446728522, 0, 1, -1, 0], [3305874255, 0, 1, -1, 0], [3316720711, 0, 1, -1, 0], [1126477623, 0, 1, -1, 0], [2617218444, 4, 1, -1, 2], [3615263239, 0, 1, -1, 0], [3035674767, 0, 1, -1, 0], [261678880, 0, 1, -1, 0], [144783748, 0, 1, -1, 0], [2898830675, 0, 1, -1, 0], [2311413706, 0, 1, -1, 0], [1304635016, 0, 1, -1, 0], [3840356350, 4, 1, -1, 0], [1047093347, 0, 1, -1, 2], [3354177721, 0, 1, -1, 0], [3643362751, 0, 1, -1, 0], [698017395, 0, 1, -1, 0], [902020832, 3, 3, -1, 1], [2165627712, 2, 1, -1, 0], [3346844407, 0, 1, -1, 0], [3753034466, 1, 2, -1, 0], [881221695, 1, 1, -1, 0], [2144100145, 0, 1, -1, 0], [3749399219, 0, 1, -1, 0], [55060776, 1, 2, -1, 0], [3125584553, 1, 1, -1, 0], [2906015343, 2, 0, -1, 0], [219203323, 1, 1, -1, 0], [2854861606, 0, 1, -1, 1], [3884403666, 1, 1, -1, 0], [1041569008, 0, 1, -1, 0], [2780619238, 1, 2, -1, 0], [2839301427, 1, 1, -1, 0], [2481496956, 0, 1, -1, 0], [1305004983, 0, 1, -1, 0], [2735830691, 0, 1, -1, 0], [206611123, 0, 1, -1, 0], [126562871, 2, 0, -1, 0], [3296195750, 0, 1, -1, 0]]} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { Router, Response, Request } from "express"; | ||
import { route } from "@fosscord/api"; | ||
import { experiments, with_guild_experiments } from "./experiments.json"; | ||
|
||
const router = Router(); | ||
|
||
router.get("/", route({}), (req: Request, res: Response) => { | ||
// TODO: | ||
res.send({ fingerprint: "", assignments: [] }); | ||
console.log(req.params) | ||
BanTheNons marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if (req.url.includes("with_guild_experiments=true")) return res.json(with_guild_experiments); | ||
DiegoMagdaleno marked this conversation as resolved.
Show resolved
Hide resolved
|
||
else return res.json(experiments); | ||
BanTheNons marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}); | ||
|
||
export default router; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,4 +104,7 @@ dist | |
.tern-port | ||
.DS_Store | ||
|
||
data | ||
data | ||
|
||
# Guild experiments | ||
src/opcodes/guild_experiments.json |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1 @@ | ||
[ | ||
[4047587481, 0, 0, -1, 0], | ||
[1509401575, 0, 1, -1, 0], | ||
[1865079242, 0, 1, -1, 0], | ||
[1962538549, 1, 0, -1, 0], | ||
[3816091942, 3, 2, -1, 0], | ||
[4130837190, 0, 10, -1, 0], | ||
[1861568052, 0, 1, -1, 0], | ||
[2290910058, 6, 2, -1, 0], | ||
[1578940118, 1, 1, -1, 0], | ||
[1571676964, 0, 1, -1, 2], | ||
[3640172371, 0, 2, -1, 2], | ||
[1658164312, 2, 1, -1, 0], | ||
[98883956, 1, 1, -1, 0], | ||
[3114091169, 0, 1, -1, 0], | ||
[2570684145, 4, 1, -1, 2], | ||
[4007615411, 0, 1, -1, 0], | ||
[3665310159, 2, 1, -1, 1], | ||
[852550504, 3, 1, -1, 0], | ||
[2333572067, 0, 1, -1, 0], | ||
[935994771, 1, 1, -1, 0], | ||
[1127795596, 1, 1, -1, 0], | ||
[4168223991, 0, 1, -1, 0], | ||
[18585280, 0, 1, -1, 1], | ||
[327482016, 0, 1, -1, 2], | ||
[3458098201, 7, 1, -1, 0], | ||
[478613943, 2, 1, -1, 1], | ||
[2792197902, 0, 1, -1, 2], | ||
[284670956, 0, 1, -1, 0], | ||
[2099185390, 0, 1, -1, 0], | ||
[1202202685, 0, 1, -1, 0], | ||
[2122174751, 0, 1, -1, 0], | ||
[3633864632, 0, 1, -1, 0], | ||
[3103053065, 0, 1, -1, 0], | ||
[820624960, 0, 1, -1, 0], | ||
[1134479292, 0, 1, -1, 0], | ||
[2511257455, 3, 1, -1, 3], | ||
[2599708267, 0, 1, -1, 0], | ||
[613180822, 1, 1, -1, 0], | ||
[2885186814, 0, 1, -1, 0], | ||
[221503477, 0, 1, -1, 0], | ||
[1054317075, 0, 1, -1, 3], | ||
[683872522, 0, 1, -1, 1], | ||
[1739278764, 0, 2, -1, 0], | ||
[2855249023, 0, 1, -1, 0], | ||
[3721841948, 0, 1, -1, 0], | ||
[1285203515, 0, 1, -1, 0], | ||
[1365487849, 6, 1, -1, 0], | ||
[955229746, 0, 1, -1, 0], | ||
[3128009767, 0, 10, -1, 0], | ||
[441885003, 0, 1, -1, 0], | ||
[3433971238, 0, 1, -1, 2], | ||
[1038765354, 3, 1, -1, 0], | ||
[1174347196, 0, 1, -1, 0], | ||
[3649806352, 1, 1, -1, 0], | ||
[2973729510, 2, 1, -1, 0], | ||
[2571931329, 1, 6, -1, 0], | ||
[3884442008, 0, 1, -1, 0], | ||
[978673395, 1, 1, -1, 0], | ||
[4050927174, 0, 1, -1, 0], | ||
[1260103069, 0, 1, -1, 0], | ||
[4168894280, 0, 1, -1, 0], | ||
[4045587091, 0, 1, -1, 0], | ||
[2003494159, 1, 1, -1, 0], | ||
[51193042, 0, 1, -1, 0], | ||
[2634540382, 3, 1, -1, 0], | ||
[886364171, 0, 1, -1, 0], | ||
[3898604944, 0, 1, -1, 0], | ||
[3388129398, 0, 1, -1, 0], | ||
[3964382884, 2, 1, -1, 1], | ||
[3305874255, 0, 1, -1, 0], | ||
[156590431, 0, 1, -1, 0], | ||
[3106485751, 0, 0, -1, 0], | ||
[3035674767, 0, 1, -1, 0], | ||
[851697110, 0, 1, -1, 0] | ||
] | ||
[[4047587481, 0, 0, -1, 0], [1865079242, 0, 1, -1, 0], [3816091942, 3, 0, -1, 0], [4130837190, 0, 10, -1, 0], [1861568052, 0, 1, -1, 0], [1578940118, 1, 1, -1, 0], [1571676964, 0, 1, -1, 2], [1658164312, 2, 1, -1, 0], [98883956, 1, 1, -1, 0], [3114091169, 0, 1, -1, 0], [2570684145, 4, 1, -1, 2], [4007615411, 0, 1, -1, 0], [852550504, 3, 1, -1, 0], [4168223991, 0, 1, -1, 0], [478613943, 2, 1, -1, 1], [284670956, 0, 1, -1, 0], [2099185390, 0, 1, -1, 0], [1202202685, 0, 1, -1, 0], [3633864632, 0, 1, -1, 0], [3103053065, 0, 1, -1, 0], [820624960, 0, 1, -1, 0], [2599708267, 0, 1, -1, 0], [2885186814, 0, 1, -1, 0], [221503477, 0, 1, -1, 0], [1054317075, 0, 1, -1, 3], [683872522, 0, 1, -1, 1], [1739278764, 0, 2, -1, 0], [2855249023, 0, 1, -1, 0], [3721841948, 0, 1, -1, 0], [1365487849, 6, 1, -1, 0], [955229746, 0, 1, -1, 0], [3128009767, 0, 10, -1, 0], [441885003, 0, 1, -1, 0], [3433971238, 0, 1, -1, 2], [1038765354, 3, 1, -1, 0], [2973729510, 2, 1, -1, 0], [3884442008, 0, 1, -1, 0], [978673395, 1, 1, -1, 0], [4050927174, 0, 1, -1, 0], [1260103069, 0, 1, -1, 0], [4168894280, 0, 1, -1, 0], [2003494159, 1, 1, -1, 0], [2458926251, 1, 6, -1, 2], [4027800, 1, 6, -1, 3], [51193042, 0, 1, -1, 0], [2063302207, 1, 6, -1, 4], [2634540382, 3, 1, -1, 0], [886364171, 0, 1, -1, 0], [427713714, 0, 1, -1, 0], [3388129398, 0, 1, -1, 0], [446728522, 0, 1, -1, 0], [3305874255, 0, 1, -1, 0], [3316720711, 0, 1, -1, 0], [1126477623, 0, 1, -1, 0], [2617218444, 4, 1, -1, 2], [3615263239, 0, 1, -1, 0], [3035674767, 0, 1, -1, 0], [261678880, 0, 1, -1, 0], [144783748, 0, 1, -1, 0], [2898830675, 0, 1, -1, 0], [2311413706, 0, 1, -1, 0], [1304635016, 0, 1, -1, 0], [3840356350, 4, 1, -1, 0], [1047093347, 0, 1, -1, 2], [3354177721, 0, 1, -1, 0], [3643362751, 0, 1, -1, 0], [698017395, 0, 1, -1, 0], [902020832, 3, 3, -1, 1], [2165627712, 2, 1, -1, 0], [3346844407, 0, 1, -1, 0], [3753034466, 1, 2, -1, 0], [881221695, 1, 1, -1, 0], [2144100145, 0, 1, -1, 0], [3749399219, 0, 0, -1, 0], [55060776, 1, 2, -1, 0], [3125584553, 1, 1, -1, 0], [2906015343, 2, 0, -1, 0], [219203323, 1, 1, -1, 0], [2854861606, 0, 1, -1, 1], [3884403666, 1, 1, -1, 0], [1041569008, 0, 1, -1, 0], [2780619238, 1, 1, -1, 0], [2839301427, 1, 1, -1, 0], [2481496956, 0, 1, -1, 0], [1305004983, 0, 1, -1, 0], [126562871, 2, 2, -1, 0], [3296195750, 0, 0, -1, 0]] | ||
Comment on lines
-76
to
+1
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: Fetch experiments from instance DB |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[ | ||
{ | ||
"hashKey": 3563379711, | ||
"revision": 0, | ||
"populations": [ | ||
{ | ||
"buckets": { | ||
"1": { | ||
"rollout": [ | ||
{ | ||
"min": 0, | ||
"max": 1000 | ||
} | ||
] | ||
}, | ||
"2": { | ||
"rollout": [ | ||
{ | ||
"min": 1000, | ||
"max": 10000 | ||
} | ||
] | ||
} | ||
}, | ||
"filters": [ | ||
{ | ||
"type": "guild_ids", | ||
"ids": [ | ||
1234, | ||
5678 | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"overrides": { | ||
"2": [ | ||
"203290518795452416" | ||
] | ||
} | ||
} | ||
|
||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[ | ||
{ | ||
"id":"2021-06_stage_events", | ||
"title": "Stage Events", | ||
"description": [ | ||
"Control", | ||
"Treatment 1: Guild can use Stage Events" | ||
], | ||
"hashKey": 4150241132, | ||
"revision": 0, | ||
"populations": [ | ||
{ | ||
"buckets": { | ||
"1": { | ||
"rollout": [ | ||
{ | ||
"min": 0, | ||
"max": 10000 | ||
} | ||
] | ||
} | ||
}, | ||
"filters": [ | ||
{ | ||
"type": "guild_has_feature", | ||
"guild_features": [ | ||
"PARTNERED" | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"overrides": {} | ||
} | ||
] |
Oops, something went wrong.
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.
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.
Is this the only way to do it?.
It doesn't look very readable.
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.
It just sends the list of all experiments. It's definitely not readable, and we'll have to blame discord for that.