-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(flags): add quota limiting for feature flags served up with /decide
and to local_evaluation
#28564
Open
dmarticus
wants to merge
28
commits into
master
Choose a base branch
from
feat/quota-limiting
base: master
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.
+546
−126
Open
feat(flags): add quota limiting for feature flags served up with /decide
and to local_evaluation
#28564
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
e5b00e8
ruff
dmarticus 03f877c
import constants
dmarticus 20d7c14
Merge branch 'master' into feat/quota-limiting
dmarticus 2ed2be7
add feature flags to these quota limit assertions
dmarticus 0dd8563
Merge branch 'feat/quota-limiting' of github.com:PostHog/posthog into…
dmarticus 51f0df5
darnit i missed one
dmarticus b428fa8
two more bugs I fixed wow go me
dmarticus 290d681
Merge branch 'master' into feat/quota-limiting
dmarticus 727c4cf
fixing some tests
dmarticus 3836ffe
Merge branch 'feat/quota-limiting' of github.com:PostHog/posthog into…
dmarticus 62b09c1
sigh idk
dmarticus b9c38d1
Merge branch 'master' into feat/quota-limiting
dmarticus fef5963
Merge branch 'master' into feat/quota-limiting
dmarticus ca1037b
Merge branch 'feat/quota-limiting' of github.com:PostHog/posthog into…
dmarticus e980e11
cleaning up quota limiting + remote config
dmarticus cd37a8b
more response polishing
dmarticus 1d662c9
Merge branch 'master' into feat/quota-limiting
dmarticus 7d82a58
delete prints
dmarticus 96f59ae
moar tests
dmarticus efd76bc
Merge branch 'master' into feat/quota-limiting
dmarticus 9f06adf
limit local eval, too
dmarticus 12c13c8
Merge branch 'feat/quota-limiting' of github.com:PostHog/posthog into…
dmarticus a176607
renamed the quota limit to make it more clear
dmarticus f1eab3f
respond with an error instead; this feels more honest
dmarticus 641988e
resolvin them conflicts
dmarticus 1f98d8b
Update query snapshots
github-actions[bot] 14e4312
resolve conflicts
dmarticus d783b42
Update query snapshots
github-actions[bot] 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
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 a bug fix? Has recordings quota limited been wrong this whole time?
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.
oh wow I didn't even realize i did this; it was a cursor tab-complete for adding in the
quota_limited_flags
stuff. I'm gonna tag the replay team so they know about this, since i don't want to change it without them signing off, but it's also possible they weren't even aware this was broken. @PostHog/team-replay you folks want to take a look at this?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.
🙈 that wouldn't suprise me.
i've never touched quota limiting and don't know how I'd check if it was broken 🤔
more scary, there were no failing tests before or after the change 😱
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.
turns out it's been that way since being introduced
#14340
that PR talks about tracking so is this just what we're reporting to ourselves or the actual value we use for limiting?
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.
lol I wonder if it's because the one test where we check the value of that entry we also assert that it's the same value of the
quota_limited_events
field.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.
🙈
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.
you nailed it though; that object is just used in
report_organization_action
, so it's just for internal reportingSo, no actual quota limiting bug, but a quota limit reporting bug!
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.
are you ok to fix the test as well here?
i don't understand the impact but i'm guessing quota limiting on the correct count is better than not regardless of if it's just reporting
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.
oh yeah i'm on it; there's a bunch of other tests I want to fix too – I need to assert the presence of this new quota limit in way more places lol
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.
awesome... thanks!