Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into by/feature-gate-ses…
Browse files Browse the repository at this point in the history
…sion-replay-product-features
  • Loading branch information
Bianca Yang committed Dec 21, 2023
2 parents afb3e3f + 5590acb commit ef5b761
Show file tree
Hide file tree
Showing 377 changed files with 8,413 additions and 4,925 deletions.
1 change: 1 addition & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ jobs:
close-pr-message: "This PR was closed due to lack of activity. Feel free to reopen if it's still relevant."
stale-pr-label: stale
remove-pr-stale-when-updated: true
exempt-pr-labels: 'waiting'
operations-per-run: 250
repo-token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions ee/api/test/__snapshots__/test_time_to_see_data.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"user": {
"distinct_id": "",
"first_name": "",
"last_name": "",
"email": "",
"is_email_verified": false
}
Expand Down
4 changes: 2 additions & 2 deletions ee/billing/quota_limiting.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ def set_org_usage_summary(
new_usage = copy.deepcopy(new_usage)

for field in ["events", "recordings", "rows_synced"]:
resource_usage = new_usage[field] # type: ignore
resource_usage = new_usage.get(field, {"limit": None, "usage": 0, "todays_usage": 0})
if not resource_usage:
continue

if todays_usage:
resource_usage["todays_usage"] = todays_usage[field] # type: ignore
resource_usage["todays_usage"] = todays_usage.get(field, 0)
else:
# TRICKY: If we are not explictly setting todays_usage, we want to reset it to 0 IF the incoming new_usage is different
if (organization.usage or {}).get(field, {}).get("usage") != resource_usage.get("usage"):
Expand Down
Loading

0 comments on commit ef5b761

Please sign in to comment.